From d6a117d0ccad1c79686b8e1e0ff8d0fc93f71320 Mon Sep 17 00:00:00 2001 From: Erik Tute Date: Wed, 10 Mar 2021 12:58:22 +0100 Subject: [PATCH 001/141] First try of DNR-mapping --- .../CompositionConverterResolver.java | 4 +- .../DNRAnordnungCompositionConverter.java | 88 + .../DNRAnordnungComposition.java | 275 ++ .../DNRAnordnungCompositionContainment.java | 66 + .../ArtDerRichtlinieDefiningCode.java | 40 + .../definition/BeschreibungDefiningCode.java | 59 + .../definition/DnrAnordnungEvaluation.java | 179 + .../DnrAnordnungEvaluationContainment.java | 44 + .../DnrAnordnungKategorieElement.java | 59 + .../definition/KategorieDefiningCode.java | 39 + .../definition/StatusDefiningCode.java | 57 + .../fhirbridge/fhir/common/Profile.java | 5 + src/main/resources/opt/DNR-Anordnung.opt | 999 ++++ .../profiles/DoNotResuscitateOrder.xml | 4288 +++++++++++++++++ .../DNR/Consent-example-duplicate-2.json | 54 + .../DNR/Consent-example-duplicate-3.json | 54 + src/test/resources/DNR/Consent-example.json | 54 + 17 files changed, 6363 insertions(+), 1 deletion(-) create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/converter/DNRAnordnungCompositionConverter.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/DNRAnordnungComposition.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/DNRAnordnungCompositionContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/ArtDerRichtlinieDefiningCode.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/BeschreibungDefiningCode.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/DnrAnordnungEvaluation.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/DnrAnordnungEvaluationContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/DnrAnordnungKategorieElement.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/KategorieDefiningCode.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/StatusDefiningCode.java create mode 100644 src/main/resources/opt/DNR-Anordnung.opt create mode 100644 src/main/resources/profiles/DoNotResuscitateOrder.xml create mode 100644 src/test/resources/DNR/Consent-example-duplicate-2.json create mode 100644 src/test/resources/DNR/Consent-example-duplicate-3.json create mode 100644 src/test/resources/DNR/Consent-example.json diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/CompositionConverterResolver.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/CompositionConverterResolver.java index 12fe2b63f..fec772ab2 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/CompositionConverterResolver.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/CompositionConverterResolver.java @@ -73,12 +73,14 @@ public void afterPropertiesSet() { profiles.put(Profile.DIAGNOSE_DEPENDENCE_ON_VENTILATOR, new GECCODiagnoseCompositionConverter()); // Patient profiles.put(Profile.PATIENT, new PatientCompositionConverter()); - + // Procedures profiles.put(Profile.APHERESIS_PROCEDURE, new TherapyCompositionConverter()); profiles.put(Profile.DIALYSIS_PROCEDURE, new TherapyCompositionConverter()); profiles.put(Profile.RESPIRATORY_THERAPIES_PROCEDURE, new TherapyCompositionConverter()); profiles.put(Profile.RADIOLOGY_PROCEDURE, new TherapyCompositionConverter()); profiles.put(Profile.EXTRACORPOREAL_MEMBRANE_OXYGENATION_PROCEDURE, new TherapyCompositionConverter()); profiles.put(Profile.PRONE_POSITION_PROCEDURE, new TherapyCompositionConverter()); + //Consents + profiles.put(Profile.DNR_ORDER, new DNRAnordnungCompositionConverter()); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/DNRAnordnungCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/DNRAnordnungCompositionConverter.java new file mode 100644 index 000000000..7e690f8ec --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/DNRAnordnungCompositionConverter.java @@ -0,0 +1,88 @@ +package org.ehrbase.fhirbridge.ehr.converter; + +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import com.nedap.archie.rm.generic.PartySelf; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.Setting; +import org.ehrbase.client.classgenerator.shareddefinition.Territory; +import org.ehrbase.fhirbridge.camel.component.ehr.composition.CompositionConverter; +import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.DNRAnordnungComposition; +import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.ArtDerRichtlinieDefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.BeschreibungDefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.DnrAnordnungEvaluation; +import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.DnrAnordnungKategorieElement; +import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.KategorieDefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.StatusDefiningCode; +import org.hl7.fhir.r4.model.Consent; + +import java.util.ArrayList; +import java.util.List; + +public class DNRAnordnungCompositionConverter implements CompositionConverter { + + @Override + public Consent fromComposition(DNRAnordnungComposition composition) { + return null; + } + + @Override + public DNRAnordnungComposition toComposition(Consent fhirConsent) { + if (fhirConsent == null) { + return null; + } + DNRAnordnungComposition composition = new DNRAnordnungComposition(); + + composition = setRequiredFields(composition); + composition.setStatusDefiningCode(createStatusDefiningCode(fhirConsent.getStatus())); + composition.setKategorie(createDnrAnordnungKategorieElement()); + composition.setDnrAnordnung(createDnrAnordnung(fhirConsent.getProvision())); + + return composition; + } + + private DNRAnordnungComposition setRequiredFields(DNRAnordnungComposition composition) { + composition.setLanguage(Language.DE); + composition.setLocation("test"); + composition.setSettingDefiningCode(Setting.SECONDARY_MEDICAL_CARE); + composition.setTerritory(Territory.DE); + composition.setComposer(new PartySelf()); + return composition; + } + + private StatusDefiningCode createStatusDefiningCode(Consent.ConsentState fhirStatus) { + switch(fhirStatus.toCode()) { + case "draft": + return StatusDefiningCode.ENTWORFEN; + case "proposed": + return StatusDefiningCode.VORGESCHLAGEN; + case "active": + return StatusDefiningCode.AKTIV; + case "rejected": + return StatusDefiningCode.VERWORFEN; + case "inactive": + return StatusDefiningCode.INAKTIV; + case "entered-in-error": + return StatusDefiningCode.EINGABEFEHLER; + default: + //TODO Test + throw new UnprocessableEntityException("createStatusDefiningCode failed. Code not found for: " + fhirStatus.toString()); + } + } + + private List createDnrAnordnungKategorieElement() { + List items = new ArrayList<>(); + DnrAnordnungKategorieElement elem = new DnrAnordnungKategorieElement(); + elem.setValue(KategorieDefiningCode.DO_NOT_RESUSCITATE); + items.add(elem); + return items; + } + + private DnrAnordnungEvaluation createDnrAnordnung(Consent.provisionComponent provision) { + DnrAnordnungEvaluation dnrAnordnung = new DnrAnordnungEvaluation(); + dnrAnordnung.setLanguage(Language.DE); + dnrAnordnung.setSubject(new PartySelf()); + dnrAnordnung.setArtDerRichtlinieDefiningCode(ArtDerRichtlinieDefiningCode.DO_NO_RESUSCIATE); + dnrAnordnung.setBeschreibungDefiningCode(BeschreibungDefiningCode.get_by_SNOMED_code(provision.getCode())); + return dnrAnordnung; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/DNRAnordnungComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/DNRAnordnungComposition.java new file mode 100644 index 000000000..6c1867cd9 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/DNRAnordnungComposition.java @@ -0,0 +1,275 @@ +package org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.generic.Participation; +import com.nedap.archie.rm.generic.PartyIdentified; +import com.nedap.archie.rm.generic.PartyProxy; +import java.lang.String; +import java.time.temporal.TemporalAccessor; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Id; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.annotations.Template; +import org.ehrbase.client.classgenerator.shareddefinition.Category; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; +import org.ehrbase.client.classgenerator.shareddefinition.Setting; +import org.ehrbase.client.classgenerator.shareddefinition.Territory; +import org.ehrbase.client.openehrclient.VersionUid; +import org.ehrbase.fhirbridge.ehr.Composition; +import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.DnrAnordnungEvaluation; +import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.DnrAnordnungKategorieElement; +import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.StatusDefiningCode; + +@Entity +@Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-10T09:43:22.030214400+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +@Template("DNR-Anordnung") +public class DNRAnordnungComposition implements Composition { + /** + * Path: DNR-Anordnung/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: DNR-Anordnung/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List erweiterung; + + /** + * Path: DNR-Anordnung/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: DNR-Anordnung/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: DNR-Anordnung/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]") + private List kategorie; + + /** + * Path: DNR-Anordnung/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: DNR-Anordnung/context/participations + */ + @Path("/context/participations") + private List participations; + + /** + * Path: DNR-Anordnung/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: DNR-Anordnung/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: DNR-Anordnung/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: DNR-Anordnung/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: DNR-Anordnung/DNR-Anordnung + * Description: Ein Framework zur Kommunikation der Präferenzen einer Person für zukünftige medizinische Behandlung und Pflege. + */ + @Path("/content[openEHR-EHR-EVALUATION.advance_care_directive.v1 and name/value='DNR-Anordnung']") + private DnrAnordnungEvaluation dnrAnordnung; + + /** + * Path: DNR-Anordnung/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: DNR-Anordnung/language + */ + @Path("/language") + private Language language; + + /** + * Path: DNR-Anordnung/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: DNR-Anordnung/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode ; + } + + public void setErweiterung(List erweiterung) { + this.erweiterung = erweiterung; + } + + public List getErweiterung() { + return this.erweiterung ; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode ; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode ; + } + + public void setKategorie(List kategorie) { + this.kategorie = kategorie; + } + + public List getKategorie() { + return this.kategorie ; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue ; + } + + public void setParticipations(List participations) { + this.participations = participations; + } + + public List getParticipations() { + return this.participations ; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue ; + } + + public void setLocation(String location) { + this.location = location; + } + + public String getLocation() { + return this.location ; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility ; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode ; + } + + public void setDnrAnordnung(DnrAnordnungEvaluation dnrAnordnung) { + this.dnrAnordnung = dnrAnordnung; + } + + public DnrAnordnungEvaluation getDnrAnordnung() { + return this.dnrAnordnung ; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } + + public PartyProxy getComposer() { + return this.composer ; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public Language getLanguage() { + return this.language ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } + + public void setTerritory(Territory territory) { + this.territory = territory; + } + + public Territory getTerritory() { + return this.territory ; + } + + public VersionUid getVersionUid() { + return this.versionUid ; + } + + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/DNRAnordnungCompositionContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/DNRAnordnungCompositionContainment.java new file mode 100644 index 000000000..d3b6f335f --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/DNRAnordnungCompositionContainment.java @@ -0,0 +1,66 @@ +package org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.generic.Participation; +import com.nedap.archie.rm.generic.PartyIdentified; +import com.nedap.archie.rm.generic.PartyProxy; +import java.lang.String; +import java.time.temporal.TemporalAccessor; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.Category; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; +import org.ehrbase.client.classgenerator.shareddefinition.Setting; +import org.ehrbase.client.classgenerator.shareddefinition.Territory; +import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.DnrAnordnungEvaluation; +import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.DnrAnordnungKategorieElement; +import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.StatusDefiningCode; + +public class DNRAnordnungCompositionContainment extends Containment { + public SelectAqlField D_N_R_ANORDNUNG_COMPOSITION = new AqlFieldImp(DNRAnordnungComposition.class, "", "DNRAnordnungComposition", DNRAnordnungComposition.class, this); + + public SelectAqlField CATEGORY_DEFINING_CODE = new AqlFieldImp(DNRAnordnungComposition.class, "/category|defining_code", "categoryDefiningCode", Category.class, this); + + public ListSelectAqlField ERWEITERUNG = new ListAqlFieldImp(DNRAnordnungComposition.class, "/context/other_context[at0001]/items[at0002]", "erweiterung", Cluster.class, this); + + public SelectAqlField STATUS_DEFINING_CODE = new AqlFieldImp(DNRAnordnungComposition.class, "/context/other_context[at0001]/items[at0004]/value|defining_code", "statusDefiningCode", StatusDefiningCode.class, this); + + public SelectAqlField STATUS_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp(DNRAnordnungComposition.class, "/context/other_context[at0001]/items[at0004]/null_flavour|defining_code", "statusNullFlavourDefiningCode", NullFlavour.class, this); + + public ListSelectAqlField KATEGORIE = new ListAqlFieldImp(DNRAnordnungComposition.class, "/context/other_context[at0001]/items[at0005]", "kategorie", DnrAnordnungKategorieElement.class, this); + + public SelectAqlField START_TIME_VALUE = new AqlFieldImp(DNRAnordnungComposition.class, "/context/start_time|value", "startTimeValue", TemporalAccessor.class, this); + + public ListSelectAqlField PARTICIPATIONS = new ListAqlFieldImp(DNRAnordnungComposition.class, "/context/participations", "participations", Participation.class, this); + + public SelectAqlField END_TIME_VALUE = new AqlFieldImp(DNRAnordnungComposition.class, "/context/end_time|value", "endTimeValue", TemporalAccessor.class, this); + + public SelectAqlField LOCATION = new AqlFieldImp(DNRAnordnungComposition.class, "/context/location", "location", String.class, this); + + public SelectAqlField HEALTH_CARE_FACILITY = new AqlFieldImp(DNRAnordnungComposition.class, "/context/health_care_facility", "healthCareFacility", PartyIdentified.class, this); + + public SelectAqlField SETTING_DEFINING_CODE = new AqlFieldImp(DNRAnordnungComposition.class, "/context/setting|defining_code", "settingDefiningCode", Setting.class, this); + + public SelectAqlField DNR_ANORDNUNG = new AqlFieldImp(DNRAnordnungComposition.class, "/content[openEHR-EHR-EVALUATION.advance_care_directive.v1]", "dnrAnordnung", DnrAnordnungEvaluation.class, this); + + public SelectAqlField COMPOSER = new AqlFieldImp(DNRAnordnungComposition.class, "/composer", "composer", PartyProxy.class, this); + + public SelectAqlField LANGUAGE = new AqlFieldImp(DNRAnordnungComposition.class, "/language", "language", Language.class, this); + + public SelectAqlField FEEDER_AUDIT = new AqlFieldImp(DNRAnordnungComposition.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + public SelectAqlField TERRITORY = new AqlFieldImp(DNRAnordnungComposition.class, "/territory", "territory", Territory.class, this); + + private DNRAnordnungCompositionContainment() { + super("openEHR-EHR-COMPOSITION.registereintrag.v1"); + } + + public static DNRAnordnungCompositionContainment getInstance() { + return new DNRAnordnungCompositionContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/ArtDerRichtlinieDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/ArtDerRichtlinieDefiningCode.java new file mode 100644 index 000000000..b7d6b3440 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/ArtDerRichtlinieDefiningCode.java @@ -0,0 +1,40 @@ +package org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition; + +import java.lang.String; +import org.ehrbase.client.classgenerator.EnumValueSet; + +public enum ArtDerRichtlinieDefiningCode implements EnumValueSet { + DO_NO_RESUSCIATE("Do No Resusciate", "", "http://terminology.hl7.org/CodeSystem/consentcategorycodes", "dnr"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + ArtDerRichtlinieDefiningCode(String value, String description, String terminologyId, + String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/BeschreibungDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/BeschreibungDefiningCode.java new file mode 100644 index 000000000..bd176e39f --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/BeschreibungDefiningCode.java @@ -0,0 +1,59 @@ +package org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition; + +import java.lang.String; +import java.util.List; + +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import org.ehrbase.client.classgenerator.EnumValueSet; +import org.ehrbase.fhirbridge.ehr.opt.geccopersonendatencomposition.definition.EthnischerHintergrundDefiningCode; +import org.hl7.fhir.r4.model.CodeableConcept; + +public enum BeschreibungDefiningCode implements EnumValueSet { + UNKNOWN_QUALIFIER_VALUE("Unknown (qualifier value)", "", "SNOMED Clinical Terms", "261665006"), + + FOR_RESUSCITATION_FINDING("For resuscitation (finding)", "", "SNOMED Clinical Terms", "304252001"), + + NOT_FOR_RESUSCITATION_FINDING("Not for resuscitation (finding)", "", "SNOMED Clinical Terms", "304253006"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + BeschreibungDefiningCode(String value, String description, String terminologyId, String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public static BeschreibungDefiningCode get_by_SNOMED_code(List code) { + CodeableConcept fhir_code = code.get(0); + for(BeschreibungDefiningCode bc : values()) { + if(bc.code.equals(fhir_code)) { + return bc; + } + } + //TODO Test + throw new UnprocessableEntityException("Getting BeschreibungDefiningCode failed. Code not found for: " + fhir_code.toString()); + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/DnrAnordnungEvaluation.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/DnrAnordnungEvaluation.java new file mode 100644 index 000000000..f649b6514 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/DnrAnordnungEvaluation.java @@ -0,0 +1,179 @@ +package org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.generic.PartyProxy; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.EntryEntity; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Archetype("openEHR-EHR-EVALUATION.advance_care_directive.v1") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-10T09:43:22.149215900+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +public class DnrAnordnungEvaluation implements EntryEntity { + /** + * Path: DNR-Anordnung/DNR-Anordnung/Art der Richtlinie + * Description: Die Art der Patientenverfügung. + * Comment: Eine kurze schriftliche Beschreibung der Art der Patientenverfügung. Eine Kodierung mit einer Terminologie wird, bevorzugt. Es wird erwartet, dass diese weitgehend lokalisiert ist, um die lokale Politik und Gesetzgebung widerzuspiegeln. + * + * In den Niederlanden beispielsweise umfassen die Arten von Patientenverfügungen unter anderem "Behandlungsverbot", " Behandlungsverbot mit Beendigung des abgeschlossenen Lebens", "Euthanasieantrag" und "Lebenserklärung". + * + * Im Vereinigten Königreich gehören zu den Arten von Patientenverfügungen im Rahmen der medizinischen Versorgung die "Vorabentscheidung", die "Patientenverfügung" und die " Voraberklärung". + */ + @Path("/data[at0001]/items[at0005]/value|defining_code") + private ArtDerRichtlinieDefiningCode artDerRichtlinieDefiningCode; + + /** + * Path: DNR-Anordnung/DNR-Anordnung/Item tree/Art der Richtlinie/null_flavour + */ + @Path("/data[at0001]/items[at0005]/null_flavour|defining_code") + private NullFlavour artDerRichtlinieNullFlavourDefiningCode; + + /** + * Path: DNR-Anordnung/DNR-Anordnung/Beschreibung + * Description: Beschreibung der allgemeinen Patientenverfügung. + * Comment: Kann verwendet werden, um eine Übersicht über die gesamte Patientenverfügung zu erfassen, die durch strukturierte Daten unterstützt werden kann. Angaben zu bestimmten strukturierten Befunden können unter Verwendung von CLUSTER-Archetypen in den Slot "Einzelheiten zur Richtlinie" aufgenommen werden. Dieses Datenelement kann verwendet werden, um Altdaten zu erfassen, die nicht in einem strukturierten Format verfügbar sind. + */ + @Path("/data[at0001]/items[at0006]/value|defining_code") + private BeschreibungDefiningCode beschreibungDefiningCode; + + /** + * Path: DNR-Anordnung/DNR-Anordnung/Item tree/Beschreibung/null_flavour + */ + @Path("/data[at0001]/items[at0006]/null_flavour|defining_code") + private NullFlavour beschreibungNullFlavourDefiningCode; + + /** + * Path: DNR-Anordnung/DNR-Anordnung/Einzelheiten zur Richtlinie + * Description: Strukturierte Angaben zu den Entscheidungen der Patientenverfügung. + * Comment: Dieser SLOT sollte auch dazu verwendet werden, Angaben für spezifische Bedingungen oder gemäß nationalen oder anderen lokalen Anforderungen zu notieren. Zum Beispiel kann es im Vereinigten Königreich eine spezifische Aussage darüber geben, ob das Leben aktiv verlängert werden soll. Dies gilt nur während der Schwangerschaft. + */ + @Path("/data[at0001]/items[at0052]") + private List einzelheitenZurRichtlinie; + + /** + * Path: DNR-Anordnung/DNR-Anordnung/Zeuge + * Description: Persönliche Angaben zu einer Person, die den Abschluss der Patientenverfügung bezeugt. + * Comment: Zum Beispiel 'John Smith, Rechtsanwalt'. + */ + @Path("/protocol[at0010]/items[at0025]") + private List zeuge; + + /** + * Path: DNR-Anordnung/DNR-Anordnung/Erweiterung + * Description: Zusätzliche Informationen zur Erfassung lokaler Inhalte oder Anpassung an andere Referenzmodelle/Formalismen. + * Comment: Zum Beispiel: Lokaler Informationsbedarf oder zusätzliche Metadaten zur Anpassung an FHIR-Ressourcen. + */ + @Path("/protocol[at0010]/items[at0061]") + private List erweiterung; + + /** + * Path: DNR-Anordnung/DNR-Anordnung/subject + */ + @Path("/subject") + private PartyProxy subject; + + /** + * Path: DNR-Anordnung/DNR-Anordnung/language + */ + @Path("/language") + private Language language; + + /** + * Path: DNR-Anordnung/DNR-Anordnung/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setArtDerRichtlinieDefiningCode( + ArtDerRichtlinieDefiningCode artDerRichtlinieDefiningCode) { + this.artDerRichtlinieDefiningCode = artDerRichtlinieDefiningCode; + } + + public ArtDerRichtlinieDefiningCode getArtDerRichtlinieDefiningCode() { + return this.artDerRichtlinieDefiningCode ; + } + + public void setArtDerRichtlinieNullFlavourDefiningCode( + NullFlavour artDerRichtlinieNullFlavourDefiningCode) { + this.artDerRichtlinieNullFlavourDefiningCode = artDerRichtlinieNullFlavourDefiningCode; + } + + public NullFlavour getArtDerRichtlinieNullFlavourDefiningCode() { + return this.artDerRichtlinieNullFlavourDefiningCode ; + } + + public void setBeschreibungDefiningCode(BeschreibungDefiningCode beschreibungDefiningCode) { + this.beschreibungDefiningCode = beschreibungDefiningCode; + } + + public BeschreibungDefiningCode getBeschreibungDefiningCode() { + return this.beschreibungDefiningCode ; + } + + public void setBeschreibungNullFlavourDefiningCode( + NullFlavour beschreibungNullFlavourDefiningCode) { + this.beschreibungNullFlavourDefiningCode = beschreibungNullFlavourDefiningCode; + } + + public NullFlavour getBeschreibungNullFlavourDefiningCode() { + return this.beschreibungNullFlavourDefiningCode ; + } + + public void setEinzelheitenZurRichtlinie(List einzelheitenZurRichtlinie) { + this.einzelheitenZurRichtlinie = einzelheitenZurRichtlinie; + } + + public List getEinzelheitenZurRichtlinie() { + return this.einzelheitenZurRichtlinie ; + } + + public void setZeuge(List zeuge) { + this.zeuge = zeuge; + } + + public List getZeuge() { + return this.zeuge ; + } + + public void setErweiterung(List erweiterung) { + this.erweiterung = erweiterung; + } + + public List getErweiterung() { + return this.erweiterung ; + } + + public void setSubject(PartyProxy subject) { + this.subject = subject; + } + + public PartyProxy getSubject() { + return this.subject ; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public Language getLanguage() { + return this.language ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/DnrAnordnungEvaluationContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/DnrAnordnungEvaluationContainment.java new file mode 100644 index 000000000..b4b8d5eb0 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/DnrAnordnungEvaluationContainment.java @@ -0,0 +1,44 @@ +package org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.generic.PartyProxy; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +public class DnrAnordnungEvaluationContainment extends Containment { + public SelectAqlField DNR_ANORDNUNG_EVALUATION = new AqlFieldImp(DnrAnordnungEvaluation.class, "", "DnrAnordnungEvaluation", DnrAnordnungEvaluation.class, this); + + public SelectAqlField ART_DER_RICHTLINIE_DEFINING_CODE = new AqlFieldImp(DnrAnordnungEvaluation.class, "/data[at0001]/items[at0005]/value|defining_code", "artDerRichtlinieDefiningCode", ArtDerRichtlinieDefiningCode.class, this); + + public SelectAqlField ART_DER_RICHTLINIE_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp(DnrAnordnungEvaluation.class, "/data[at0001]/items[at0005]/null_flavour|defining_code", "artDerRichtlinieNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField BESCHREIBUNG_DEFINING_CODE = new AqlFieldImp(DnrAnordnungEvaluation.class, "/data[at0001]/items[at0006]/value|defining_code", "beschreibungDefiningCode", BeschreibungDefiningCode.class, this); + + public SelectAqlField BESCHREIBUNG_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp(DnrAnordnungEvaluation.class, "/data[at0001]/items[at0006]/null_flavour|defining_code", "beschreibungNullFlavourDefiningCode", NullFlavour.class, this); + + public ListSelectAqlField EINZELHEITEN_ZUR_RICHTLINIE = new ListAqlFieldImp(DnrAnordnungEvaluation.class, "/data[at0001]/items[at0052]", "einzelheitenZurRichtlinie", Cluster.class, this); + + public ListSelectAqlField ZEUGE = new ListAqlFieldImp(DnrAnordnungEvaluation.class, "/protocol[at0010]/items[at0025]", "zeuge", Cluster.class, this); + + public ListSelectAqlField ERWEITERUNG = new ListAqlFieldImp(DnrAnordnungEvaluation.class, "/protocol[at0010]/items[at0061]", "erweiterung", Cluster.class, this); + + public SelectAqlField SUBJECT = new AqlFieldImp(DnrAnordnungEvaluation.class, "/subject", "subject", PartyProxy.class, this); + + public SelectAqlField LANGUAGE = new AqlFieldImp(DnrAnordnungEvaluation.class, "/language", "language", Language.class, this); + + public SelectAqlField FEEDER_AUDIT = new AqlFieldImp(DnrAnordnungEvaluation.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + private DnrAnordnungEvaluationContainment() { + super("openEHR-EHR-EVALUATION.advance_care_directive.v1"); + } + + public static DnrAnordnungEvaluationContainment getInstance() { + return new DnrAnordnungEvaluationContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/DnrAnordnungKategorieElement.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/DnrAnordnungKategorieElement.java new file mode 100644 index 000000000..fe2ce4497 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/DnrAnordnungKategorieElement.java @@ -0,0 +1,59 @@ +package org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.LocatableEntity; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-10T09:43:22.111221+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +public class DnrAnordnungKategorieElement implements LocatableEntity { + /** + * Path: DNR-Anordnung/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/value|defining_code") + private KategorieDefiningCode value; + + /** + * Path: DNR-Anordnung/context/Baum/Kategorie/null_flavour + */ + @Path("/null_flavour|defining_code") + private NullFlavour value2; + + /** + * Path: DNR-Anordnung/context/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setValue(KategorieDefiningCode value) { + this.value = value; + } + + public KategorieDefiningCode getValue() { + return this.value ; + } + + public void setValue2(NullFlavour value2) { + this.value2 = value2; + } + + public NullFlavour getValue2() { + return this.value2 ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/KategorieDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/KategorieDefiningCode.java new file mode 100644 index 000000000..b9ec0b9a0 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/KategorieDefiningCode.java @@ -0,0 +1,39 @@ +package org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition; + +import java.lang.String; +import org.ehrbase.client.classgenerator.EnumValueSet; + +public enum KategorieDefiningCode implements EnumValueSet { + DO_NOT_RESUSCITATE("Do Not Resuscitate", "", "http://terminology.hl7.org/CodeSystem/consentcategorycodes", "dnr"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + KategorieDefiningCode(String value, String description, String terminologyId, String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/StatusDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/StatusDefiningCode.java new file mode 100644 index 000000000..bc24e8165 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/StatusDefiningCode.java @@ -0,0 +1,57 @@ +package org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition; + +import java.lang.String; +import org.ehrbase.client.classgenerator.EnumValueSet; + +public enum StatusDefiningCode implements EnumValueSet { + VORGESCHLAGEN("vorgeschlagen", "", "http://hl7.org/fhir/consent-state-codes", "vorgeschlagen"), + + VORLAEUFIG("vorläufig", "*", "http://hl7.org/fhir/consent-state-codes", "at0011"), + + FINAL("final", "*", "http://hl7.org/fhir/consent-state-codes", "at0012"), + + EINGABEFEHLER("Eingabefehler", "", "http://hl7.org/fhir/consent-state-codes", "Eingabefehler"), + + REGISTRIERT("registriert", "*", "http://hl7.org/fhir/consent-state-codes", "at0010"), + + VERWORFEN("verworfen", "", "http://hl7.org/fhir/consent-state-codes", "verworfen"), + + GEAENDERT("geändert", "*", "http://hl7.org/fhir/consent-state-codes", "at0013"), + + AKTIV("aktiv", "", "http://hl7.org/fhir/consent-state-codes", "aktiv"), + + INAKTIV("inaktiv", "", "http://hl7.org/fhir/consent-state-codes", "inaktiv"), + + ENTWORFEN("entworfen", "", "http://hl7.org/fhir/consent-state-codes", "entworfen"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + StatusDefiningCode(String value, String description, String terminologyId, String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java index 357dbe6b7..4596b6187 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java @@ -1,6 +1,7 @@ package org.ehrbase.fhirbridge.fhir.common; import org.hl7.fhir.r4.model.Condition; +import org.hl7.fhir.r4.model.Consent; import org.hl7.fhir.r4.model.DiagnosticReport; import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Patient; @@ -101,6 +102,10 @@ public enum Profile { RADIOLOGY_PROCEDURE(Procedure.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/radiology-procedures"), RESPIRATORY_THERAPIES_PROCEDURE(Procedure.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/respiratory-therapies"), + // Consent profiles + + DNR_ORDER(Consent.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/do-not-resuscitate-order"), + // QuestionnaireResponse Profiles DEFAULT_QUESTIONNAIRE_RESPONSE(QuestionnaireResponse.class, null); diff --git a/src/main/resources/opt/DNR-Anordnung.opt b/src/main/resources/opt/DNR-Anordnung.opt new file mode 100644 index 000000000..f12d304a9 --- /dev/null +++ b/src/main/resources/opt/DNR-Anordnung.opt @@ -0,0 +1,999 @@ + + + \ No newline at end of file diff --git a/src/main/resources/profiles/DoNotResuscitateOrder.xml b/src/main/resources/profiles/DoNotResuscitateOrder.xml new file mode 100644 index 000000000..6342f2c5d --- /dev/null +++ b/src/main/resources/profiles/DoNotResuscitateOrder.xml @@ -0,0 +1,4288 @@ + + + + + + <status value="active" /> + <date value="2020-10-29" /> + <publisher value="Charité" /> + <contact> + <telecom> + <system value="url" /> + <value value="https://www.bihealth.org/en/research/core-facilities/interoperability/" /> + </telecom> + </contact> + <description value="A do-not-resuscitate (DNR) order" /> + <fhirVersion value="4.0.1" /> + <mapping> + <identity value="workflow" /> + <uri value="http://hl7.org/fhir/workflow" /> + <name value="Workflow Pattern" /> + </mapping> + <mapping> + <identity value="v2" /> + <uri value="http://hl7.org/v2" /> + <name value="HL7 v2 Mapping" /> + </mapping> + <mapping> + <identity value="rim" /> + <uri value="http://hl7.org/v3" /> + <name value="RIM Mapping" /> + </mapping> + <mapping> + <identity value="w5" /> + <uri value="http://hl7.org/fhir/fivews" /> + <name value="FiveWs Pattern Mapping" /> + </mapping> + <kind value="resource" /> + <abstract value="false" /> + <type value="Consent" /> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Consent" /> + <derivation value="constraint" /> + <snapshot> + <element id="Consent"> + <path value="Consent" /> + <short value="A healthcare consumer's choices to permit or deny recipients or roles to perform actions for specific purposes and periods of time" /> + <definition value="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 value="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 value="0" /> + <max value="*" /> + <base> + <path value="Consent" /> + <min value="0" /> + <max value="*" /> + </base> + <constraint> + <key value="dom-2" /> + <severity value="error" /> + <human value="If the resource is contained in another resource, it SHALL NOT contain nested Resources" /> + <expression value="contained.contained.empty()" /> + <xpath value="not(parent::f:contained and f:contained)" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="dom-4" /> + <severity value="error" /> + <human value="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated" /> + <expression value="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()" /> + <xpath value="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="dom-3" /> + <severity value="error" /> + <human value="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 value="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 value="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 value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice"> + <valueBoolean value="true" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation"> + <valueMarkdown value="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." /> + </extension> + <key value="dom-6" /> + <severity value="warning" /> + <human value="A resource should have narrative for robust management" /> + <expression value="text.`div`.exists()" /> + <xpath value="exists(f:text/h:div)" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="dom-5" /> + <severity value="error" /> + <human value="If a resource is contained in another resource, it SHALL NOT have a security label" /> + <expression value="contained.meta.security.empty()" /> + <xpath value="not(exists(f:contained/*/f:meta/f:security))" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="ppc-4" /> + <severity value="error" /> + <human value="IF Scope=adr, there must be a patient" /> + <expression value="patient.exists() or scope.coding.where(system='something' and code='adr').exists().not()" /> + <xpath value="exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='adr'])))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Consent" /> + </constraint> + <constraint> + <key value="ppc-5" /> + <severity value="error" /> + <human value="IF Scope=treatment, there must be a patient" /> + <expression value="patient.exists() or scope.coding.where(system='something' and code='treatment').exists().not()" /> + <xpath value="exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='treatment'])))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Consent" /> + </constraint> + <constraint> + <key value="ppc-2" /> + <severity value="error" /> + <human value="IF Scope=privacy, there must be a patient" /> + <expression value="patient.exists() or scope.coding.where(system='something' and code='patient-privacy').exists().not()" /> + <xpath value="exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='patient-privacy'])))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Consent" /> + </constraint> + <constraint> + <key value="ppc-3" /> + <severity value="error" /> + <human value="IF Scope=research, there must be a patient" /> + <expression value="patient.exists() or scope.coding.where(system='something' and code='research').exists().not()" /> + <xpath value="exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='research'])))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Consent" /> + </constraint> + <constraint> + <key value="ppc-1" /> + <severity value="error" /> + <human value="Either a Policy or PolicyRule" /> + <expression value="policy.exists() or policyRule.exists()" /> + <xpath value="exists(f:policy) or exists(f:policyRule)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Consent" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="Entity. Role, or Act" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CON" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="FinancialConsent" /> + </mapping> + </element> + <element id="Consent.id"> + <path value="Consent.id" /> + <short value="Logical id of this artifact" /> + <definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <isSummary value="true" /> + </element> + <element id="Consent.meta"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.meta" /> + <short value="Metadata about the resource" /> + <definition value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.meta" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Meta" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Consent.implicitRules"> + <path value="Consent.implicitRules" /> + <short value="A set of rules under which this content was created" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.implicitRules" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="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 value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.language"> + <path value="Consent.language" /> + <short value="Language of the resource content" /> + <definition value="The base language in which the resource is written." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.language" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"> + <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="Language" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> + <valueBoolean value="true" /> + </extension> + <strength value="preferred" /> + <description value="A human language." /> + <valueSet value="http://hl7.org/fhir/ValueSet/languages" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.text" /> + <short value="Text summary of the resource, for human interpretation" /> + <definition value="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 value="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 value="narrative" /> + <alias value="html" /> + <alias value="xhtml" /> + <alias value="display" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="DomainResource.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Narrative" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Act.text?" /> + </mapping> + </element> + <element id="Consent.contained"> + <path value="Consent.contained" /> + <short value="Contained, inline Resources" /> + <definition value="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 value="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 value="inline resources" /> + <alias value="anonymous resources" /> + <alias value="contained resources" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.contained" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Resource" /> + </type> + <mapping> + <identity value="rim" /> + <map value="Entity. Role, or Act" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Consent.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Consent.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.modifierExtension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Extensions that cannot be ignored" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Consent.identifier"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.identifier" /> + <short value="Identifier for this record (external references)" /> + <definition value="Unique identifier for this copy of the Consent Statement." /> + <comment value="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 value="0" /> + <max value="*" /> + <base> + <path value="Consent.identifier" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Identifier" /> + </type> + <example> + <label value="General" /> + <valueIdentifier> + <system value="urn:ietf:rfc:3986" /> + <value value="Local eCMS identifier" /> + </valueIdentifier> + </example> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="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]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="Identifier" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.identifier" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.identifier" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".id" /> + </mapping> + </element> + <element id="Consent.status"> + <path value="Consent.status" /> + <short value="draft | proposed | active | rejected | inactive | entered-in-error" /> + <definition value="Indicates the current state of this consent." /> + <comment value="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 value="The Consent Directive that is pointed to might be in various lifecycle states, e.g., a revoked Consent Directive." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Consent.status" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="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 value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ConsentState" /> + </extension> + <strength value="required" /> + <description value="Indicates the state of the consent." /> + <valueSet value="http://hl7.org/fhir/ValueSet/consent-state-codes|4.0.1" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.status" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.status" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="HL7 Table 0498 - Consent Status" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".statusCode" /> + </mapping> + </element> + <element id="Consent.scope"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.scope" /> + <short value="Which of the four areas this resource covers (extensible)" /> + <definition value="A selector of the type of consent being presented: ADR, Privacy, Treatment, Research. This list is now extensible." /> + <comment value="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 value="1" /> + <max value="1" /> + <base> + <path value="Consent.scope" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isModifier value="true" /> + <isModifierReason value="Allows changes to codes based on scope selection" /> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ConsentScope" /> + </extension> + <strength value="extensible" /> + <description value="The four anticipated uses for the Consent Resource." /> + <valueSet value="http://hl7.org/fhir/ValueSet/consent-scope" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + </element> + <element id="Consent.scope.id"> + <path value="Consent.scope.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.scope.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.scope.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Consent.scope.coding"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.scope.coding" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Consent.scope.coding.id"> + <path value="Consent.scope.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.scope.coding.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.scope.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Consent.scope.coding.system"> + <path value="Consent.scope.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <fixedUri value="http://terminology.hl7.org/CodeSystem/consentscope" /> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Consent.scope.coding.version"> + <path value="Consent.scope.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Consent.scope.coding.code"> + <path value="Consent.scope.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <fixedCode value="adr" /> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Consent.scope.coding.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Consent.scope.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Consent.scope.coding.userSelected"> + <path value="Consent.scope.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Consent.scope.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Consent.scope.text" /> + <short value="Plain text representation of the concept" /> + <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="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 value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element id="Consent.category"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.category" /> + <short value="Classification of the consent statement - for indexing/retrieval" /> + <definition value="A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements." /> + <comment value="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 value="1" /> + <max value="*" /> + <base> + <path value="Consent.category" /> + <min value="1" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ConsentCategory" /> + </extension> + <strength value="extensible" /> + <description value="A classification of the type of consents found in a consent statement." /> + <valueSet value="http://hl7.org/fhir/ValueSet/consent-category" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.code" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.class" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="HL7 Table 0497 - Consent Type" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CNTRCT" /> + </mapping> + </element> + <element id="Consent.category.id"> + <path value="Consent.category.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.category.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.category.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Consent.category.coding"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.category.coding" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Consent.category.coding.id"> + <path value="Consent.category.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.category.coding.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.category.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Consent.category.coding.system"> + <path value="Consent.category.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <fixedUri value="http://terminology.hl7.org/CodeSystem/consentcategorycodes" /> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Consent.category.coding.version"> + <path value="Consent.category.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Consent.category.coding.code"> + <path value="Consent.category.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <fixedCode value="dnr" /> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Consent.category.coding.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Consent.category.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Consent.category.coding.userSelected"> + <path value="Consent.category.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Consent.category.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Consent.category.text" /> + <short value="Plain text representation of the concept" /> + <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="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 value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element id="Consent.patient"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.patient" /> + <short value="Who the consent applies to" /> + <definition value="The patient/healthcare consumer to whom this consent applies." /> + <comment value="Commonly, the patient the consent pertains to is the author, but for young and old people, it may be some other person." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Consent.patient" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Consent" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.subject" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.subject[x]" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Role" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.subject" /> + </mapping> + </element> + <element id="Consent.dateTime"> + <path value="Consent.dateTime" /> + <short value="When this Consent was created or indexed" /> + <definition value="When this Consent was issued / created / indexed." /> + <comment value="This is not the time of the original consent, but the time that this statement was made or derived." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Consent.dateTime" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.occurrence[x]" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.recorded" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Field 13/ Consent Decision Date" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="FinancialConsent effectiveTime" /> + </mapping> + </element> + <element id="Consent.performer"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.performer" /> + <short value="Who is agreeing to the policy and rules" /> + <definition value="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 value="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 value="consentor" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Consent.performer" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Consent" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.performer" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.actor" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Field 24/ ConsenterID" /> + </mapping> + </element> + <element id="Consent.organization"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.organization" /> + <short value="Custodian of the consent" /> + <definition value="The organization that manages the consent, and the framework within which it is executed." /> + <comment value="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 value="custodian" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Consent.organization" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Consent" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.performer" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.witness" /> + </mapping> + </element> + <element id="Consent.source[x]"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.source[x]" /> + <short value="Source from which this consent is taken" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Consent.source[x]" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Attachment" /> + </type> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Consent" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/DocumentReference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Contract" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="att-1" /> + <severity value="error" /> + <human value="If the Attachment has data, it SHALL have a contentType" /> + <expression value="data.empty() or contentType.exists()" /> + <xpath value="not(exists(f:data)) or exists(f:contentType)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Consent" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="ED/RP" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="ED" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Field 19 Informational Material Supplied Indicator" /> + </mapping> + </element> + <element id="Consent.policy"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.policy" /> + <short value="Policies covered by this consent" /> + <definition value="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 value="0" /> + <max value="*" /> + <base> + <path value="Consent.policy" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.policy.id"> + <path value="Consent.policy.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.policy.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.policy.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Consent.policy.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.policy.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Consent.policy.authority"> + <path value="Consent.policy.authority" /> + <short value="Enforcement source for policy" /> + <definition value="Entity or Organization having regulatory jurisdiction or accountability for enforcing policies pertaining to Consent Directives." /> + <comment value="see http://en.wikipedia.org/wiki/Uniform_resource_identifier" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Consent.policy.authority" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <condition value="ppc-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.policy.uri"> + <path value="Consent.policy.uri" /> + <short value="Specific policy covered by this consent" /> + <definition value="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 value="This element is for discoverability / documentation and does not modify or qualify the policy rules." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Consent.policy.uri" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <condition value="ppc-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.policyRule"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.policyRule" /> + <short value="Regulation that this consents to" /> + <definition value="A reference to the specific base computable regulation or policy." /> + <comment value="If the policyRule is absent, computable consent would need to be constructed from the elements of the Consent resource." /> + <requirements value="Might be a unique identifier of a policy set in XACML, or other rules engine." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Consent.policyRule" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <condition value="ppc-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ConsentPolicyRule" /> + </extension> + <strength value="extensible" /> + <description value="Regulatory policy examples." /> + <valueSet value="http://hl7.org/fhir/ValueSet/consent-policy" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + </element> + <element id="Consent.verification"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.verification" /> + <short value="Consent Verified by patient or family" /> + <definition value="Whether a treatment instruction (e.g. artificial respiration yes or no) was verified with the patient, his/her family or another authorized person." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Consent.verification" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.verification.id"> + <path value="Consent.verification.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.verification.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.verification.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Consent.verification.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.verification.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Consent.verification.verified"> + <path value="Consent.verification.verified" /> + <short value="Has been verified" /> + <definition value="Has the instruction been verified." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Consent.verification.verified" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.verification.verifiedWith"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.verification.verifiedWith" /> + <short value="Person who verified" /> + <definition value="Who verified the instruction (Patient, Relative or other Authorized Person)." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Consent.verification.verifiedWith" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Consent" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + </element> + <element id="Consent.verification.verificationDate"> + <path value="Consent.verification.verificationDate" /> + <short value="When consent verified" /> + <definition value="Date verification was collected." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Consent.verification.verificationDate" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.provision"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name"> + <valueString value="provision" /> + </extension> + <path value="Consent.provision" /> + <short value="Constraints to the base Consent.policyRule" /> + <definition value="An exception to the base policy of this consent. An exception can be an addition or removal of access permissions." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Consent.provision" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.provision.id"> + <path value="Consent.provision.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.provision.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.provision.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Consent.provision.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.provision.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Consent.provision.type"> + <path value="Consent.provision.type" /> + <short value="deny | permit" /> + <definition value="Action to take - permit or deny - when the rule conditions are met. Not permitted in root rule, required in all nested rules." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Consent.provision.type" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ConsentProvisionType" /> + </extension> + <strength value="required" /> + <description value="How a rule statement is applied, such as adding additional consent or removing consent." /> + <valueSet value="http://hl7.org/fhir/ValueSet/consent-provision-type|4.0.1" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.provision.period"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.provision.period" /> + <short value="Timeframe for this rule" /> + <definition value="The timeframe in this rule is valid." /> + <comment value="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"). Period is not used for a duration (a measure of elapsed time). See [Duration](datatypes.html#Duration)." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Consent.provision.period" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="per-1" /> + <severity value="error" /> + <human value="If present, start SHALL have a lower value than end" /> + <expression value="start.hasValue().not() or end.hasValue().not() or (start <= end)" /> + <xpath value="not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Consent" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]" /> + </mapping> + </element> + <element id="Consent.provision.actor"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name"> + <valueString value="provisionActor" /> + </extension> + <path value="Consent.provision.actor" /> + <short value="Who|what controlled by this rule (or group, by role)" /> + <definition value="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 value="0" /> + <max value="*" /> + <base> + <path value="Consent.provision.actor" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <meaningWhenMissing value="There is no specific actor associated with the exception" /> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.provision.actor.id"> + <path value="Consent.provision.actor.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.provision.actor.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.provision.actor.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Consent.provision.actor.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.provision.actor.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Consent.provision.actor.role"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.provision.actor.role" /> + <short value="How the actor is involved" /> + <definition value="How the individual is involved in the resources content that is described in the exception." /> + <comment value="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 value="1" /> + <max value="1" /> + <base> + <path value="Consent.provision.actor.role" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ConsentActorRole" /> + </extension> + <strength value="extensible" /> + <description value="How an actor is involved in the consent considerations." /> + <valueSet value="http://hl7.org/fhir/ValueSet/security-role-type" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + </element> + <element id="Consent.provision.actor.reference"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.provision.actor.reference" /> + <short value="Resource for the actor (or group, by role)" /> + <definition value="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 value="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 value="1" /> + <max value="1" /> + <base> + <path value="Consent.provision.actor.reference" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Group" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/CareTeam" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Consent" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + </element> + <element id="Consent.provision.action"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.provision.action" /> + <short value="Actions controlled by this rule" /> + <definition value="Actions controlled by this Rule." /> + <comment value="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 value="0" /> + <max value="*" /> + <base> + <path value="Consent.provision.action" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <meaningWhenMissing value="all actions" /> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ConsentAction" /> + </extension> + <strength value="example" /> + <description value="Detailed codes for the consent action." /> + <valueSet value="http://hl7.org/fhir/ValueSet/consent-action" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + </element> + <element id="Consent.provision.securityLabel"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.provision.securityLabel" /> + <short value="Security Labels that define affected resources" /> + <definition value="A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception." /> + <comment value="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 value="0" /> + <max value="*" /> + <base> + <path value="Consent.provision.securityLabel" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="SecurityLabels" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> + <valueBoolean value="true" /> + </extension> + <strength value="extensible" /> + <description value="Security Labels from the Healthcare Privacy and Security Classification System." /> + <valueSet value="http://hl7.org/fhir/ValueSet/security-labels" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + </element> + <element id="Consent.provision.purpose"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.provision.purpose" /> + <short value="Context of activities covered by this rule" /> + <definition value="The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule." /> + <comment value="When the purpose of use tag is on the data, access request purpose of use shall not conflict." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Consent.provision.purpose" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="PurposeOfUse" /> + </extension> + <strength value="extensible" /> + <description value="What purposes of use are controlled by this exception. If more than one label is specified, operations must have all the specified labels." /> + <valueSet value="http://terminology.hl7.org/ValueSet/v3-PurposeOfUse" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + </element> + <element id="Consent.provision.class"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.provision.class" /> + <short value="e.g. Resource Type, Profile, CDA, etc." /> + <definition value="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 value="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 value="0" /> + <max value="*" /> + <base> + <path value="Consent.provision.class" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ConsentContentClass" /> + </extension> + <strength value="extensible" /> + <description value="The class (type) of information a consent rule covers." /> + <valueSet value="http://hl7.org/fhir/ValueSet/consent-content-class" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + </element> + <element id="Consent.provision.code"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.provision.code" /> + <short value="e.g. LOINC or SNOMED CT code, etc. in the content" /> + <definition value="If this code is found in an instance, then the rule applies." /> + <comment value="Typical use of this is a Document code with class = CDA." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Consent.provision.code" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="If this code is found in an instance, then the exception applies." /> + <valueSet value="https://www.netzwerk-universitaetsmedizin.de/fhir/ValueSet/resuscitation-status" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + </element> + <element id="Consent.provision.code.id"> + <path value="Consent.provision.code.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.provision.code.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.provision.code.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Consent.provision.code.coding"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.provision.code.coding" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Consent.provision.code.coding.id"> + <path value="Consent.provision.code.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.provision.code.coding.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.provision.code.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Consent.provision.code.coding.system"> + <path value="Consent.provision.code.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Consent.provision.code.coding.version"> + <path value="Consent.provision.code.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Consent.provision.code.coding.code"> + <path value="Consent.provision.code.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Consent.provision.code.coding.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Consent.provision.code.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Consent.provision.code.coding.userSelected"> + <path value="Consent.provision.code.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Consent.provision.code.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Consent.provision.code.text" /> + <short value="Plain text representation of the concept" /> + <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="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 value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element id="Consent.provision.dataPeriod"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.provision.dataPeriod" /> + <short value="Timeframe for data controlled by this rule" /> + <definition value="Clinical or Operational Relevant period of time that bounds the data controlled by this rule." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Consent.provision.dataPeriod" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="per-1" /> + <severity value="error" /> + <human value="If present, start SHALL have a lower value than end" /> + <expression value="start.hasValue().not() or end.hasValue().not() or (start <= end)" /> + <xpath value="not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Consent" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]" /> + </mapping> + </element> + <element id="Consent.provision.data"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name"> + <valueString value="provisionData" /> + </extension> + <path value="Consent.provision.data" /> + <short value="Data controlled by this rule" /> + <definition value="The resources controlled by this rule if specific resources are referenced." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Consent.provision.data" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <meaningWhenMissing value="all data" /> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Role" /> + </mapping> + </element> + <element id="Consent.provision.data.id"> + <path value="Consent.provision.data.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.provision.data.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.provision.data.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Consent.provision.data.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.provision.data.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Consent.provision.data.meaning"> + <path value="Consent.provision.data.meaning" /> + <short value="instance | related | dependents | authoredby" /> + <definition value="How the resource reference is interpreted when testing consent restrictions." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Consent.provision.data.meaning" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ConsentDataMeaning" /> + </extension> + <strength value="required" /> + <description value="How a resource reference is interpreted when testing consent restrictions." /> + <valueSet value="http://hl7.org/fhir/ValueSet/consent-data-meaning|4.0.1" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Consent.provision.data.reference"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Consent.provision.data.reference" /> + <short value="The actual data reference" /> + <definition value="A reference to a specific resource that defines which resources are covered by this consent." /> + <comment value="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 value="1" /> + <max value="1" /> + <base> + <path value="Consent.provision.data.reference" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Consent" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + </element> + <element id="Consent.provision.provision"> + <path value="Consent.provision.provision" /> + <short value="Nested Exception Rules" /> + <definition value="Rules which provide exceptions to the base rule or subrules." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Consent.provision.provision" /> + <min value="0" /> + <max value="*" /> + </base> + <contentReference value="#Consent.provision" /> + </element> + </snapshot> + <differential> + <element id="Consent.scope"> + <path value="Consent.scope" /> + <mustSupport value="true" /> + </element> + <element id="Consent.scope.coding"> + <path value="Consent.scope.coding" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Consent.scope.coding.system"> + <path value="Consent.scope.coding.system" /> + <min value="1" /> + <fixedUri value="http://terminology.hl7.org/CodeSystem/consentscope" /> + </element> + <element id="Consent.scope.coding.code"> + <path value="Consent.scope.coding.code" /> + <min value="1" /> + <fixedCode value="adr" /> + </element> + <element id="Consent.category"> + <path value="Consent.category" /> + <mustSupport value="true" /> + </element> + <element id="Consent.category.coding"> + <path value="Consent.category.coding" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Consent.category.coding.system"> + <path value="Consent.category.coding.system" /> + <min value="1" /> + <fixedUri value="http://terminology.hl7.org/CodeSystem/consentcategorycodes" /> + </element> + <element id="Consent.category.coding.code"> + <path value="Consent.category.coding.code" /> + <min value="1" /> + <fixedCode value="dnr" /> + </element> + <element id="Consent.patient"> + <path value="Consent.patient" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Consent.provision"> + <path value="Consent.provision" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Consent.provision.code"> + <path value="Consent.provision.code" /> + <min value="1" /> + <max value="1" /> + <mustSupport value="true" /> + <binding> + <strength value="required" /> + <valueSet value="https://www.netzwerk-universitaetsmedizin.de/fhir/ValueSet/resuscitation-status" /> + </binding> + </element> + <element id="Consent.provision.code.coding"> + <path value="Consent.provision.code.coding" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Consent.provision.code.coding.system"> + <path value="Consent.provision.code.coding.system" /> + <min value="1" /> + </element> + <element id="Consent.provision.code.coding.code"> + <path value="Consent.provision.code.coding.code" /> + <min value="1" /> + </element> + </differential> +</StructureDefinition> \ No newline at end of file diff --git a/src/test/resources/DNR/Consent-example-duplicate-2.json b/src/test/resources/DNR/Consent-example-duplicate-2.json new file mode 100644 index 000000000..3389782b2 --- /dev/null +++ b/src/test/resources/DNR/Consent-example-duplicate-2.json @@ -0,0 +1,54 @@ +{ + "resourceType": "Consent", + "id": "7976c6e2-1b4c-4af5-99d7-a701e7f43472", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/do-not-resuscitate-order" + ] + }, + "status": "active", + "scope": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/consentscope", + "code": "adr", + "display": "Advanced Care Directive" + } + ] + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/consentcategorycodes", + "code": "dnr", + "display": "Do Not Resuscitate" + } + ] + } + ], + "patient": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "policy": [ + { + "uri": "https://www.aerzteblatt.de/archiv/65440/DNR-Anordnungen-Das-fehlende-Bindeglied" + } + ], + "provision": { + "code": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "304253006", + "display": "Not for resuscitation" + } + ] + } + ] + } +} diff --git a/src/test/resources/DNR/Consent-example-duplicate-3.json b/src/test/resources/DNR/Consent-example-duplicate-3.json new file mode 100644 index 000000000..aa87ebb57 --- /dev/null +++ b/src/test/resources/DNR/Consent-example-duplicate-3.json @@ -0,0 +1,54 @@ +{ + "resourceType": "Consent", + "id": "0432107d-0a5f-4767-aa93-b9353b2392c9", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/do-not-resuscitate-order" + ] + }, + "status": "active", + "scope": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/consentscope", + "code": "adr", + "display": "Advanced Care Directive" + } + ] + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/consentcategorycodes", + "code": "dnr", + "display": "Do Not Resuscitate" + } + ] + } + ], + "patient": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "policy": [ + { + "uri": "https://www.aerzteblatt.de/archiv/65440/DNR-Anordnungen-Das-fehlende-Bindeglied" + } + ], + "provision": { + "code": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "261665006", + "display": "Unknown" + } + ] + } + ] + } +} diff --git a/src/test/resources/DNR/Consent-example.json b/src/test/resources/DNR/Consent-example.json new file mode 100644 index 000000000..666acaaab --- /dev/null +++ b/src/test/resources/DNR/Consent-example.json @@ -0,0 +1,54 @@ +{ + "resourceType": "Consent", + "id": "e1c90e84-aa7b-4999-8036-27f88dd7b60e", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/do-not-resuscitate-order" + ] + }, + "status": "active", + "scope": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/consentscope", + "code": "adr", + "display": "Advanced Care Directive" + } + ] + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/consentcategorycodes", + "code": "dnr", + "display": "Do Not Resuscitate" + } + ] + } + ], + "patient": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "policy": [ + { + "uri": "https://www.aerzteblatt.de/archiv/65440/DNR-Anordnungen-Das-fehlende-Bindeglied" + } + ], + "provision": { + "code": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "304252001", + "display": "For resuscitation" + } + ] + } + ] + } +} From c7e249420f23e33018fb605c8b63770a8bf58509 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Mon, 12 Apr 2021 15:28:48 +0200 Subject: [PATCH 002/141] Start implementation of issue #294 --- docker/docker-compose-demo.yml | 8 +- docker/docker-compose-dev-postgres.yml | 1 + docker/docker-compose-dev.yml | 1 + docker/docker-compose-full.yml | 1 + docker/docker-compose-light-postgres.yml | 1 + docker/docker-compose-light.yml | 1 + docker/docker-compose.yml | 1 + .../config/EhrbaseConfiguration.java | 2 +- .../fhirbridge/config/EhrbaseProperties.java | 30 +++++-- .../config/EhrbaseTemplateInitializer.java | 90 +++++++++++++++++-- .../config/HttpClientConfiguration.java | 2 +- .../ehr/ResourceTemplateProvider.java | 2 +- .../converter/generic/AbstractConverter.java | 2 +- src/main/resources/application.yml | 4 +- 14 files changed, 127 insertions(+), 19 deletions(-) diff --git a/docker/docker-compose-demo.yml b/docker/docker-compose-demo.yml index c2ff58c57..6e45c60f3 100644 --- a/docker/docker-compose-demo.yml +++ b/docker/docker-compose-demo.yml @@ -21,7 +21,13 @@ services: DB_URL: jdbc:postgresql://ehrbase-db:5432/ehrbase DB_USER: ehrbase DB_PASS: ehrbase - AUTH_TYPE: NONE + SECURITY_AUTHTYPE: BASIC + SECURITY_AUTHUSER: myuser + SECURITY_AUTHPASSWORD: myPassword432 + SECURITY_AUTHADMINUSER: myadmin + SECURITY_AUTHADMINPASSWORD: mySuperAwesomePassword123 + SYSTEM_NAME: local.ehrbase.org + ADMIN_API_ACTIVE: 'true' depends_on: - ehrbase-db fhir-bridge: diff --git a/docker/docker-compose-dev-postgres.yml b/docker/docker-compose-dev-postgres.yml index 43aa4065f..e80a9ce9c 100644 --- a/docker/docker-compose-dev-postgres.yml +++ b/docker/docker-compose-dev-postgres.yml @@ -16,6 +16,7 @@ services: SECURITY_AUTHADMINUSER: myadmin SECURITY_AUTHADMINPASSWORD: mySuperAwesomePassword123 SYSTEM_NAME: local.ehrbase.org + ADMIN_API_ACTIVE: 'true' depends_on: - ehrbase-db restart: on-failure diff --git a/docker/docker-compose-dev.yml b/docker/docker-compose-dev.yml index cd2022b48..fade84441 100644 --- a/docker/docker-compose-dev.yml +++ b/docker/docker-compose-dev.yml @@ -16,6 +16,7 @@ services: SECURITY_AUTHADMINUSER: myadmin SECURITY_AUTHADMINPASSWORD: mySuperAwesomePassword123 SYSTEM_NAME: local.ehrbase.org + ADMIN_API_ACTIVE: 'true' depends_on: - ehrbase-db restart: on-failure diff --git a/docker/docker-compose-full.yml b/docker/docker-compose-full.yml index a9002f43e..a46e6da88 100644 --- a/docker/docker-compose-full.yml +++ b/docker/docker-compose-full.yml @@ -16,6 +16,7 @@ services: SECURITY_AUTHADMINUSER: myadmin SECURITY_AUTHADMINPASSWORD: mySuperAwesomePassword123 SYSTEM_NAME: local.ehrbase.org + ADMIN_API_ACTIVE: 'true' depends_on: - ehrbase-db restart: on-failure diff --git a/docker/docker-compose-light-postgres.yml b/docker/docker-compose-light-postgres.yml index dc2fde567..60ce9ec0a 100644 --- a/docker/docker-compose-light-postgres.yml +++ b/docker/docker-compose-light-postgres.yml @@ -16,6 +16,7 @@ services: SECURITY_AUTHADMINUSER: myadmin SECURITY_AUTHADMINPASSWORD: mySuperAwesomePassword123 SYSTEM_NAME: local.ehrbase.org + ADMIN_API_ACTIVE: 'true' depends_on: - ehrbase-db restart: on-failure diff --git a/docker/docker-compose-light.yml b/docker/docker-compose-light.yml index fdb2619ea..bd25f819a 100644 --- a/docker/docker-compose-light.yml +++ b/docker/docker-compose-light.yml @@ -16,6 +16,7 @@ services: SECURITY_AUTHADMINUSER: myadmin SECURITY_AUTHADMINPASSWORD: mySuperAwesomePassword123 SYSTEM_NAME: local.ehrbase.org + ADMIN_API_ACTIVE: 'true' depends_on: - ehrbase-db restart: on-failure diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index cd2022b48..fade84441 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -16,6 +16,7 @@ services: SECURITY_AUTHADMINUSER: myadmin SECURITY_AUTHADMINPASSWORD: mySuperAwesomePassword123 SYSTEM_NAME: local.ehrbase.org + ADMIN_API_ACTIVE: 'true' depends_on: - ehrbase-db restart: on-failure diff --git a/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseConfiguration.java index 7fc98a63e..e092226c7 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseConfiguration.java @@ -54,7 +54,7 @@ private HttpClient httpClient() { EhrbaseProperties.Security security = properties.getSecurity(); if (security.getType() == AuthorizationType.BASIC_AUTH) { CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); - credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(security.getUsername(), security.getPassword())); + credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(security.getUser(), security.getPassword())); builder.setDefaultCredentialsProvider(credentialsProvider); } diff --git a/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseProperties.java b/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseProperties.java index 5a9a79ddc..3cd51c2a5 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseProperties.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseProperties.java @@ -35,10 +35,14 @@ public static class Security { private AuthorizationType type; - private String username; + private String user; private String password; + private String adminUser; + + private String adminPassword; + public AuthorizationType getType() { return type; } @@ -47,12 +51,12 @@ public void setType(AuthorizationType type) { this.type = type; } - public String getUsername() { - return username; + public String getUser() { + return user; } - public void setUsername(String username) { - this.username = username; + public void setUser(String user) { + this.user = user; } public String getPassword() { @@ -62,6 +66,22 @@ public String getPassword() { public void setPassword(String password) { this.password = password; } + + public String getAdminUser() { + return adminUser; + } + + public void setAdminUser(String adminUser) { + this.adminUser = adminUser; + } + + public String getAdminPassword() { + return adminPassword; + } + + public void setAdminPassword(String adminPassword) { + this.adminPassword = adminPassword; + } } public static class Template { diff --git a/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseTemplateInitializer.java b/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseTemplateInitializer.java index 36421da4d..c6a1b2758 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseTemplateInitializer.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseTemplateInitializer.java @@ -1,30 +1,104 @@ package org.ehrbase.fhirbridge.config; +import org.apache.http.HttpResponse; +import org.apache.http.auth.AuthScope; +import org.apache.http.auth.UsernamePasswordCredentials; +import org.apache.http.client.CredentialsProvider; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpPut; +import org.apache.http.entity.ContentType; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.BasicCredentialsProvider; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.xmlbeans.XmlOptions; import org.ehrbase.client.openehrclient.OpenEhrClient; +import org.ehrbase.fhirbridge.config.ehrbase.AuthorizationType; import org.ehrbase.fhirbridge.ehr.ResourceTemplateProvider; +import org.openehr.schemas.v1.OPERATIONALTEMPLATE; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.InitializingBean; +import org.springframework.http.HttpStatus; +import org.springframework.web.util.UriComponentsBuilder; + +import javax.xml.namespace.QName; +import java.io.IOException; +import java.net.URI; +import java.util.Optional; public class EhrbaseTemplateInitializer implements InitializingBean { private static final Logger LOG = LoggerFactory.getLogger(EhrbaseTemplateInitializer.class); - private final OpenEhrClient openEhrClient; + private final EhrbaseProperties properties; private final ResourceTemplateProvider templateProvider; - public EhrbaseTemplateInitializer(OpenEhrClient openEhrClient, ResourceTemplateProvider templateProvider) { - this.openEhrClient = openEhrClient; + private final OpenEhrClient openEhrClient; + + private final HttpClient httpClient; + + public EhrbaseTemplateInitializer(EhrbaseProperties properties, ResourceTemplateProvider templateProvider, OpenEhrClient openEhrClient) { + this.properties = properties; this.templateProvider = templateProvider; + this.openEhrClient = openEhrClient; + this.httpClient = adminHttpClient(); } @Override public void afterPropertiesSet() { - templateProvider.getTemplateIds() - .forEach(templateId -> { - LOG.info("Initializing template '{}'", templateId); - openEhrClient.templateEndpoint().ensureExistence(templateId); - }); + for (String templateId : templateProvider.getTemplateIds()) { + LOG.info("Initializing template '{}'", templateId); + + Optional<OPERATIONALTEMPLATE> ehrbaseTemplate = openEhrClient.templateEndpoint() + .findTemplate(templateId); + + if (ehrbaseTemplate.isEmpty()) { + createTemplate(templateId); + } else { + updateTemplate(templateId); + } + } + } + + private void createTemplate(String templateId) { + openEhrClient.templateEndpoint().ensureExistence(templateId); + } + + private void updateTemplate(String templateId) { + OPERATIONALTEMPLATE fhirBridgeTemplate = templateProvider.find(templateId) + .orElseThrow(() -> new IllegalStateException("Failed to load template with id " + templateId)); + + HttpResponse response; + try { + URI uri = UriComponentsBuilder.fromHttpUrl(properties.getBaseUrl()) + .path("/admin/template/{templateId}") + .build(templateId); + + XmlOptions options = new XmlOptions(); + options.setSaveSyntheticDocumentElement(new QName("http://schemas.openehr.org/v1", "template")); + + HttpPut request = new HttpPut(uri); + request.setEntity(new StringEntity(fhirBridgeTemplate.xmlText(options), ContentType.APPLICATION_XML)); + response = httpClient.execute(request); + } catch (IOException e) { + throw new IllegalStateException("An error occurred while sending the template with id " + templateId); + } + + HttpStatus status = HttpStatus.valueOf(response.getStatusLine().getStatusCode()); + if (status.isError()) { + throw new IllegalStateException("An error occurred in EHRbase while updating the template with id " + templateId); + } + } + + private HttpClient adminHttpClient() { + HttpClientBuilder builder = HttpClientBuilder.create(); + EhrbaseProperties.Security security = properties.getSecurity(); + if (security.getType() == AuthorizationType.BASIC_AUTH) { + CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); + credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(security.getAdminUser(), security.getAdminPassword())); + builder.setDefaultCredentialsProvider(credentialsProvider); + } + return builder.build(); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/config/HttpClientConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/HttpClientConfiguration.java index 994c4c3ea..218d198de 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/HttpClientConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/HttpClientConfiguration.java @@ -24,7 +24,7 @@ */ @Configuration @EnableConfigurationProperties(HttpClientProperties.class) -public class HttpClientConfiguration { +public class HttpClientConfiguration { @Bean diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/ResourceTemplateProvider.java b/src/main/java/org/ehrbase/fhirbridge/ehr/ResourceTemplateProvider.java index d293b1c1f..e533398a3 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/ResourceTemplateProvider.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/ResourceTemplateProvider.java @@ -1,8 +1,8 @@ package org.ehrbase.fhirbridge.ehr; import org.apache.xmlbeans.XmlException; -import org.ehrbase.webtemplate.templateprovider.TemplateProvider; import org.ehrbase.fhirbridge.FhirBridgeException; +import org.ehrbase.webtemplate.templateprovider.TemplateProvider; import org.openehr.schemas.v1.OPERATIONALTEMPLATE; import org.openehr.schemas.v1.TemplateDocument; import org.springframework.beans.factory.InitializingBean; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/AbstractConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/AbstractConverter.java index da1d08f80..e69152ee4 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/AbstractConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/AbstractConverter.java @@ -38,7 +38,7 @@ public abstract class AbstractConverter<S extends Resource, T extends RMEntity> protected FeederAudit buildFeederAudit(@NonNull S resource) { FeederAudit result = new FeederAudit(); String systemId = resource.getMeta().hasSource() ? resource.getMeta().getSource() : DEFAULT_SYSTEM_ID; - result.setOriginatingSystemAudit(new FeederAuditDetails(systemId, null, null, null, null, null)); + result.setOriginatingSystemAudit(new FeederAuditDetails(systemId, null, null, null, null, null, null)); DvIdentifier identifier = new DvIdentifier(); identifier.setId(resource.getId()); identifier.setType("fhir_logical_id"); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index d7348f889..def0ab19f 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -3,8 +3,10 @@ fhir-bridge: base-url: http://localhost:8080/ehrbase/rest/openehr/v1/ security: type: basic_auth - username: myuser + user: myuser password: myPassword432 + admin-user: myadmin + admin-password: mySuperAwesomePassword123 template: prefix: classpath:/opt/ composition: From 0e9d3dc0587762226b26a83e046624b98c5d1dfa Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Mon, 12 Apr 2021 18:51:24 +0200 Subject: [PATCH 003/141] Move from Apache HttpClient to Spring WebClient --- pom.xml | 4 ++ .../config/EhrbaseTemplateInitializer.java | 64 ++++++++----------- 2 files changed, 31 insertions(+), 37 deletions(-) diff --git a/pom.xml b/pom.xml index 4639f1999..077285bd4 100644 --- a/pom.xml +++ b/pom.xml @@ -228,6 +228,10 @@ <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-webflux</artifactId> + </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> diff --git a/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseTemplateInitializer.java b/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseTemplateInitializer.java index c6a1b2758..c47a69c02 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseTemplateInitializer.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseTemplateInitializer.java @@ -1,15 +1,5 @@ package org.ehrbase.fhirbridge.config; -import org.apache.http.HttpResponse; -import org.apache.http.auth.AuthScope; -import org.apache.http.auth.UsernamePasswordCredentials; -import org.apache.http.client.CredentialsProvider; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpPut; -import org.apache.http.entity.ContentType; -import org.apache.http.entity.StringEntity; -import org.apache.http.impl.client.BasicCredentialsProvider; -import org.apache.http.impl.client.HttpClientBuilder; import org.apache.xmlbeans.XmlOptions; import org.ehrbase.client.openehrclient.OpenEhrClient; import org.ehrbase.fhirbridge.config.ehrbase.AuthorizationType; @@ -18,11 +8,13 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.InitializingBean; -import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.web.reactive.function.client.ExchangeFilterFunctions; +import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.reactive.function.client.WebClientException; import org.springframework.web.util.UriComponentsBuilder; import javax.xml.namespace.QName; -import java.io.IOException; import java.net.URI; import java.util.Optional; @@ -36,13 +28,13 @@ public class EhrbaseTemplateInitializer implements InitializingBean { private final OpenEhrClient openEhrClient; - private final HttpClient httpClient; + private final WebClient webClient; public EhrbaseTemplateInitializer(EhrbaseProperties properties, ResourceTemplateProvider templateProvider, OpenEhrClient openEhrClient) { this.properties = properties; this.templateProvider = templateProvider; this.openEhrClient = openEhrClient; - this.httpClient = adminHttpClient(); + this.webClient = adminWebClient(); } @Override @@ -69,36 +61,34 @@ private void updateTemplate(String templateId) { OPERATIONALTEMPLATE fhirBridgeTemplate = templateProvider.find(templateId) .orElseThrow(() -> new IllegalStateException("Failed to load template with id " + templateId)); - HttpResponse response; - try { - URI uri = UriComponentsBuilder.fromHttpUrl(properties.getBaseUrl()) - .path("/admin/template/{templateId}") - .build(templateId); - - XmlOptions options = new XmlOptions(); - options.setSaveSyntheticDocumentElement(new QName("http://schemas.openehr.org/v1", "template")); - - HttpPut request = new HttpPut(uri); - request.setEntity(new StringEntity(fhirBridgeTemplate.xmlText(options), ContentType.APPLICATION_XML)); - response = httpClient.execute(request); - } catch (IOException e) { - throw new IllegalStateException("An error occurred while sending the template with id " + templateId); - } + XmlOptions options = new XmlOptions(); + options.setSaveSyntheticDocumentElement(new QName("http://schemas.openehr.org/v1", "template")); + + URI uri = UriComponentsBuilder.fromHttpUrl(properties.getBaseUrl()) + .path("/admin/template/{templateId}") + .build(templateId); - HttpStatus status = HttpStatus.valueOf(response.getStatusLine().getStatusCode()); - if (status.isError()) { - throw new IllegalStateException("An error occurred in EHRbase while updating the template with id " + templateId); + try { + webClient.put() + .uri(uri) + .contentType(MediaType.APPLICATION_XML) + .bodyValue(fhirBridgeTemplate.xmlText(options)) + .retrieve() + .bodyToMono(String.class) + .block(); + } catch (WebClientException e) { + throw new IllegalStateException("An error occurred while updating the template with id " + templateId + " in EHRbase"); } } - private HttpClient adminHttpClient() { - HttpClientBuilder builder = HttpClientBuilder.create(); + private WebClient adminWebClient() { + WebClient.Builder builder = WebClient.builder(); + EhrbaseProperties.Security security = properties.getSecurity(); if (security.getType() == AuthorizationType.BASIC_AUTH) { - CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); - credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(security.getAdminUser(), security.getAdminPassword())); - builder.setDefaultCredentialsProvider(credentialsProvider); + builder.filter(ExchangeFilterFunctions.basicAuthentication(security.getAdminUser(), security.getAdminPassword())); } + return builder.build(); } } From 920d72ac9aee337116338d7e8894647b8fdaa96f Mon Sep 17 00:00:00 2001 From: Erik Tute <eriktute@mx.de> Date: Mon, 19 Apr 2021 08:45:38 +0200 Subject: [PATCH 004/141] Fixed some errors --- .../config/ConversionConfiguration.java | 3 +- .../ConsentToCompositionConverter.java | 21 ++++++ .../DnrAnordnungCompositionConverter.java} | 36 ++------- .../DNRAnordnungComposition.java | 3 +- .../definition/BeschreibungDefiningCode.java | 6 +- .../fhirbridge/fhir/consent/DnrIT.java | 75 +++++++++++++++++++ .../consent-example-duplicate-2.json} | 0 .../consent-example-duplicate-3.json} | 0 .../consent-example-invalid-status.json | 54 +++++++++++++ .../consent-example.json} | 0 .../Consent/paragon-consent-dnr-normal.json | 54 +++++++++++++ 11 files changed, 218 insertions(+), 34 deletions(-) create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConsentToCompositionConverter.java rename src/main/java/org/ehrbase/fhirbridge/ehr/converter/{DNRAnordnungCompositionConverter.java => specific/DnrAnordnung/DnrAnordnungCompositionConverter.java} (70%) create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/consent/DnrIT.java rename src/test/resources/{DNR/Consent-example-duplicate-2.json => Consent/consent-example-duplicate-2.json} (100%) rename src/test/resources/{DNR/Consent-example-duplicate-3.json => Consent/consent-example-duplicate-3.json} (100%) create mode 100644 src/test/resources/Consent/consent-example-invalid-status.json rename src/test/resources/{DNR/Consent-example.json => Consent/consent-example.json} (100%) create mode 100644 src/test/resources/Consent/paragon-consent-dnr-normal.json diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java index 56173adbd..4bf9c009a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java @@ -1,6 +1,7 @@ package org.ehrbase.fhirbridge.config; import org.ehrbase.fhirbridge.ehr.converter.ConversionService; +import org.ehrbase.fhirbridge.ehr.converter.specific.DnrAnordnung.DnrAnordnungCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.bloodgas.BloodGasPanelCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.bloodpressure.BloodPressureCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.bodyheight.BodyHeightCompositionConverter; @@ -71,7 +72,7 @@ private void registerConditionConverters(ConversionService conversionService) { } private void registerConsentConverters(ConversionService conversionService) { - conversionService.registerConverter(Profile.DO_NOT_RESUSCITATE_ORDER, null); // TODO: @ErikTute, add your converter + conversionService.registerConverter(Profile.DO_NOT_RESUSCITATE_ORDER, new DnrAnordnungCompositionConverter()); } private void registerDiagnosticReportConverters(ConversionService conversionService) { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConsentToCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConsentToCompositionConverter.java new file mode 100644 index 000000000..97e16478c --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConsentToCompositionConverter.java @@ -0,0 +1,21 @@ +package org.ehrbase.fhirbridge.ehr.converter.generic; + +import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; +import org.hl7.fhir.r4.model.Consent; +import org.hl7.fhir.r4.model.DateTimeType; +import org.hl7.fhir.r4.model.Extension; +import org.hl7.fhir.r4.model.Patient; +import org.springframework.lang.NonNull; + +import java.time.Instant; +import java.time.ZonedDateTime; + +public abstract class ConsentToCompositionConverter<C extends CompositionEntity> extends CompositionConverter<Consent, C> { + + @Override + public C convert(@NonNull Consent resource) { + C composition = super.convert(resource); + composition.setStartTimeValue(Instant.now()); + return composition; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/DNRAnordnungCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/DnrAnordnung/DnrAnordnungCompositionConverter.java similarity index 70% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/DNRAnordnungCompositionConverter.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/DnrAnordnung/DnrAnordnungCompositionConverter.java index 7e690f8ec..f2e6488dc 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/DNRAnordnungCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/DnrAnordnung/DnrAnordnungCompositionConverter.java @@ -1,11 +1,9 @@ -package org.ehrbase.fhirbridge.ehr.converter; +package org.ehrbase.fhirbridge.ehr.converter.specific.DnrAnordnung; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import com.nedap.archie.rm.generic.PartySelf; import org.ehrbase.client.classgenerator.shareddefinition.Language; -import org.ehrbase.client.classgenerator.shareddefinition.Setting; -import org.ehrbase.client.classgenerator.shareddefinition.Territory; -import org.ehrbase.fhirbridge.camel.component.ehr.composition.CompositionConverter; +import org.ehrbase.fhirbridge.ehr.converter.generic.ConsentToCompositionConverter; import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.DNRAnordnungComposition; import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.ArtDerRichtlinieDefiningCode; import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.BeschreibungDefiningCode; @@ -14,38 +12,19 @@ import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.KategorieDefiningCode; import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.StatusDefiningCode; import org.hl7.fhir.r4.model.Consent; +import org.springframework.lang.NonNull; import java.util.ArrayList; import java.util.List; -public class DNRAnordnungCompositionConverter implements CompositionConverter<DNRAnordnungComposition, Consent> { +public class DnrAnordnungCompositionConverter extends ConsentToCompositionConverter<DNRAnordnungComposition> { @Override - public Consent fromComposition(DNRAnordnungComposition composition) { - return null; - } - - @Override - public DNRAnordnungComposition toComposition(Consent fhirConsent) { - if (fhirConsent == null) { - return null; - } + public DNRAnordnungComposition convertInternal(@NonNull Consent resource) { DNRAnordnungComposition composition = new DNRAnordnungComposition(); - - composition = setRequiredFields(composition); - composition.setStatusDefiningCode(createStatusDefiningCode(fhirConsent.getStatus())); + composition.setStatusDefiningCode(createStatusDefiningCode(resource.getStatus())); composition.setKategorie(createDnrAnordnungKategorieElement()); - composition.setDnrAnordnung(createDnrAnordnung(fhirConsent.getProvision())); - - return composition; - } - - private DNRAnordnungComposition setRequiredFields(DNRAnordnungComposition composition) { - composition.setLanguage(Language.DE); - composition.setLocation("test"); - composition.setSettingDefiningCode(Setting.SECONDARY_MEDICAL_CARE); - composition.setTerritory(Territory.DE); - composition.setComposer(new PartySelf()); + composition.setDnrAnordnung(createDnrAnordnung(resource.getProvision())); return composition; } @@ -64,7 +43,6 @@ private StatusDefiningCode createStatusDefiningCode(Consent.ConsentState fhirSta case "entered-in-error": return StatusDefiningCode.EINGABEFEHLER; default: - //TODO Test throw new UnprocessableEntityException("createStatusDefiningCode failed. Code not found for: " + fhirStatus.toString()); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/DNRAnordnungComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/DNRAnordnungComposition.java index 6c1867cd9..78b945e71 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/DNRAnordnungComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/DNRAnordnungComposition.java @@ -14,6 +14,7 @@ import org.ehrbase.client.annotations.Id; import org.ehrbase.client.annotations.Path; import org.ehrbase.client.annotations.Template; +import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; import org.ehrbase.client.classgenerator.shareddefinition.Category; import org.ehrbase.client.classgenerator.shareddefinition.Language; import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; @@ -33,7 +34,7 @@ comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("DNR-Anordnung") -public class DNRAnordnungComposition implements Composition { +public class DNRAnordnungComposition implements Composition, CompositionEntity { /** * Path: DNR-Anordnung/category */ diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/BeschreibungDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/BeschreibungDefiningCode.java index bd176e39f..ac2e3189d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/BeschreibungDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/BeschreibungDefiningCode.java @@ -33,12 +33,12 @@ public enum BeschreibungDefiningCode implements EnumValueSet { public static BeschreibungDefiningCode get_by_SNOMED_code(List<CodeableConcept> code) { CodeableConcept fhir_code = code.get(0); for(BeschreibungDefiningCode bc : values()) { - if(bc.code.equals(fhir_code)) { + if(bc.code.equals(fhir_code.getCoding().get(0).getCode())) { return bc; } } - //TODO Test - throw new UnprocessableEntityException("Getting BeschreibungDefiningCode failed. Code not found for: " + fhir_code.toString()); + //TODO Test - hier gehts weiter: das oben scheint jetzt gefixed, schauen wo der nächste Fehler liegt + throw new UnprocessableEntityException("Getting BeschreibungDefiningCode failed. Code not found for: " + fhir_code.getCoding().get(0).toString()); } public String getValue() { diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/consent/DnrIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/DnrIT.java new file mode 100644 index 000000000..a38dae1c2 --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/DnrIT.java @@ -0,0 +1,75 @@ +package org.ehrbase.fhirbridge.fhir.consent; + +import org.ehrbase.fhirbridge.comparators.CustomTemporalAcessorComparator; +import org.ehrbase.fhirbridge.ehr.converter.ConversionException; +import org.ehrbase.fhirbridge.ehr.converter.specific.DnrAnordnung.DnrAnordnungCompositionConverter; +import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.DNRAnordnungComposition; +import org.ehrbase.fhirbridge.fhir.AbstractMappingTestSetupIT; +import org.hl7.fhir.r4.model.Consent; +import org.javers.core.Javers; +import org.javers.core.JaversBuilder; +import org.javers.core.diff.Diff; +import org.javers.core.metamodel.clazz.ValueObjectDefinition; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.time.temporal.TemporalAccessor; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +class DnrIT extends AbstractMappingTestSetupIT { + + public DnrIT() { + super("Consent/", Consent.class); //fhir-Resource + } + + + // ##################################################################################### + // check payload + @Test + void mappingNormal() throws IOException { + testMapping("consent-example.json", + "paragon-consent-dnr-normal.json"); + } + + + // ##################################################################################### + // check exceptions + @Test + void createInvalidDnr() throws IOException { + Exception exception = executeMappingException("consent-example-invalid-status.json"); + assertEquals("Oh noes, this should never happen", exception.getMessage()); + } + + + // ##################################################################################### + // default + + @Override + public Javers getJavers() { + return JaversBuilder.javers() + .registerValue(TemporalAccessor.class, new CustomTemporalAcessorComparator()) + .registerValueObject(new ValueObjectDefinition(DNRAnordnungComposition.class, List.of("location", "feederAudit"))) + //.registerValueObject(GroesseLaengeObservation.class) + .build(); + } + + @Override + public Exception executeMappingException(String path) throws IOException { + Consent csnt = (Consent) testFileLoader.loadResource(path); + return assertThrows(ConversionException.class, () -> + new DnrAnordnungCompositionConverter().convert(csnt) + ); + } + + @Override + public void testMapping(String resourcePath, String paragonPath) throws IOException { + Consent consent = (Consent) super.testFileLoader.loadResource(resourcePath); + DnrAnordnungCompositionConverter dnrAnordnungCompositionConverter = new DnrAnordnungCompositionConverter(); + DNRAnordnungComposition mapped = dnrAnordnungCompositionConverter.convert(consent); + Diff diff = compareCompositions(getJavers(), paragonPath, mapped); + assertEquals(0, diff.getChanges().size()); + } +} diff --git a/src/test/resources/DNR/Consent-example-duplicate-2.json b/src/test/resources/Consent/consent-example-duplicate-2.json similarity index 100% rename from src/test/resources/DNR/Consent-example-duplicate-2.json rename to src/test/resources/Consent/consent-example-duplicate-2.json diff --git a/src/test/resources/DNR/Consent-example-duplicate-3.json b/src/test/resources/Consent/consent-example-duplicate-3.json similarity index 100% rename from src/test/resources/DNR/Consent-example-duplicate-3.json rename to src/test/resources/Consent/consent-example-duplicate-3.json diff --git a/src/test/resources/Consent/consent-example-invalid-status.json b/src/test/resources/Consent/consent-example-invalid-status.json new file mode 100644 index 000000000..f0d64f05f --- /dev/null +++ b/src/test/resources/Consent/consent-example-invalid-status.json @@ -0,0 +1,54 @@ +{ + "resourceType": "Consent", + "id": "e1c90e84-aa7b-4999-8036-27f88dd7b60e", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/do-not-resuscitate-order" + ] + }, + "status": "bad state", + "scope": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/consentscope", + "code": "adr", + "display": "Advanced Care Directive" + } + ] + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/consentcategorycodes", + "code": "dnr", + "display": "Do Not Resuscitate" + } + ] + } + ], + "patient": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "policy": [ + { + "uri": "https://www.aerzteblatt.de/archiv/65440/DNR-Anordnungen-Das-fehlende-Bindeglied" + } + ], + "provision": { + "code": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "304252001", + "display": "For resuscitation" + } + ] + } + ] + } +} diff --git a/src/test/resources/DNR/Consent-example.json b/src/test/resources/Consent/consent-example.json similarity index 100% rename from src/test/resources/DNR/Consent-example.json rename to src/test/resources/Consent/consent-example.json diff --git a/src/test/resources/Consent/paragon-consent-dnr-normal.json b/src/test/resources/Consent/paragon-consent-dnr-normal.json new file mode 100644 index 000000000..666acaaab --- /dev/null +++ b/src/test/resources/Consent/paragon-consent-dnr-normal.json @@ -0,0 +1,54 @@ +{ + "resourceType": "Consent", + "id": "e1c90e84-aa7b-4999-8036-27f88dd7b60e", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/do-not-resuscitate-order" + ] + }, + "status": "active", + "scope": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/consentscope", + "code": "adr", + "display": "Advanced Care Directive" + } + ] + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/consentcategorycodes", + "code": "dnr", + "display": "Do Not Resuscitate" + } + ] + } + ], + "patient": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "policy": [ + { + "uri": "https://www.aerzteblatt.de/archiv/65440/DNR-Anordnungen-Das-fehlende-Bindeglied" + } + ], + "provision": { + "code": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "304252001", + "display": "For resuscitation" + } + ] + } + ] + } +} From 4c2f4d59e55d4b3a5182df39d14fdbbd36753a3f Mon Sep 17 00:00:00 2001 From: Erik Tute <eriktute@mx.de> Date: Mon, 19 Apr 2021 12:46:56 +0200 Subject: [PATCH 005/141] Just pushing current state - I know it's not working... --- .../ConsentToCompositionConverter.java | 6 +-- .../DnrAnordnungCompositionConverter.java | 5 +- .../definition/DnrAnordnungEvaluation.java | 1 + .../fhirbridge/fhir/consent/DnrIT.java | 6 --- .../consent-example-invalid-status.json | 54 ------------------- 5 files changed, 6 insertions(+), 66 deletions(-) delete mode 100644 src/test/resources/Consent/consent-example-invalid-status.json diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConsentToCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConsentToCompositionConverter.java index 97e16478c..e14741829 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConsentToCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConsentToCompositionConverter.java @@ -2,20 +2,16 @@ import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; import org.hl7.fhir.r4.model.Consent; -import org.hl7.fhir.r4.model.DateTimeType; -import org.hl7.fhir.r4.model.Extension; -import org.hl7.fhir.r4.model.Patient; import org.springframework.lang.NonNull; import java.time.Instant; -import java.time.ZonedDateTime; public abstract class ConsentToCompositionConverter<C extends CompositionEntity> extends CompositionConverter<Consent, C> { @Override public C convert(@NonNull Consent resource) { C composition = super.convert(resource); - composition.setStartTimeValue(Instant.now()); + //composition.setStartTimeValue(Instant.now()); return composition; } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/DnrAnordnung/DnrAnordnungCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/DnrAnordnung/DnrAnordnungCompositionConverter.java index f2e6488dc..f93b11150 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/DnrAnordnung/DnrAnordnungCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/DnrAnordnung/DnrAnordnungCompositionConverter.java @@ -14,7 +14,9 @@ import org.hl7.fhir.r4.model.Consent; import org.springframework.lang.NonNull; +import java.time.Instant; import java.util.ArrayList; +import java.util.Date; import java.util.List; public class DnrAnordnungCompositionConverter extends ConsentToCompositionConverter<DNRAnordnungComposition> { @@ -25,6 +27,7 @@ public DNRAnordnungComposition convertInternal(@NonNull Consent resource) { composition.setStatusDefiningCode(createStatusDefiningCode(resource.getStatus())); composition.setKategorie(createDnrAnordnungKategorieElement()); composition.setDnrAnordnung(createDnrAnordnung(resource.getProvision())); + composition.setStartTimeValue(Instant.now());//TODO remove, just tested if this can stop the startTime error return composition; } @@ -55,7 +58,7 @@ private List<DnrAnordnungKategorieElement> createDnrAnordnungKategorieElement() return items; } - private DnrAnordnungEvaluation createDnrAnordnung(Consent.provisionComponent provision) { + private DnrAnordnungEvaluation createDnrAnordnung(@NonNull Consent.provisionComponent provision) { DnrAnordnungEvaluation dnrAnordnung = new DnrAnordnungEvaluation(); dnrAnordnung.setLanguage(Language.DE); dnrAnordnung.setSubject(new PartySelf()); diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/DnrAnordnungEvaluation.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/DnrAnordnungEvaluation.java index f649b6514..6579f7cf6 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/DnrAnordnungEvaluation.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/DnrAnordnungEvaluation.java @@ -7,6 +7,7 @@ import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Id; import org.ehrbase.client.annotations.Path; import org.ehrbase.client.classgenerator.interfaces.EntryEntity; import org.ehrbase.client.classgenerator.shareddefinition.Language; diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/consent/DnrIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/DnrIT.java index a38dae1c2..78b4cb41a 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/consent/DnrIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/DnrIT.java @@ -37,12 +37,6 @@ void mappingNormal() throws IOException { // ##################################################################################### // check exceptions - @Test - void createInvalidDnr() throws IOException { - Exception exception = executeMappingException("consent-example-invalid-status.json"); - assertEquals("Oh noes, this should never happen", exception.getMessage()); - } - // ##################################################################################### // default diff --git a/src/test/resources/Consent/consent-example-invalid-status.json b/src/test/resources/Consent/consent-example-invalid-status.json deleted file mode 100644 index f0d64f05f..000000000 --- a/src/test/resources/Consent/consent-example-invalid-status.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "resourceType": "Consent", - "id": "e1c90e84-aa7b-4999-8036-27f88dd7b60e", - "meta": { - "profile": [ - "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/do-not-resuscitate-order" - ] - }, - "status": "bad state", - "scope": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/consentscope", - "code": "adr", - "display": "Advanced Care Directive" - } - ] - }, - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/consentcategorycodes", - "code": "dnr", - "display": "Do Not Resuscitate" - } - ] - } - ], - "patient": { - "identifier": { - "system": "urn:ietf:rfc:4122", - "value": "{{patientId}}" - } - }, - "policy": [ - { - "uri": "https://www.aerzteblatt.de/archiv/65440/DNR-Anordnungen-Das-fehlende-Bindeglied" - } - ], - "provision": { - "code": [ - { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "304252001", - "display": "For resuscitation" - } - ] - } - ] - } -} From 43d921b9b5675d96f0c4f642460a3a3e4b4dc96a Mon Sep 17 00:00:00 2001 From: uakoenig <urs.a.koenig@t-online.de> Date: Thu, 22 Apr 2021 22:09:45 +0200 Subject: [PATCH 006/141] Mapping mit createPatientDischarge-Fehler --- .../config/ConversionConfiguration.java | 2 + .../PatientDischargeAdminEntryConverter.java | 60 + .../PatientDischargeCompositionConverter.java | 40 + .../GECCOEntlassungsdatenComposition.java | 276 + ...ntlassungsdatenCompositionContainment.java | 66 + .../ArtDerEntlassungDefiningCode.java | 60 + .../definition/EntlassungsartAdminEntry.java | 126 + .../EntlassungsartAdminEntryContainment.java | 39 + .../EntlassungsdatenKategorieElement.java | 60 + .../definition/StatusDefiningCode.java | 45 + .../fhirbridge/fhir/common/Profile.java | 2 + src/main/resources/application.yml | 4 +- src/main/resources/opt/Entlassart.opt | 773 +++ .../profiles/DischargeDisposition.xml | 4923 +++++++++++++++++ .../fhir/observation/PatientDischargeIT.java | 120 + .../create-patient-discharge-alive.json | 63 + .../create-patient-discharge-dead.json | 63 + .../create-patient-discharge-hospital.json | 63 + ...create-patient-discharge-invalid-code.json | 63 + ...eate-patient-discharge-invalid-system.json | 63 + .../create-patient-discharge-palliative.json | 63 + .../create-patient-discharge-referral.json | 63 + .../create-patient-discharge-unknown.json | 63 + .../paragon-patient-discharge-alive.json | 151 + .../paragon-patient-discharge-dead.json | 151 + .../paragon-patient-discharge-hospital.json | 151 + .../paragon-patient-discharge-palliative.json | 151 + .../paragon-patient-discharge-referral.json | 151 + .../paragon-patient-discharge-unknown.json | 151 + 29 files changed, 8004 insertions(+), 2 deletions(-) create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeAdminEntryConverter.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeCompositionConverter.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/GECCOEntlassungsdatenComposition.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/GECCOEntlassungsdatenCompositionContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/ArtDerEntlassungDefiningCode.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/EntlassungsartAdminEntry.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/EntlassungsartAdminEntryContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/EntlassungsdatenKategorieElement.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/StatusDefiningCode.java create mode 100644 src/main/resources/opt/Entlassart.opt create mode 100644 src/main/resources/profiles/DischargeDisposition.xml create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/observation/PatientDischargeIT.java create mode 100644 src/test/resources/Observation/PatientDischarge/create-patient-discharge-alive.json create mode 100644 src/test/resources/Observation/PatientDischarge/create-patient-discharge-dead.json create mode 100644 src/test/resources/Observation/PatientDischarge/create-patient-discharge-hospital.json create mode 100644 src/test/resources/Observation/PatientDischarge/create-patient-discharge-invalid-code.json create mode 100644 src/test/resources/Observation/PatientDischarge/create-patient-discharge-invalid-system.json create mode 100644 src/test/resources/Observation/PatientDischarge/create-patient-discharge-palliative.json create mode 100644 src/test/resources/Observation/PatientDischarge/create-patient-discharge-referral.json create mode 100644 src/test/resources/Observation/PatientDischarge/create-patient-discharge-unknown.json create mode 100644 src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-alive.json create mode 100644 src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-dead.json create mode 100644 src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-hospital.json create mode 100644 src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-palliative.json create mode 100644 src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-referral.json create mode 100644 src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-unknown.json diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java index 0e500e437..8e32ff9b0 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java @@ -18,6 +18,7 @@ import org.ehrbase.fhirbridge.ehr.converter.specific.knownexposure.SarsCov2KnownExposureCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.observationlab.ObservationLabCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.patient.PatientCompositionConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.patientdischarge.PatientDischargeCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.patientinicu.PatientInIcuCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.pregnancystatus.PregnancyStatusCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.procedure.ProcedureCompositionConverter; @@ -92,6 +93,7 @@ private void registerObservationConverters(ConversionService conversionService) conversionService.registerConverter(Profile.FIO2, new FiO2CompositionConverter()); conversionService.registerConverter(Profile.HEART_RATE, new HeartRateCompositionConverter()); conversionService.registerConverter(Profile.KNOWN_EXPOSURE, new SarsCov2KnownExposureCompositionConverter()); + conversionService.registerConverter(Profile.PATIENT_DISCHARGE, new PatientDischargeCompositionConverter()); conversionService.registerConverter(Profile.PATIENT_IN_ICU, new PatientInIcuCompositionConverter()); conversionService.registerConverter(Profile.PCR, new PCRCompositionConverter()); conversionService.registerConverter(Profile.PREGNANCY_STATUS, new PregnancyStatusCompositionConverter()); diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeAdminEntryConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeAdminEntryConverter.java new file mode 100644 index 000000000..12e222f95 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeAdminEntryConverter.java @@ -0,0 +1,60 @@ +package org.ehrbase.fhirbridge.ehr.converter.specific.patientdischarge; + +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import org.ehrbase.fhirbridge.ehr.converter.generic.EntryEntityConverter; +import org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.definition.ArtDerEntlassungDefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.definition.EntlassungsartAdminEntry; +import org.hl7.fhir.r4.model.Coding; +import org.hl7.fhir.r4.model.Observation; + +import static org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem.SNOMED; + +public class PatientDischargeAdminEntryConverter extends EntryEntityConverter<Observation, EntlassungsartAdminEntry> { + + @Override + protected EntlassungsartAdminEntry convertInternal(Observation resource) { + + EntlassungsartAdminEntry adminEntry = new EntlassungsartAdminEntry(); + + String code = getSnomedCodeObservation(resource); + + //switch (resource.getValueCodeableConcept().getCoding().get(0).getCode()) { + switch(code) { + case "261665006": + adminEntry.setArtDerEntlassung(ArtDerEntlassungDefiningCode.UNKNOWN_QUALIFIER_VALUE.toDvCodedText()); + break; + case "32485007": + adminEntry.setArtDerEntlassung(ArtDerEntlassungDefiningCode.HOSPITAL_ADMISSION_PROCEDURE.toDvCodedText()); + break; + case "419099009": + adminEntry.setArtDerEntlassung(ArtDerEntlassungDefiningCode.DEAD_FINDING.toDvCodedText()); + break; + case "371827001": + adminEntry.setArtDerEntlassung(ArtDerEntlassungDefiningCode.PATIENT_DISCHARGED_ALIVE_FINDING.toDvCodedText()); + break; + case "3457005": + adminEntry.setArtDerEntlassung(ArtDerEntlassungDefiningCode.PATIENT_REFERRAL_PROCEDURE.toDvCodedText()); + break; + case "306237005": + adminEntry.setArtDerEntlassung(ArtDerEntlassungDefiningCode.REFERRAL_TO_PALLIATIVE_CARE_SERVICE_PROCEDURE.toDvCodedText()); + break; + default: + throw new UnprocessableEntityException("Value code " + resource.getValueCodeableConcept().getCoding().get(0).getCode() + " is not supported"); + } + + return adminEntry; + } + + private void checkForSnomedSystem(String systemCode) { + if (!SNOMED.getUrl().equals(systemCode)) { + throw new UnprocessableEntityException("The system is not correct. " + + "It should be '" + SNOMED.getUrl() + "', but it was '" + systemCode + "'."); + } + } + + private String getSnomedCodeObservation(Observation fhirObservation) { + Coding code = fhirObservation.getValueCodeableConcept().getCoding().get(0); + checkForSnomedSystem(code.getSystem()); + return code.getCode(); + } +} \ No newline at end of file diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeCompositionConverter.java new file mode 100644 index 000000000..8e8f96369 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeCompositionConverter.java @@ -0,0 +1,40 @@ +package org.ehrbase.fhirbridge.ehr.converter.specific.patientdischarge; + +import org.ehrbase.fhirbridge.ehr.converter.ConversionException; +import org.ehrbase.fhirbridge.ehr.converter.generic.ObservationToCompositionConverter; +import org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.GECCOEntlassungsdatenComposition; +import org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.definition.StatusDefiningCode; +import org.hl7.fhir.r4.model.Observation; +import org.springframework.lang.NonNull; + +import static org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem.SNOMED; + +public class PatientDischargeCompositionConverter extends ObservationToCompositionConverter<GECCOEntlassungsdatenComposition> { + + @Override + public GECCOEntlassungsdatenComposition convertInternal(@NonNull Observation resource) { + + GECCOEntlassungsdatenComposition composition = new GECCOEntlassungsdatenComposition(); + + mapStatus(composition, resource); + + composition.setEntlassungsart(new PatientDischargeAdminEntryConverter().convertInternal(resource)); + + return composition; + } + + private void mapStatus(GECCOEntlassungsdatenComposition composition, Observation obs) { + String status = obs.getStatusElement().getCode(); + if (status.equals(StatusDefiningCode.FINAL.getValue())) { + composition.setStatusDefiningCode(StatusDefiningCode.FINAL); + } else if (status.equals(StatusDefiningCode.GEAENDERT.getValue())) { + composition.setStatusDefiningCode(StatusDefiningCode.GEAENDERT); + } else if (status.equals(StatusDefiningCode.REGISTRIERT.getValue())) { + composition.setStatusDefiningCode(StatusDefiningCode.REGISTRIERT); + } else if (status.equals(StatusDefiningCode.VORLAEUFIG.getValue())) { + composition.setStatusDefiningCode(StatusDefiningCode.VORLAEUFIG); + } else { + throw new ConversionException("The status " + obs.getStatus().toString() + " is not valid for known exposure."); + } + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/GECCOEntlassungsdatenComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/GECCOEntlassungsdatenComposition.java new file mode 100644 index 000000000..a0f813345 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/GECCOEntlassungsdatenComposition.java @@ -0,0 +1,276 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.generic.Participation; +import com.nedap.archie.rm.generic.PartyIdentified; +import com.nedap.archie.rm.generic.PartyProxy; +import java.lang.String; +import java.time.temporal.TemporalAccessor; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Id; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.annotations.Template; +import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; +import org.ehrbase.client.classgenerator.shareddefinition.Category; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; +import org.ehrbase.client.classgenerator.shareddefinition.Setting; +import org.ehrbase.client.classgenerator.shareddefinition.Territory; +import org.ehrbase.client.openehrclient.VersionUid; +import org.ehrbase.fhirbridge.ehr.Composition; +import org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.definition.EntlassungsartAdminEntry; +import org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.definition.EntlassungsdatenKategorieElement; +import org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.definition.StatusDefiningCode; + +@Entity +@Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-04-22T10:43:11.519377600+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@Template("GECCO_Entlassungsdaten") +public class GECCOEntlassungsdatenComposition implements CompositionEntity, Composition { + /** + * Path: Entlassungsdaten/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Entlassungsdaten/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: Entlassungsdaten/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: Entlassungsdaten/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: Entlassungsdaten/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]") + private List<EntlassungsdatenKategorieElement> kategorie; + + /** + * Path: Entlassungsdaten/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Entlassungsdaten/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Entlassungsdaten/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Entlassungsdaten/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Entlassungsdaten/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Entlassungsdaten/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Entlassungsdaten/Entlassungsart + * Description: Wird nur für entlassene Patienten verwendet. + */ + @Path("/content[openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0 and name/value='Entlassungsart']") + private EntlassungsartAdminEntry entlassungsart; + + /** + * Path: Entlassungsdaten/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Entlassungsdaten/language + */ + @Path("/language") + private Language language; + + /** + * Path: Entlassungsdaten/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Entlassungsdaten/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode ; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung ; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode ; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode ; + } + + public void setKategorie(List<EntlassungsdatenKategorieElement> kategorie) { + this.kategorie = kategorie; + } + + public List<EntlassungsdatenKategorieElement> getKategorie() { + return this.kategorie ; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue ; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public List<Participation> getParticipations() { + return this.participations ; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue ; + } + + public void setLocation(String location) { + this.location = location; + } + + public String getLocation() { + return this.location ; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility ; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode ; + } + + public void setEntlassungsart(EntlassungsartAdminEntry entlassungsart) { + this.entlassungsart = entlassungsart; + } + + public EntlassungsartAdminEntry getEntlassungsart() { + return this.entlassungsart ; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } + + public PartyProxy getComposer() { + return this.composer ; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public Language getLanguage() { + return this.language ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } + + public void setTerritory(Territory territory) { + this.territory = territory; + } + + public Territory getTerritory() { + return this.territory ; + } + + public VersionUid getVersionUid() { + return this.versionUid ; + } + + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/GECCOEntlassungsdatenCompositionContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/GECCOEntlassungsdatenCompositionContainment.java new file mode 100644 index 000000000..4abfb2bcb --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/GECCOEntlassungsdatenCompositionContainment.java @@ -0,0 +1,66 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.generic.Participation; +import com.nedap.archie.rm.generic.PartyIdentified; +import com.nedap.archie.rm.generic.PartyProxy; +import java.lang.String; +import java.time.temporal.TemporalAccessor; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.Category; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; +import org.ehrbase.client.classgenerator.shareddefinition.Setting; +import org.ehrbase.client.classgenerator.shareddefinition.Territory; +import org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.definition.EntlassungsartAdminEntry; +import org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.definition.EntlassungsdatenKategorieElement; +import org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.definition.StatusDefiningCode; + +public class GECCOEntlassungsdatenCompositionContainment extends Containment { + public SelectAqlField<GECCOEntlassungsdatenComposition> G_E_C_C_O_ENTLASSUNGSDATEN_COMPOSITION = new AqlFieldImp<GECCOEntlassungsdatenComposition>(GECCOEntlassungsdatenComposition.class, "", "GECCOEntlassungsdatenComposition", GECCOEntlassungsdatenComposition.class, this); + + public SelectAqlField<Category> CATEGORY_DEFINING_CODE = new AqlFieldImp<Category>(GECCOEntlassungsdatenComposition.class, "/category|defining_code", "categoryDefiningCode", Category.class, this); + + public ListSelectAqlField<Cluster> ERWEITERUNG = new ListAqlFieldImp<Cluster>(GECCOEntlassungsdatenComposition.class, "/context/other_context[at0001]/items[at0002]", "erweiterung", Cluster.class, this); + + public SelectAqlField<StatusDefiningCode> STATUS_DEFINING_CODE = new AqlFieldImp<StatusDefiningCode>(GECCOEntlassungsdatenComposition.class, "/context/other_context[at0001]/items[at0004]/value|defining_code", "statusDefiningCode", StatusDefiningCode.class, this); + + public SelectAqlField<NullFlavour> STATUS_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(GECCOEntlassungsdatenComposition.class, "/context/other_context[at0001]/items[at0004]/null_flavour|defining_code", "statusNullFlavourDefiningCode", NullFlavour.class, this); + + public ListSelectAqlField<EntlassungsdatenKategorieElement> KATEGORIE = new ListAqlFieldImp<EntlassungsdatenKategorieElement>(GECCOEntlassungsdatenComposition.class, "/context/other_context[at0001]/items[at0005]", "kategorie", EntlassungsdatenKategorieElement.class, this); + + public SelectAqlField<TemporalAccessor> START_TIME_VALUE = new AqlFieldImp<TemporalAccessor>(GECCOEntlassungsdatenComposition.class, "/context/start_time|value", "startTimeValue", TemporalAccessor.class, this); + + public ListSelectAqlField<Participation> PARTICIPATIONS = new ListAqlFieldImp<Participation>(GECCOEntlassungsdatenComposition.class, "/context/participations", "participations", Participation.class, this); + + public SelectAqlField<TemporalAccessor> END_TIME_VALUE = new AqlFieldImp<TemporalAccessor>(GECCOEntlassungsdatenComposition.class, "/context/end_time|value", "endTimeValue", TemporalAccessor.class, this); + + public SelectAqlField<String> LOCATION = new AqlFieldImp<String>(GECCOEntlassungsdatenComposition.class, "/context/location", "location", String.class, this); + + public SelectAqlField<PartyIdentified> HEALTH_CARE_FACILITY = new AqlFieldImp<PartyIdentified>(GECCOEntlassungsdatenComposition.class, "/context/health_care_facility", "healthCareFacility", PartyIdentified.class, this); + + public SelectAqlField<Setting> SETTING_DEFINING_CODE = new AqlFieldImp<Setting>(GECCOEntlassungsdatenComposition.class, "/context/setting|defining_code", "settingDefiningCode", Setting.class, this); + + public SelectAqlField<EntlassungsartAdminEntry> ENTLASSUNGSART = new AqlFieldImp<EntlassungsartAdminEntry>(GECCOEntlassungsdatenComposition.class, "/content[openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0]", "entlassungsart", EntlassungsartAdminEntry.class, this); + + public SelectAqlField<PartyProxy> COMPOSER = new AqlFieldImp<PartyProxy>(GECCOEntlassungsdatenComposition.class, "/composer", "composer", PartyProxy.class, this); + + public SelectAqlField<Language> LANGUAGE = new AqlFieldImp<Language>(GECCOEntlassungsdatenComposition.class, "/language", "language", Language.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(GECCOEntlassungsdatenComposition.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + public SelectAqlField<Territory> TERRITORY = new AqlFieldImp<Territory>(GECCOEntlassungsdatenComposition.class, "/territory", "territory", Territory.class, this); + + private GECCOEntlassungsdatenCompositionContainment() { + super("openEHR-EHR-COMPOSITION.registereintrag.v1"); + } + + public static GECCOEntlassungsdatenCompositionContainment getInstance() { + return new GECCOEntlassungsdatenCompositionContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/ArtDerEntlassungDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/ArtDerEntlassungDefiningCode.java new file mode 100644 index 000000000..3c4198f7c --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/ArtDerEntlassungDefiningCode.java @@ -0,0 +1,60 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.definition; + +import org.ehrbase.client.classgenerator.EnumValueSet; + +import com.nedap.archie.rm.datatypes.CodePhrase; +import com.nedap.archie.rm.datavalues.DvCodedText; +import com.nedap.archie.rm.support.identification.TerminologyId; +//import org.ehrbase.validation.terminology.validator.DvCodedText; + +public enum ArtDerEntlassungDefiningCode implements EnumValueSet { + UNKNOWN_QUALIFIER_VALUE("Unknown (qualifier value)", "", "SNOMED Clinical Terms", "261665006"), + HOSPITAL_ADMISSION_PROCEDURE("Hospital admission (procedure)","","SNOMED Clinical Terms","32485007"), + DEAD_FINDING("Dead (finding)","", "SNOMED Clinical Terms", "419099009"), + PATIENT_DISCHARGED_ALIVE_FINDING("Patient discharged alive (finding)", "", "SNOMED Clinical Terms", "371827001"), + PATIENT_REFERRAL_PROCEDURE("Patient referral (procedure)", "", "SNOMED Clinical Terms", "3457005"), + REFERRAL_TO_PALLIATIVE_CARE_SERVICE_PROCEDURE("Referral to palliative care service (procedure)", "", "SNOMED Clinical Terms", "306237005"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + ArtDerEntlassungDefiningCode(String value, String description, String terminologyId, String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } + + + public DvCodedText toDvCodedText(){ + DvCodedText dvCodedText = new DvCodedText(); + CodePhrase codePhrase = new CodePhrase(); + codePhrase.setCodeString(code); + codePhrase.setTerminologyId(new TerminologyId(terminologyId)); + dvCodedText.setDefiningCode(codePhrase); + dvCodedText.setValue(value); + return dvCodedText; + } + +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/EntlassungsartAdminEntry.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/EntlassungsartAdminEntry.java new file mode 100644 index 000000000..2826b4cd8 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/EntlassungsartAdminEntry.java @@ -0,0 +1,126 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.datavalues.DvCodedText; +import com.nedap.archie.rm.generic.PartyProxy; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.EntryEntity; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; +//import org.ehrbase.validation.terminology.validator.DvCodedText; + +@Entity +@Archetype("openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-04-22T10:43:11.563378400+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +public class EntlassungsartAdminEntry implements EntryEntity { + /** + * Path: Entlassungsdaten/Entlassungsart/Art der Entlassung + * Description: Grund der Entlassung + */ + @Path("/data[at0001]/items[at0040]/value") + private DvCodedText artDerEntlassung; + + /** + * Path: Entlassungsdaten/Entlassungsart/Tree/Art der Entlassung/null_flavour + */ + @Path("/data[at0001]/items[at0040]/null_flavour|defining_code") + private NullFlavour artDerEntlassungNullFlavourDefiningCode; + + /** + * Path: Entlassungsdaten/Entlassungsart/Letzter Patientenstandort + * Description: * + */ + @Path("/data[at0001]/items[at0066]") + private List<Cluster> letzterPatientenstandort; + + /** + * Path: Entlassungsdaten/Entlassungsart/Zugewiesener Patientenstandort + * Description: Für die lokale Verwendung enthält dieses Feld den Typ der Organisationseinheit oder der klinischen Einheit. + */ + @Path("/data[at0001]/items[at0067]") + private List<Cluster> zugewiesenerPatientenstandort; + + /** + * Path: Entlassungsdaten/Entlassungsart/subject + */ + @Path("/subject") + private PartyProxy subject; + + /** + * Path: Entlassungsdaten/Entlassungsart/language + */ + @Path("/language") + private Language language; + + /** + * Path: Entlassungsdaten/Entlassungsart/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setArtDerEntlassung(DvCodedText artDerEntlassung) { + this.artDerEntlassung = artDerEntlassung; + } + + public DvCodedText getArtDerEntlassung() { + return this.artDerEntlassung ; + } + + public void setArtDerEntlassungNullFlavourDefiningCode( + NullFlavour artDerEntlassungNullFlavourDefiningCode) { + this.artDerEntlassungNullFlavourDefiningCode = artDerEntlassungNullFlavourDefiningCode; + } + + public NullFlavour getArtDerEntlassungNullFlavourDefiningCode() { + return this.artDerEntlassungNullFlavourDefiningCode ; + } + + public void setLetzterPatientenstandort(List<Cluster> letzterPatientenstandort) { + this.letzterPatientenstandort = letzterPatientenstandort; + } + + public List<Cluster> getLetzterPatientenstandort() { + return this.letzterPatientenstandort ; + } + + public void setZugewiesenerPatientenstandort(List<Cluster> zugewiesenerPatientenstandort) { + this.zugewiesenerPatientenstandort = zugewiesenerPatientenstandort; + } + + public List<Cluster> getZugewiesenerPatientenstandort() { + return this.zugewiesenerPatientenstandort ; + } + + public void setSubject(PartyProxy subject) { + this.subject = subject; + } + + public PartyProxy getSubject() { + return this.subject ; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public Language getLanguage() { + return this.language ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/EntlassungsartAdminEntryContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/EntlassungsartAdminEntryContainment.java new file mode 100644 index 000000000..164b632a4 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/EntlassungsartAdminEntryContainment.java @@ -0,0 +1,39 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.datavalues.DvCodedText; +import com.nedap.archie.rm.generic.PartyProxy; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +public class EntlassungsartAdminEntryContainment extends Containment { + public SelectAqlField<EntlassungsartAdminEntry> ENTLASSUNGSART_ADMIN_ENTRY = new AqlFieldImp<EntlassungsartAdminEntry>(EntlassungsartAdminEntry.class, "", "EntlassungsartAdminEntry", EntlassungsartAdminEntry.class, this); + + public SelectAqlField<DvCodedText> ART_DER_ENTLASSUNG = new AqlFieldImp<DvCodedText>(EntlassungsartAdminEntry.class, "/data[at0001]/items[at0040]/value", "artDerEntlassung", DvCodedText.class, this); + + public SelectAqlField<NullFlavour> ART_DER_ENTLASSUNG_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(EntlassungsartAdminEntry.class, "/data[at0001]/items[at0040]/null_flavour|defining_code", "artDerEntlassungNullFlavourDefiningCode", NullFlavour.class, this); + + public ListSelectAqlField<Cluster> LETZTER_PATIENTENSTANDORT = new ListAqlFieldImp<Cluster>(EntlassungsartAdminEntry.class, "/data[at0001]/items[at0066]", "letzterPatientenstandort", Cluster.class, this); + + public ListSelectAqlField<Cluster> ZUGEWIESENER_PATIENTENSTANDORT = new ListAqlFieldImp<Cluster>(EntlassungsartAdminEntry.class, "/data[at0001]/items[at0067]", "zugewiesenerPatientenstandort", Cluster.class, this); + + public SelectAqlField<PartyProxy> SUBJECT = new AqlFieldImp<PartyProxy>(EntlassungsartAdminEntry.class, "/subject", "subject", PartyProxy.class, this); + + public SelectAqlField<Language> LANGUAGE = new AqlFieldImp<Language>(EntlassungsartAdminEntry.class, "/language", "language", Language.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(EntlassungsartAdminEntry.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + private EntlassungsartAdminEntryContainment() { + super("openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0"); + } + + public static EntlassungsartAdminEntryContainment getInstance() { + return new EntlassungsartAdminEntryContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/EntlassungsdatenKategorieElement.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/EntlassungsdatenKategorieElement.java new file mode 100644 index 000000000..202f346d3 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/EntlassungsdatenKategorieElement.java @@ -0,0 +1,60 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import java.lang.String; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.LocatableEntity; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-04-22T10:43:11.554380100+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +public class EntlassungsdatenKategorieElement implements LocatableEntity { + /** + * Path: Entlassungsdaten/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/value|value") + private String value; + + /** + * Path: Entlassungsdaten/context/Baum/Kategorie/null_flavour + */ + @Path("/null_flavour|defining_code") + private NullFlavour value2; + + /** + * Path: Entlassungsdaten/context/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setValue(String value) { + this.value = value; + } + + public String getValue() { + return this.value ; + } + + public void setValue2(NullFlavour value2) { + this.value2 = value2; + } + + public NullFlavour getValue2() { + return this.value2 ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/StatusDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/StatusDefiningCode.java new file mode 100644 index 000000000..128355d92 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/StatusDefiningCode.java @@ -0,0 +1,45 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.definition; + +import java.lang.String; +import org.ehrbase.client.classgenerator.EnumValueSet; + +public enum StatusDefiningCode implements EnumValueSet { + VORLAEUFIG("vorläufig", "*", "local", "at0011"), + + FINAL("final", "*", "local", "at0012"), + + REGISTRIERT("registriert", "*", "local", "at0010"), + + GEAENDERT("geändert", "*", "local", "at0013"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + StatusDefiningCode(String value, String description, String terminologyId, String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java index a20e4193b..65c5c7cfa 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java @@ -76,6 +76,8 @@ public enum Profile { PAO2(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/oxygen-partial-pressure"), + PATIENT_DISCHARGE(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/discharge-disposition"), + PATIENT_IN_ICU(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/patient-in-icu"), PCR(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-rt-pcr"), diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index fa6b79586..aea059078 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -12,8 +12,8 @@ fhir-bridge: allowed-origins: '*' # Debug Properties debug: - enabled: false - mapping-output-directory: ${java.io.tmpdir}/mappings + enabled: true + mapping-output-directory: ${java.io.tmpdir}/mappings/ # EHRbase Properties ehrbase: base-url: http://localhost:8080/ehrbase/rest/openehr/v1/ diff --git a/src/main/resources/opt/Entlassart.opt b/src/main/resources/opt/Entlassart.opt new file mode 100644 index 000000000..66a354e75 --- /dev/null +++ b/src/main/resources/opt/Entlassart.opt @@ -0,0 +1,773 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<template xmlns="http://schemas.openehr.org/v1"> + <language> + <terminology_id> + <value>ISO_639-1</value> + </terminology_id> + <code_string>de</code_string> + </language> + <description> + <original_author id="Name">Sarah Ballout</original_author> + <original_author id="Email">ballout.sarah@mh-hannover.de</original_author> + <original_author id="Organisation">Peter L. Reichertz Institut für Medizinische Informatik</original_author> + <other_contributors>Antje Wulff</other_contributors> + <lifecycle_state>published</lifecycle_state> + <other_details id="MetaDataSet:Sample Set ">Template metadata sample set </other_details> + <other_details id="Acknowledgements"></other_details> + <other_details id="Business Process Level"></other_details> + <other_details id="Care setting"></other_details> + <other_details id="Client group"></other_details> + <other_details id="Clinical Record Element"></other_details> + <other_details id="Copyright"></other_details> + <other_details id="Issues"></other_details> + <other_details id="Owner"></other_details> + <other_details id="Sign off"></other_details> + <other_details id="Speciality"></other_details> + <other_details id="User roles"></other_details> + <other_details id="MD5-CAM-1.0.1">8c2764a82e3dae6d9e767ba4ebce893f</other_details> + <other_details id="PARENT:MD5-CAM-1.0.1">8BD8D5F850A9DEE8A16075105D36FD32</other_details> + <other_details id="build_uid">f8e06c79-0e80-31be-987b-2eb2975e7abf</other_details> + <other_details id="Generated By">Archetype Designer v1.18.6, user=test, repositoryId=gecco-num</other_details> + <details> + <language> + <terminology_id> + <value>ISO_639-1</value> + </terminology_id> + <code_string>de</code_string> + </language> + <purpose>Zur Repräsentation von Entlassungsdaten der Patienten im Rahmen des FoDaPl-Projektes / GECCO-Datensatzes.</purpose> + <keywords>Entlassungsdaten</keywords> + <keywords>Art der Entlassung</keywords> + <keywords>Outcome bei der Entlassung</keywords> + <keywords>Entlassung</keywords> + <keywords>GECCO</keywords> + <keywords>NUM</keywords> + <keywords>FoDaPl</keywords> + <keywords>CODEX</keywords> + <use>Für die Abbildung von Entlassungsdaten der Patienten für die Speicherung im Rahmen des FoDaPI-Projektes / GECCO-Datensatzes.</use> + <misuse>Nicht zur Repräsentation von Personendaten verwenden. Nicht für die Aufnahme des Patienten verwenden.</misuse> + </details> + </description> + <uid> + <value>09b78b75-7387-49ef-bf38-30f17b5908e0</value> + </uid> + <template_id> + <value>GECCO_Entlassungsdaten</value> + </template_id> + <concept>GECCO_Entlassungsdaten</concept> + <definition> + <rm_type_name>COMPOSITION</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <rm_attribute_name>category</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <terminology_id> + <value>openehr</value> + </terminology_id> + <code_list>433</code_list> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <rm_attribute_name>context</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>EVENT_CONTEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>other_context</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ITEM_TREE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0001</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>false</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0002</node_id> + <includes> + <string_expression>archetype_id/value matches {/.*/}</string_expression> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0004</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <terminology_id> + <value>local</value> + </terminology_id> + <code_list>at0010</code_list> + <code_list>at0011</code_list> + <code_list>at0012</code_list> + <code_list>at0013</code_list> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>false</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </occurrences> + <node_id>at0005</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + </children> + </attributes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <upper_included>false</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </interval> + </cardinality> + </attributes> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <rm_attribute_name>content</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>ADMIN_ENTRY</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>data</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ITEM_TREE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0001</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0040</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <terminology_id> + <value>SNOMED-CT</value> + </terminology_id> + <code_list>261665006</code_list> + <code_list>32485007</code_list> + <code_list>419099009</code_list> + <code_list>371827001</code_list> + <code_list>3457005</code_list> + <code_list>306237005</code_list> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>false</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0066</node_id> + <includes> + <string_expression>archetype_id/value matches {/.*/}</string_expression> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>false</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0067</node_id> + <includes> + <string_expression>archetype_id/value matches {/.*/}</string_expression> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <upper_included>false</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </interval> + </cardinality> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <item xsi:type="C_STRING"> + <list>Entlassungsart</list> + </item> + </children> + </attributes> + </children> + </attributes> + <archetype_id> + <value>openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="text">Entlassungsart</items> + <items id="description">Wird nur für entlassene Patienten verwendet.</items> + </term_definitions> + <term_definitions code="at0001"> + <items id="text">Tree</items> + <items id="description">@ internal @</items> + </term_definitions> + <term_definitions code="at0002"> + <items id="text">Klinischer Zustand des Patienten</items> + <items id="description">Klinischer Zustand des Patienten.</items> + </term_definitions> + <term_definitions code="at0003"> + <items id="text">Geheilt</items> + <items id="description">Der Patient ist geheilt.</items> + </term_definitions> + <term_definitions code="at0004"> + <items id="text">Verbessert</items> + <items id="description">Der Gesundheitszustand des Patienten hat sich verbessert.</items> + </term_definitions> + <term_definitions code="at0005"> + <items id="text">Identischer Zustand</items> + <items id="description">Der Gesundheitszustand des Patienten ist identisch, wie bei der Aufnahme.</items> + </term_definitions> + <term_definitions code="at0006"> + <items id="text">Schlechter</items> + <items id="description">Der Gesundheitszustand des Patienten ist schlechter, als bei der Aufnahme.</items> + </term_definitions> + <term_definitions code="at0007"> + <items id="text">Verstorben</items> + <items id="description">Der Patient verstarb während des Krankenhausaufenthaltes.</items> + </term_definitions> + <term_definitions code="at0008"> + <items id="text">Unbestimmt</items> + <items id="description">Unbestimmt.</items> + </term_definitions> + <term_definitions code="at0011"> + <items id="text">Entlassungsdatum/-uhrzeit</items> + <items id="description">Datum/Uhrzeit, an dem der Patient entlassen wurde.</items> + </term_definitions> + <term_definitions code="at0033"> + <items id="text">Entlassungsarzt</items> + <items id="description">Informationen zum Entlassungsarzt.</items> + </term_definitions> + <term_definitions code="at0034"> + <items id="text">ID</items> + <items id="description">*</items> + </term_definitions> + <term_definitions code="at0035"> + <items id="text">Familienname</items> + <items id="description">*</items> + </term_definitions> + <term_definitions code="at0036"> + <items id="text">Nachname</items> + <items id="description">*</items> + </term_definitions> + <term_definitions code="at0038"> + <items id="text">Aufenthaltsdauer</items> + <items id="description">Dauer des Krankenhausaufenthaltes.</items> + </term_definitions> + <term_definitions code="at0040"> + <items id="text">Art der Entlassung</items> + <items id="description">Grund der Entlassung</items> + </term_definitions> + <term_definitions code="at0050"> + <items id="text">Zusätzliche Informationen</items> + <items id="description">Kommentare</items> + </term_definitions> + <term_definitions code="at0051"> + <items id="text">Entlassungsanweisungen</items> + <items id="description">Entlassungsanweisungen für Patienten.</items> + </term_definitions> + <term_definitions code="at0058"> + <items id="text">Behandelnder Arzt</items> + <items id="description">Der behandelnde Arzt, der dem Patienten eine Dienstleistung erbracht hat.</items> + </term_definitions> + <term_definitions code="at0059"> + <items id="text">ID</items> + <items id="description">*</items> + </term_definitions> + <term_definitions code="at0060"> + <items id="text">Familienname</items> + <items id="description">*</items> + </term_definitions> + <term_definitions code="at0061"> + <items id="text">Nachname</items> + <items id="description">*</items> + </term_definitions> + <term_definitions code="at0062"> + <items id="text">Überweisender Arzt</items> + <items id="description">Arzt, der den Patienten an den behandelnden Arzt überwiesen hat.</items> + </term_definitions> + <term_definitions code="at0063"> + <items id="text">Nachname</items> + <items id="description">*</items> + </term_definitions> + <term_definitions code="at0064"> + <items id="text">Familienname</items> + <items id="description">*</items> + </term_definitions> + <term_definitions code="at0065"> + <items id="text">ID</items> + <items id="description">*</items> + </term_definitions> + <term_definitions code="at0066"> + <items id="text">Letzter Patientenstandort</items> + <items id="description">*</items> + </term_definitions> + <term_definitions code="at0067"> + <items id="text">Zugewiesener Patientenstandort</items> + <items id="description">Für die lokale Verwendung enthält dieses Feld den Typ der Organisationseinheit oder der klinischen Einheit.</items> + </term_definitions> + <term_definitions code="at0068"> + <items id="text">Sonstige</items> + <items id="description">Sonstige</items> + </term_definitions> + <term_definitions code="SNOMED-CT::261665006"> + <items id="text">Unknown (qualifier value)</items> + </term_definitions> + <term_definitions code="SNOMED-CT::32485007"> + <items id="text">Hospital admission (procedure)</items> + </term_definitions> + <term_definitions code="SNOMED-CT::419099009"> + <items id="text">Dead (finding)</items> + </term_definitions> + <term_definitions code="SNOMED-CT::371827001"> + <items id="text">Patient discharged alive (finding)</items> + </term_definitions> + <term_definitions code="SNOMED-CT::3457005"> + <items id="text">Patient referral (procedure)</items> + </term_definitions> + <term_definitions code="SNOMED-CT::306237005"> + <items id="text">Referral to palliative care service (procedure)</items> + </term_definitions> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <upper_included>false</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </interval> + </cardinality> + </attributes> + <archetype_id> + <value>openEHR-EHR-COMPOSITION.registereintrag.v1</value> + </archetype_id> + <template_id> + <value>GECCO_Entlassungsdaten</value> + </template_id> + <term_definitions code="at0000"> + <items id="text">Entlassungsdaten</items> + <items id="description">Generische Zusammenstellung zur Darstellung eines Datensatzes für Forschungszwecke. </items> + </term_definitions> + <term_definitions code="at0001"> + <items id="text">Baum</items> + <items id="description">@ internal @</items> + </term_definitions> + <term_definitions code="at0002"> + <items id="text">Erweiterung</items> + <items id="description">Ergänzende Angaben zum Registereintrag. </items> + </term_definitions> + <term_definitions code="at0004"> + <items id="text">Status</items> + <items id="description">Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten.</items> + </term_definitions> + <term_definitions code="at0005"> + <items id="text">Kategorie</items> + <items id="description">Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils).</items> + </term_definitions> + <term_definitions code="at0010"> + <items id="text">registriert</items> + <items id="description">*</items> + </term_definitions> + <term_definitions code="at0011"> + <items id="text">vorläufig</items> + <items id="description">*</items> + </term_definitions> + <term_definitions code="at0012"> + <items id="text">final</items> + <items id="description">*</items> + </term_definitions> + <term_definitions code="at0013"> + <items id="text">geändert</items> + <items id="description">*</items> + </term_definitions> + </definition> + <annotations path="[openEHR-EHR-COMPOSITION.registereintrag.v1]/content[openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0 and name/value='Entlassungsart']"> + <items id="444932008">Dependence on ventilator (finding)</items> + <items id="55128-3">Discharge disposition</items> + </annotations> +</template> diff --git a/src/main/resources/profiles/DischargeDisposition.xml b/src/main/resources/profiles/DischargeDisposition.xml new file mode 100644 index 000000000..7ddc199a8 --- /dev/null +++ b/src/main/resources/profiles/DischargeDisposition.xml @@ -0,0 +1,4923 @@ +<StructureDefinition xmlns="http://hl7.org/fhir"> + <id value="gecco-observation-discharge-disposition" /> + <url value="https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/discharge-disposition" /> + <version value="1.0" /> + <name value="DischargeDisposition" /> + <title value="Discharge Disposition" /> + <status value="active" /> + <date value="2020-10-29" /> + <publisher value="Charité" /> + <contact> + <telecom> + <system value="url" /> + <value value="https://www.bihealth.org/en/research/core-facilities/interoperability/" /> + </telecom> + </contact> + <description value="The type of discharge from a hospital or care facility" /> + <fhirVersion value="4.0.1" /> + <mapping> + <identity value="workflow" /> + <uri value="http://hl7.org/fhir/workflow" /> + <name value="Workflow Pattern" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <uri value="http://snomed.info/conceptdomain" /> + <name value="SNOMED CT Concept Domain Binding" /> + </mapping> + <mapping> + <identity value="v2" /> + <uri value="http://hl7.org/v2" /> + <name value="HL7 v2 Mapping" /> + </mapping> + <mapping> + <identity value="rim" /> + <uri value="http://hl7.org/v3" /> + <name value="RIM Mapping" /> + </mapping> + <mapping> + <identity value="w5" /> + <uri value="http://hl7.org/fhir/fivews" /> + <name value="FiveWs Pattern Mapping" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <uri value="http://snomed.org/attributebinding" /> + <name value="SNOMED CT Attribute Binding" /> + </mapping> + <kind value="resource" /> + <abstract value="false" /> + <type value="Observation" /> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Observation" /> + <derivation value="constraint" /> + <snapshot> + <element id="Observation"> + <path value="Observation" /> + <short value="Measurements and simple assertions" /> + <definition value="Measurements and simple assertions made about a patient, device or other subject." /> + <comment value="Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc. Other resources are used to provide context for observations such as laboratory reports, etc." /> + <alias value="Vital Signs" /> + <alias value="Measurement" /> + <alias value="Results" /> + <alias value="Tests" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation" /> + <min value="0" /> + <max value="*" /> + </base> + <constraint> + <key value="dom-2" /> + <severity value="error" /> + <human value="If the resource is contained in another resource, it SHALL NOT contain nested Resources" /> + <expression value="contained.contained.empty()" /> + <xpath value="not(parent::f:contained and f:contained)" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="dom-4" /> + <severity value="error" /> + <human value="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated" /> + <expression value="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()" /> + <xpath value="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="dom-3" /> + <severity value="error" /> + <human value="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 value="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 value="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 value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice"> + <valueBoolean value="true" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation"> + <valueMarkdown value="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." /> + </extension> + <key value="dom-6" /> + <severity value="warning" /> + <human value="A resource should have narrative for robust management" /> + <expression value="text.`div`.exists()" /> + <xpath value="exists(f:text/h:div)" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="dom-5" /> + <severity value="error" /> + <human value="If a resource is contained in another resource, it SHALL NOT have a security label" /> + <expression value="contained.meta.security.empty()" /> + <xpath value="not(exists(f:contained/*/f:meta/f:security))" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="obs-7" /> + <severity value="error" /> + <human value="If Observation.code is the same as an Observation.component.code then the value element associated with the code SHALL NOT be present" /> + <expression value="value.empty() or component.code.where(coding.intersect(%resource.code.coding).exists()).empty()" /> + <xpath value="not(f:*[starts-with(local-name(.), 'value')] and (for $coding in f:code/f:coding return f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value] [f:system/@value=$coding/f:system/@value]))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <constraint> + <key value="obs-6" /> + <severity value="error" /> + <human value="dataAbsentReason SHALL only be present if Observation.value[x] is not present" /> + <expression value="dataAbsentReason.empty() or value.empty()" /> + <xpath value="not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="Entity. Role, or Act" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 363787002 |Observable entity|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Observation[classCode=OBS, moodCode=EVN]" /> + </mapping> + </element> + <element id="Observation.id"> + <path value="Observation.id" /> + <short value="Logical id of this artifact" /> + <definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <isSummary value="true" /> + </element> + <element id="Observation.meta"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.meta" /> + <short value="Metadata about the resource" /> + <definition value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.meta" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Meta" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.meta.id"> + <path value="Observation.meta.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.meta.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.meta.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.meta.versionId"> + <path value="Observation.meta.versionId" /> + <short value="Version specific identifier" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Meta.versionId" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.meta.lastUpdated"> + <path value="Observation.meta.lastUpdated" /> + <short value="When the resource version last changed" /> + <definition value="When the resource last changed - e.g. when the version changed." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Meta.lastUpdated" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="instant" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.meta.source"> + <path value="Observation.meta.source" /> + <short value="Identifies where the resource comes from" /> + <definition value="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 value="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. This 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 value="0" /> + <max value="1" /> + <base> + <path value="Meta.source" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.meta.profile"> + <path value="Observation.meta.profile" /> + <short value="Profiles this resource claims to conform to" /> + <definition value="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 value="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 value="0" /> + <max value="*" /> + <base> + <path value="Meta.profile" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="canonical" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/StructureDefinition" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.meta.security"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.meta.security" /> + <short value="Security Labels applied to this resource" /> + <definition value="Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure." /> + <comment value="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 value="0" /> + <max value="*" /> + <base> + <path value="Meta.security" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="SecurityLabels" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> + <valueBoolean value="true" /> + </extension> + <strength value="extensible" /> + <description value="Security Labels from the Healthcare Privacy and Security Classification System." /> + <valueSet value="http://hl7.org/fhir/ValueSet/security-labels" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + </element> + <element id="Observation.meta.tag"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.meta.tag" /> + <short value="Tags applied to this resource" /> + <definition value="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 value="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 value="0" /> + <max value="*" /> + <base> + <path value="Meta.tag" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="Tags" /> + </extension> + <strength value="example" /> + <description value="Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones"." /> + <valueSet value="http://hl7.org/fhir/ValueSet/common-tags" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + </element> + <element id="Observation.implicitRules"> + <path value="Observation.implicitRules" /> + <short value="A set of rules under which this content was created" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.implicitRules" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="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 value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.language"> + <path value="Observation.language" /> + <short value="Language of the resource content" /> + <definition value="The base language in which the resource is written." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.language" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"> + <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="Language" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> + <valueBoolean value="true" /> + </extension> + <strength value="preferred" /> + <description value="A human language." /> + <valueSet value="http://hl7.org/fhir/ValueSet/languages" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.text" /> + <short value="Text summary of the resource, for human interpretation" /> + <definition value="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 value="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 value="narrative" /> + <alias value="html" /> + <alias value="xhtml" /> + <alias value="display" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="DomainResource.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Narrative" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Act.text?" /> + </mapping> + </element> + <element id="Observation.contained"> + <path value="Observation.contained" /> + <short value="Contained, inline Resources" /> + <definition value="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 value="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 value="inline resources" /> + <alias value="anonymous resources" /> + <alias value="contained resources" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.contained" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Resource" /> + </type> + <mapping> + <identity value="rim" /> + <map value="Entity. Role, or Act" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.modifierExtension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Extensions that cannot be ignored" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.identifier"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.identifier" /> + <short value="Business Identifier for observation" /> + <definition value="A unique identifier assigned to this observation." /> + <requirements value="Allows observations to be distinguished and referenced." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.identifier" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Identifier" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="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]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="Identifier" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.identifier" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.identifier" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.21 For OBX segments from systems without OBX-21 support a combination of ORC/OBR and OBX must be negotiated between trading partners to uniquely identify the OBX segment. Depending on how V2 has been implemented each of these may be an option: 1) OBR-3 + OBX-3 + OBX-4 or 2) OBR-3 + OBR-4 + OBX-3 + OBX-4 or 2) some other way to uniquely ID the OBR/ORC + OBX-3 + OBX-4." /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="id" /> + </mapping> + </element> + <element id="Observation.basedOn"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.basedOn" /> + <short value="Fulfills plan, proposal or order" /> + <definition value="A plan, proposal or order that is fulfilled in whole or in part by this event. For example, a MedicationRequest may require a patient to have laboratory test performed before it is dispensed." /> + <comment value="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." /> + <requirements value="Allows tracing of authorization for the event and tracking whether proposals/recommendations were acted upon." /> + <alias value="Fulfills" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.basedOn" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/CarePlan" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/DeviceRequest" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationRequest" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/NutritionOrder" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/ServiceRequest" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.basedOn" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="ORC" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".inboundRelationship[typeCode=COMP].source[moodCode=EVN]" /> + </mapping> + </element> + <element id="Observation.partOf"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.partOf" /> + <short value="Part of referenced event" /> + <definition value="A larger event of which this particular Observation is a component or step. For example, an observation as part of a procedure." /> + <comment value="To link an Observation to an Encounter use `encounter`. See the [Notes](observation.html#obsgrouping) below for guidance on referencing another Observation." /> + <alias value="Container" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.partOf" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationDispense" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationStatement" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Procedure" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImagingStudy" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.partOf" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Varies by domain" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".outboundRelationship[typeCode=FLFS].target" /> + </mapping> + </element> + <element id="Observation.status"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint"> + <valueString value="default: final" /> + </extension> + <path value="Observation.status" /> + <short value="registered | preliminary | final | amended +" /> + <definition value="The status of the result value." /> + <comment value="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." /> + <requirements value="Need to track the status of individual results. Some results are finalized before the whole report is finalized." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Observation.status" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="This element is labeled 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 value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationStatus" /> + </extension> + <strength value="required" /> + <description value="Codes providing the status of an observation." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-status|4.0.1" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.status" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.status" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 445584004 |Report by finality status|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-11" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="status Amended & Final are differentiated by whether it is the subject of a ControlAct event with a type of "revise"" /> + </mapping> + </element> + <element id="Observation.category"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.category" /> + <short value="Classification of type of observation" /> + <definition value="A code that classifies the general type of observation being made." /> + <comment value="In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once. The level of granularity is defined by the category concepts in the value set." /> + <requirements value="Used for filtering what observations are retrieved and displayed." /> + <min value="1" /> + <max value="*" /> + <base> + <path value="Observation.category" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationCategory" /> + </extension> + <strength value="preferred" /> + <description value="Codes for high level observation categories." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-category" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.class" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".outboundRelationship[typeCode="COMP].target[classCode="LIST", moodCode="EVN"].code" /> + </mapping> + </element> + <element id="Observation.category.id"> + <path value="Observation.category.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.category.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.category.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.category.coding"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.category.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Observation.category.coding:observationCategory"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.category.coding" /> + <sliceName value="observationCategory" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="http://terminology.hl7.org/CodeSystem/observation-category" /> + <code value="social-history" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Observation.category.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Observation.category.text" /> + <short value="Plain text representation of the concept" /> + <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="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 value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element id="Observation.code"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.code" /> + <short value="Type of observation (code / type)" /> + <definition value="Describes what was observed. Sometimes this is called the observation "name"." /> + <comment value="*All* code-value and, if present, component.code-component.value pairs need to be taken into account to correctly understand the meaning of the observation." /> + <requirements value="Knowing what kind of observation is being made is essential to understanding the observation." /> + <alias value="Name" /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Observation.code" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationCode" /> + </extension> + <strength value="example" /> + <description value="Codes identifying names of simple observations." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-codes" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.code" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.what[x]" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 363787002 |Observable entity| OR < 386053000 |Evaluation procedure|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="code" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="116680003 |Is a|" /> + </mapping> + </element> + <element id="Observation.code.id"> + <path value="Observation.code.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.code.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.code.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.code.coding"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.code.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Observation.code.coding:loinc"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.code.coding" /> + <sliceName value="loinc" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="http://loinc.org" /> + <code value="55128-3" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Observation.code.coding:loinc.id"> + <path value="Observation.code.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.code.coding:loinc.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.code.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.code.coding:loinc.system"> + <path value="Observation.code.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Observation.code.coding:loinc.version"> + <path value="Observation.code.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Observation.code.coding:loinc.code"> + <path value="Observation.code.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Observation.code.coding:loinc.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Observation.code.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Observation.code.coding:loinc.userSelected"> + <path value="Observation.code.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Observation.code.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Observation.code.text" /> + <short value="Plain text representation of the concept" /> + <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="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 value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element id="Observation.subject"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.subject" /> + <short value="Who and/or what the observation is about" /> + <definition value="The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation." /> + <comment value="One would expect this element to be a cardinality of 1..1. The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated." /> + <requirements value="Observations have no value if you don't know who or what they're about." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Observation.subject" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.subject" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.subject[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="participation[typeCode=RTGT]" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.subject" /> + </mapping> + </element> + <element id="Observation.focus"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="trial-use" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.focus" /> + <short value="What the observation is about, when it is not about the subject of record" /> + <definition value="The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record. The focus of an observation could also be an existing condition, an intervention, the subject's diet, another observation of the subject, or a body structure such as tumor or implanted device. An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus." /> + <comment value="Typically, an observation is made about the subject - a patient, or group of patients, location, or device - and the distinction between the subject and what is directly measured for an observation is specified in the observation code itself ( e.g., "Blood Glucose") and does not need to be represented separately using this element. Use `specimen` if a reference to a specimen is required. If a code is required instead of a resource use either `bodysite` for bodysites or the standard extension [focusCode](extension-observation-focuscode.html)." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.focus" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.subject[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="participation[typeCode=SBJ]" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.subject" /> + </mapping> + </element> + <element id="Observation.encounter"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.encounter" /> + <short value="Healthcare event during which this observation is made" /> + <definition value="The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made." /> + <comment value="This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter (e.g. pre-admission laboratory tests)." /> + <requirements value="For some observations it may be important to know the link between an observation and a particular encounter." /> + <alias value="Context" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.encounter" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.context" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.context" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN]" /> + </mapping> + </element> + <element id="Observation.effective[x]"> + <path value="Observation.effective[x]" /> + <short value="Clinically relevant time/time-period for observation" /> + <definition value="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself." /> + <comment value="At least a date should be present unless this observation is a historical report. For recording imprecise or "fuzzy" times (For example, a blood glucose measurement taken "after breakfast") use the [Timing](datatypes.html#timing) datatype which allow the measurement to be tied to regular life events." /> + <requirements value="Knowing when an observation was deemed true is important to its relevance as well as determining trends." /> + <alias value="Occurrence" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.effective[x]" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <type> + <code value="Period" /> + </type> + <type> + <code value="Timing" /> + </type> + <type> + <code value="instant" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.occurrence[x]" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.done[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-14, and/or OBX-19 after v2.4 (depends on who observation made)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="effectiveTime" /> + </mapping> + </element> + <element id="Observation.issued"> + <path value="Observation.issued" /> + <short value="Date/Time this version was made available" /> + <definition value="The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified." /> + <comment value="For Observations that don’t require review and verification, it may be the same as the [`lastUpdated` ](resource-definitions.html#Meta.lastUpdated) time of the resource itself. For Observations that do require review and verification for certain updates, it might not be the same as the `lastUpdated` time of the resource itself due to a non-clinically significant update that doesn’t require the new version to be reviewed and verified again." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.issued" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="instant" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.recorded" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBR.22 (or MSH.7), or perhaps OBX-19 (depends on who observation made)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="participation[typeCode=AUT].time" /> + </mapping> + </element> + <element id="Observation.performer"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.performer" /> + <short value="Who is responsible for the observation" /> + <definition value="Who was responsible for asserting the observed value as "true"." /> + <comment value="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." /> + <requirements value="May give a degree of confidence in the observation and also indicates where follow-up questions should be directed." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.performer" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/CareTeam" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.performer.actor" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.actor" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.15 / (Practitioner) OBX-16, PRT-5:PRT-4='RO' / (Device) OBX-18 , PRT-10:PRT-4='EQUIP' / (Organization) OBX-23, PRT-8:PRT-4='PO'" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="participation[typeCode=PRF]" /> + </mapping> + </element> + <element id="Observation.value[x]"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.value[x]" /> + <slicing> + <discriminator> + <type value="type" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Actual result" /> + <definition value="The information determined as a result of making the observation, if the information has a simple value." /> + <comment value="An observation may have; 1) a single value here, 2) both a value and a set of related or component values, or 3) only a set of related or component values. If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value. For additional guidance, see the [Notes section](observation.html#notes) below." /> + <requirements value="An observation exists to have a value, though it might not if it is in error, or if it represents a group of observations." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Observation.value[x]" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Quantity" /> + </type> + <type> + <code value="CodeableConcept" /> + </type> + <type> + <code value="string" /> + </type> + <type> + <code value="boolean" /> + </type> + <type> + <code value="integer" /> + </type> + <type> + <code value="Range" /> + </type> + <type> + <code value="Ratio" /> + </type> + <type> + <code value="SampledData" /> + </type> + <type> + <code value="time" /> + </type> + <type> + <code value="dateTime" /> + </type> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <condition value="obs-7" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 441742003 |Evaluation finding|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.2, OBX.5, OBX.6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="363714003 |Interprets|" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.value[x]" /> + <sliceName value="valueCodeableConcept" /> + <short value="Actual result" /> + <definition value="The information determined as a result of making the observation, if the information has a simple value." /> + <comment value="An observation may have; 1) a single value here, 2) both a value and a set of related or component values, or 3) only a set of related or component values. If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value. For additional guidance, see the [Notes section](observation.html#notes) below." /> + <requirements value="An observation exists to have a value, though it might not if it is in error, or if it represents a group of observations." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.value[x]" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <condition value="obs-7" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 441742003 |Evaluation finding|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.2, OBX.5, OBX.6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="363714003 |Interprets|" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.id"> + <path value="Observation.value[x].id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.value[x].extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.value[x].coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.value[x].coding" /> + <sliceName value="snomed" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="http://snomed.info/sct" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <valueSet value="https://www.netzwerk-universitaetsmedizin.de/fhir/ValueSet/discharge-disposition" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed.id"> + <path value="Observation.value[x].coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.value[x].coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed.system"> + <path value="Observation.value[x].coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed.version"> + <path value="Observation.value[x].coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed.code"> + <path value="Observation.value[x].coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Observation.value[x].coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed.userSelected"> + <path value="Observation.value[x].coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Observation.value[x].text" /> + <short value="Plain text representation of the concept" /> + <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="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 value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element id="Observation.dataAbsentReason"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.dataAbsentReason" /> + <short value="Why the result is missing" /> + <definition value="Provides a reason why the expected value in the element Observation.value[x] is missing." /> + <comment value="Null or exceptional values can be represented two ways in FHIR Observations. One way is to simply include them in the value set and represent the exceptions in the value. For example, measurement values for a serology test could be "detected", "not detected", "inconclusive", or "specimen unsatisfactory". The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values. For example, the dataAbsentReason code "error" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0. Because of these options, use-case agreements are required to interpret general observations for null or exceptional values." /> + <requirements value="For many results it is necessary to handle exceptional values in measurements." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.dataAbsentReason" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <condition value="obs-6" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationValueAbsentReason" /> + </extension> + <strength value="extensible" /> + <description value="Codes specifying why the result (`Observation.value[x]`) is missing." /> + <valueSet value="http://hl7.org/fhir/ValueSet/data-absent-reason" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value.nullFlavor" /> + </mapping> + </element> + <element id="Observation.interpretation"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.interpretation" /> + <short value="High, low, normal, etc." /> + <definition value="A categorical assessment of an observation value. For example, high, low, normal." /> + <comment value="Historically used for laboratory results (known as 'abnormal flag' ), its use extends to other use cases where coded interpretations are relevant. Often reported as one or more simple compact codes this element is often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result." /> + <requirements value="For some results, particularly numeric results, an interpretation is necessary to fully understand the significance of a result." /> + <alias value="Abnormal Flag" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.interpretation" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationInterpretation" /> + </extension> + <strength value="extensible" /> + <description value="Codes identifying interpretations of observations." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-interpretation" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 260245000 |Findings values|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-8" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="interpretationCode" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="363713009 |Has interpretation|" /> + </mapping> + </element> + <element id="Observation.note"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.note" /> + <short value="Comments about the observation" /> + <definition value="Comments about the observation or the results." /> + <comment value="May include general statements about the observation, or statements about significant, unexpected or unreliable results values, or information about its source when relevant to its interpretation." /> + <requirements value="Need to be able to provide free text additional information." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.note" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Annotation" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Act" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="NTE.3 (partner NTE to OBX, or sometimes another (child?) OBX)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="subjectOf.observationEvent[code="annotation"].value" /> + </mapping> + </element> + <element id="Observation.bodySite"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.bodySite" /> + <short value="Observed body part" /> + <definition value="Indicates the site on the subject's body where the observation was made (i.e. the target site)." /> + <comment value="Only used if not implicit in code found in Observation.code. In many systems, this may be represented as a related observation instead of an inline component. If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ bodySite](extension-bodysite.html)." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="Observation.bodySite" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="BodySite" /> + </extension> + <strength value="example" /> + <description value="Codes describing anatomical locations. May include laterality." /> + <valueSet value="http://hl7.org/fhir/ValueSet/body-site" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 123037004 |Body structure|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-20" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="targetSiteCode" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="718497002 |Inherent location|" /> + </mapping> + </element> + <element id="Observation.method"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.method" /> + <short value="How it was done" /> + <definition value="Indicates the mechanism used to perform the observation." /> + <comment value="Only used if not implicit in code for Observation.code." /> + <requirements value="In some cases, method can impact results and is thus used for determining whether results can be compared or determining significance of results." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.method" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationMethod" /> + </extension> + <strength value="example" /> + <description value="Methods for simple observations." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-methods" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-17" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="methodCode" /> + </mapping> + </element> + <element id="Observation.specimen"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.specimen" /> + <short value="Specimen used for this observation" /> + <definition value="The specimen that was used when this observation was made." /> + <comment value="Should only be used if not implicit in code found in `Observation.code`. Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report)." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="Observation.specimen" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Specimen" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 123038009 |Specimen|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SPM segment" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="participation[typeCode=SPC].specimen" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="704319004 |Inherent in|" /> + </mapping> + </element> + <element id="Observation.device"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.device" /> + <short value="(Measurement) Device" /> + <definition value="The device used to generate the observation data." /> + <comment value="Note that this is not meant to represent a device involved in the transmission of the result, e.g., a gateway. Such devices may be documented using the Provenance resource where relevant." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.device" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/DeviceMetric" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 49062001 |Device|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-17 / PRT -10" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="participation[typeCode=DEV]" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="424226004 |Using device|" /> + </mapping> + </element> + <element id="Observation.referenceRange"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange" /> + <short value="Provides guide for interpretation" /> + <definition value="Guidance on how to interpret the value by comparison to a normal or recommended range. Multiple reference ranges are interpreted as an "OR". In other words, to represent two distinct target populations, two `referenceRange` elements would be used." /> + <comment value="Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this might not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties." /> + <requirements value="Knowing what values are considered "normal" can help evaluate the significance of a particular result. Need to be able to provide multiple reference ranges for different contexts." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.referenceRange" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="obs-3" /> + <severity value="error" /> + <human value="Must have at least a low or a high or text" /> + <expression value="low.exists() or high.exists() or text.exists()" /> + <xpath value="(exists(f:low) or exists(f:high)or exists(f:text))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="outboundRelationship[typeCode=REFV]/target[classCode=OBS, moodCode=EVN]" /> + </mapping> + </element> + <element id="Observation.referenceRange.id"> + <path value="Observation.referenceRange.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.referenceRange.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.referenceRange.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.referenceRange.low"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange.low" /> + <short value="Low Range, if relevant" /> + <definition value="The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3)." /> + <comment value="The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.referenceRange.low" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Quantity" /> + <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity" /> + </type> + <condition value="ele-1" /> + <condition value="obs-3" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <constraint> + <key value="sqty-1" /> + <severity value="error" /> + <human value="The comparator is not used on a SimpleQuantity" /> + <expression value="comparator.empty()" /> + <xpath value="not(exists(f:comparator))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isModifier value="false" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value:IVL_PQ.low" /> + </mapping> + </element> + <element id="Observation.referenceRange.high"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange.high" /> + <short value="High Range, if relevant" /> + <definition value="The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3)." /> + <comment value="The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.referenceRange.high" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Quantity" /> + <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity" /> + </type> + <condition value="ele-1" /> + <condition value="obs-3" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <constraint> + <key value="sqty-1" /> + <severity value="error" /> + <human value="The comparator is not used on a SimpleQuantity" /> + <expression value="comparator.empty()" /> + <xpath value="not(exists(f:comparator))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isModifier value="false" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value:IVL_PQ.high" /> + </mapping> + </element> + <element id="Observation.referenceRange.type"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange.type" /> + <short value="Reference range qualifier" /> + <definition value="Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range." /> + <comment value="This SHOULD be populated if there is more than one range. If this element is not present then the normal range is assumed." /> + <requirements value="Need to be able to say what kind of reference range this is - normal, recommended, therapeutic, etc., - for proper interpretation." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.referenceRange.type" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationRangeMeaning" /> + </extension> + <strength value="preferred" /> + <description value="Code for the meaning of a reference range." /> + <valueSet value="http://hl7.org/fhir/ValueSet/referencerange-meaning" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 260245000 |Findings values| OR < 365860008 |General clinical state finding| OR < 250171008 |Clinical history or observation findings| OR < 415229000 |Racial group| OR < 365400002 |Finding of puberty stage| OR < 443938003 |Procedure carried out on subject|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-10" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="interpretationCode" /> + </mapping> + </element> + <element id="Observation.referenceRange.appliesTo"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange.appliesTo" /> + <short value="Reference range population" /> + <definition value="Codes to indicate the target population this reference range applies to. For example, a reference range may be based on the normal population or a particular sex or race. Multiple `appliesTo` are interpreted as an "AND" of the target populations. For example, to represent a target population of African American females, both a code of female and a code for African American would be used." /> + <comment value="This SHOULD be populated if there is more than one range. If this element is not present then the normal population is assumed." /> + <requirements value="Need to be able to identify the target population for proper interpretation." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.referenceRange.appliesTo" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationRangeType" /> + </extension> + <strength value="example" /> + <description value="Codes identifying the population the reference range applies to." /> + <valueSet value="http://hl7.org/fhir/ValueSet/referencerange-appliesto" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 260245000 |Findings values| OR < 365860008 |General clinical state finding| OR < 250171008 |Clinical history or observation findings| OR < 415229000 |Racial group| OR < 365400002 |Finding of puberty stage| OR < 443938003 |Procedure carried out on subject|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-10" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="interpretationCode" /> + </mapping> + </element> + <element id="Observation.referenceRange.age"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange.age" /> + <short value="Applicable age range, if relevant" /> + <definition value="The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so." /> + <comment value="The stated low and high value are assumed to have arbitrarily high precision when it comes to determining which values are in the range. I.e. 1.99 is not in the range 2 -> 3." /> + <requirements value="Some analytes vary greatly over age." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.referenceRange.age" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Range" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="rng-2" /> + <severity value="error" /> + <human value="If present, low SHALL have a lower value than high" /> + <expression value="low.empty() or high.empty() or (low <= high)" /> + <xpath value="not(exists(f:low/f:value/@value)) or not(exists(f:high/f:value/@value)) or (number(f:low/f:value/@value) <= number(f:high/f:value/@value))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="NR and also possibly SN (but see also quantity)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<QTY[not(type="TS")]> [lowClosed="true" and highClosed="true"]or URG<QTY[not(type="TS")]>" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="outboundRelationship[typeCode=PRCN].targetObservationCriterion[code="age"].value" /> + </mapping> + </element> + <element id="Observation.referenceRange.text"> + <path value="Observation.referenceRange.text" /> + <short value="Text based reference range in an observation" /> + <definition value="Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of "Negative" or a list or table of "normals"." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.referenceRange.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value:ST" /> + </mapping> + </element> + <element id="Observation.hasMember"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.hasMember" /> + <short value="Related resource that belongs to the Observation group" /> + <definition value="This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group." /> + <comment value="When using this element, an observation will typically have either a value or a set of related resources, although both may be present in some cases. For a discussion on the ways Observations can assembled in groups together, see [Notes](observation.html#obsgrouping) below. Note that a system may calculate results from [QuestionnaireResponse](questionnaireresponse.html) into a final score and represent the score as an Observation." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.hasMember" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/MolecularSequence" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Relationships established by OBX-4 usage" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="outBoundRelationship" /> + </mapping> + </element> + <element id="Observation.derivedFrom"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.derivedFrom" /> + <short value="Related measurements the observation is made from" /> + <definition value="The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image." /> + <comment value="All the reference choices that are listed in this element can represent clinical observations and other measurements that may be the source for a derived value. The most common reference will be another Observation. For a discussion on the ways Observations can assembled in groups together, see [Notes](observation.html#obsgrouping) below." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.derivedFrom" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/DocumentReference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImagingStudy" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Media" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/MolecularSequence" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Relationships established by OBX-4 usage" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".targetObservation" /> + </mapping> + </element> + <element id="Observation.component"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component" /> + <short value="Component results" /> + <definition value="Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations." /> + <comment value="For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below." /> + <requirements value="Component observations share the same attributes in the Observation resource as the primary observation and are always treated a part of a single observation (they are not separable). However, the reference range for the primary observation value is not inherited by the component values and is required when appropriate for each component observation." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.component" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="containment by OBX-4?" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="outBoundRelationship[typeCode=COMP]" /> + </mapping> + </element> + <element id="Observation.component.id"> + <path value="Observation.component.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.component.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.component.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.component.code"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.code" /> + <short value="Type of component observation (code / type)" /> + <definition value="Describes what was observed. Sometimes this is called the observation "code"." /> + <comment value="*All* code-value and component.code-component.value pairs need to be taken into account to correctly understand the meaning of the observation." /> + <requirements value="Knowing what kind of observation is being made is essential to understanding the observation." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Observation.component.code" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationCode" /> + </extension> + <strength value="example" /> + <description value="Codes identifying names of simple observations." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-codes" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.what[x]" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 363787002 |Observable entity| OR < 386053000 |Evaluation procedure|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="code" /> + </mapping> + </element> + <element id="Observation.component.value[x]"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.value[x]" /> + <short value="Actual component result" /> + <definition value="The information determined as a result of making the observation, if the information has a simple value." /> + <comment value="Used when observation has a set of component observations. An observation may have both a value (e.g. an Apgar score) and component observations (the observations from which the Apgar score was derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value. For additional guidance, see the [Notes section](observation.html#notes) below." /> + <requirements value="An observation exists to have a value, though it might not if it is in error, or if it represents a group of observations." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.component.value[x]" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Quantity" /> + </type> + <type> + <code value="CodeableConcept" /> + </type> + <type> + <code value="string" /> + </type> + <type> + <code value="boolean" /> + </type> + <type> + <code value="integer" /> + </type> + <type> + <code value="Range" /> + </type> + <type> + <code value="Ratio" /> + </type> + <type> + <code value="SampledData" /> + </type> + <type> + <code value="time" /> + </type> + <type> + <code value="dateTime" /> + </type> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="363714003 |Interprets| < 441742003 |Evaluation finding|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.2, OBX.5, OBX.6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="363714003 |Interprets|" /> + </mapping> + </element> + <element id="Observation.component.dataAbsentReason"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.dataAbsentReason" /> + <short value="Why the component result is missing" /> + <definition value="Provides a reason why the expected value in the element Observation.component.value[x] is missing." /> + <comment value=""Null" or exceptional values can be represented two ways in FHIR Observations. One way is to simply include them in the value set and represent the exceptions in the value. For example, measurement values for a serology test could be "detected", "not detected", "inconclusive", or "test not done". The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values. For example, the dataAbsentReason code "error" could be used when the measurement was not completed. Because of these options, use-case agreements are required to interpret general observations for exceptional values." /> + <requirements value="For many results it is necessary to handle exceptional values in measurements." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.component.dataAbsentReason" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <condition value="obs-6" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationValueAbsentReason" /> + </extension> + <strength value="extensible" /> + <description value="Codes specifying why the result (`Observation.value[x]`) is missing." /> + <valueSet value="http://hl7.org/fhir/ValueSet/data-absent-reason" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value.nullFlavor" /> + </mapping> + </element> + <element id="Observation.component.interpretation"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.interpretation" /> + <short value="High, low, normal, etc." /> + <definition value="A categorical assessment of an observation value. For example, high, low, normal." /> + <comment value="Historically used for laboratory results (known as 'abnormal flag' ), its use extends to other use cases where coded interpretations are relevant. Often reported as one or more simple compact codes this element is often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result." /> + <requirements value="For some results, particularly numeric results, an interpretation is necessary to fully understand the significance of a result." /> + <alias value="Abnormal Flag" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.component.interpretation" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationInterpretation" /> + </extension> + <strength value="extensible" /> + <description value="Codes identifying interpretations of observations." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-interpretation" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 260245000 |Findings values|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-8" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="interpretationCode" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="363713009 |Has interpretation|" /> + </mapping> + </element> + <element id="Observation.component.referenceRange"> + <path value="Observation.component.referenceRange" /> + <short value="Provides guide for interpretation of component result" /> + <definition value="Guidance on how to interpret the value by comparison to a normal or recommended range." /> + <comment value="Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this might not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties." /> + <requirements value="Knowing what values are considered "normal" can help evaluate the significance of a particular result. Need to be able to provide multiple reference ranges for different contexts." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.component.referenceRange" /> + <min value="0" /> + <max value="*" /> + </base> + <contentReference value="#Observation.referenceRange" /> + <mapping> + <identity value="v2" /> + <map value="OBX.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="outboundRelationship[typeCode=REFV]/target[classCode=OBS, moodCode=EVN]" /> + </mapping> + </element> + </snapshot> + <differential> + <element id="Observation.meta"> + <path value="Observation.meta" /> + <mustSupport value="true" /> + </element> + <element id="Observation.meta.profile"> + <path value="Observation.meta.profile" /> + <mustSupport value="true" /> + </element> + <element id="Observation.category"> + <path value="Observation.category" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Observation.category.coding"> + <path value="Observation.category.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <min value="1" /> + </element> + <element id="Observation.category.coding:observationCategory"> + <path value="Observation.category.coding" /> + <sliceName value="observationCategory" /> + <min value="1" /> + <max value="1" /> + <patternCoding> + <system value="http://terminology.hl7.org/CodeSystem/observation-category" /> + <code value="social-history" /> + </patternCoding> + </element> + <element id="Observation.code"> + <path value="Observation.code" /> + <mustSupport value="true" /> + </element> + <element id="Observation.code.coding"> + <path value="Observation.code.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Observation.code.coding:loinc"> + <path value="Observation.code.coding" /> + <sliceName value="loinc" /> + <min value="1" /> + <max value="1" /> + <patternCoding> + <system value="http://loinc.org" /> + <code value="55128-3" /> + </patternCoding> + </element> + <element id="Observation.code.coding:loinc.system"> + <path value="Observation.code.coding.system" /> + <min value="1" /> + </element> + <element id="Observation.code.coding:loinc.code"> + <path value="Observation.code.coding.code" /> + <min value="1" /> + </element> + <element id="Observation.subject"> + <path value="Observation.subject" /> + <min value="1" /> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" /> + </type> + <mustSupport value="true" /> + </element> + <element id="Observation.effective[x]"> + <path value="Observation.effective[x]" /> + <mustSupport value="true" /> + </element> + <element id="Observation.value[x]"> + <path value="Observation.value[x]" /> + <slicing> + <discriminator> + <type value="type" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Observation.value[x]:valueCodeableConcept"> + <path value="Observation.value[x]" /> + <sliceName value="valueCodeableConcept" /> + <type> + <code value="CodeableConcept" /> + </type> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding"> + <path value="Observation.value[x].coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <min value="1" /> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed"> + <path value="Observation.value[x].coding" /> + <sliceName value="snomed" /> + <min value="1" /> + <max value="1" /> + <patternCoding> + <system value="http://snomed.info/sct" /> + </patternCoding> + <binding> + <strength value="required" /> + <valueSet value="https://www.netzwerk-universitaetsmedizin.de/fhir/ValueSet/discharge-disposition" /> + </binding> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed.system"> + <path value="Observation.value[x].coding.system" /> + <min value="1" /> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed.code"> + <path value="Observation.value[x].coding.code" /> + <min value="1" /> + </element> + <element id="Observation.bodySite"> + <path value="Observation.bodySite" /> + <max value="0" /> + </element> + <element id="Observation.specimen"> + <path value="Observation.specimen" /> + <max value="0" /> + </element> + </differential> +</StructureDefinition> \ No newline at end of file diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/PatientDischargeIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/PatientDischargeIT.java new file mode 100644 index 000000000..0394e1e44 --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/PatientDischargeIT.java @@ -0,0 +1,120 @@ +package org.ehrbase.fhirbridge.fhir.observation; + +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import org.ehrbase.fhirbridge.comparators.CustomTemporalAcessorComparator; +import org.ehrbase.fhirbridge.ehr.converter.ConversionException; +import org.ehrbase.fhirbridge.ehr.converter.specific.historyoftravel.HistoryOfTravelConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.patientdischarge.PatientDischargeCompositionConverter; +import org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.GECCOEntlassungsdatenComposition; +import org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.definition.EntlassungsartAdminEntry; +import org.ehrbase.fhirbridge.fhir.AbstractMappingTestSetupIT; +import org.hl7.fhir.r4.model.Observation; +import org.javers.core.Javers; +import org.javers.core.JaversBuilder; +import org.javers.core.diff.Diff; +import org.javers.core.metamodel.clazz.ValueObjectDefinition; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.time.temporal.TemporalAccessor; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +class PatientDischargeIT extends AbstractMappingTestSetupIT { + + public PatientDischargeIT() { + super("Observation/PatientDischarge/", Observation.class); //fhir-Resource + } + + @Test + void createPatientDischarge() throws IOException { + create("create-patient-discharge-alive.json"); + } + + // ##################################################################################### + // check payload + + @Test + void mappingAlive() throws IOException { + testMapping("create-patient-discharge-alive.json", + "paragon-patient-discharge-alive.json"); + } + + @Test + void mappingDead() throws IOException { + testMapping("create-patient-discharge-dead.json", + "paragon-patient-discharge-dead.json"); + } + + @Test + void mappingHospital() throws IOException { + testMapping("create-patient-discharge-hospital.json", + "paragon-patient-discharge-hospital.json"); + } + + @Test + void mappingPalliative() throws IOException { + testMapping("create-patient-discharge-palliative.json", + "paragon-patient-discharge-palliative.json"); + } + + @Test + void mappingReferral() throws IOException { + testMapping("create-patient-discharge-referral.json", + "paragon-patient-discharge-referral.json"); + } + + @Test + void mappingUnknown() throws IOException { + testMapping("create-patient-discharge-unknown.json", + "paragon-patient-discharge-unknown.json"); + } + + // ##################################################################################### + // check exceptions + + @Test + void createInvalidSystem() throws IOException { + // copy of alive, manipulated lines 57 + Exception exception = executeMappingException("create-patient-discharge-invalid-system.json"); + assertEquals("The system is not correct. It should be 'http://snomed.info/sct', but it was 'http://loinc.org'.", exception.getMessage()); + } + + @Test + void createInvalidCode() throws IOException { + // copy of alive, manipulated line 58 + Exception exception = executeMappingException("create-patient-discharge-invalid-code.json"); + assertEquals("Value code 999999999 is not supported", exception.getMessage()); + } + + // ##################################################################################### + // default + + @Override + public Javers getJavers() { + return JaversBuilder.javers() + .registerValue(TemporalAccessor.class, new CustomTemporalAcessorComparator()) + .registerValueObject(new ValueObjectDefinition(GECCOEntlassungsdatenComposition.class, List.of("location", "feederAudit"))) + .registerValueObject(EntlassungsartAdminEntry.class) + .build(); + } + + @Override + public Exception executeMappingException(String path) throws IOException { + Observation obs = (Observation) testFileLoader.loadResource(path); + return assertThrows(UnprocessableEntityException.class, () -> + new PatientDischargeCompositionConverter().convert(obs) + ); + } + + @Override + public void testMapping(String resourcePath, String paragonPath) throws IOException { + Observation observation = (Observation) super.testFileLoader.loadResource(resourcePath); + PatientDischargeCompositionConverter patientDischargeCompositionConverter = new PatientDischargeCompositionConverter(); + GECCOEntlassungsdatenComposition mapped = patientDischargeCompositionConverter.convert(observation); + Diff diff = compareCompositions(getJavers(), paragonPath, mapped); + assertEquals(0, diff.getChanges().size()); + } +} \ No newline at end of file diff --git a/src/test/resources/Observation/PatientDischarge/create-patient-discharge-alive.json b/src/test/resources/Observation/PatientDischarge/create-patient-discharge-alive.json new file mode 100644 index 000000000..31b00585f --- /dev/null +++ b/src/test/resources/Observation/PatientDischarge/create-patient-discharge-alive.json @@ -0,0 +1,63 @@ +{ + "resourceType": "Observation", + "id": "611b9cc3-d006-4ee3-8ca6-de1888bba24b", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/discharge-disposition" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "OBI" + } + ] + }, + "system": "https://www.charite.de/fhir/CodeSystem/observation-identifiers", + "value": "55128-3_DischargeDisposition", + "assigner": { + "reference": "Organization/Charité" + } + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "social-history" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "55128-3", + "display": "Discharge disposition" + } + ], + "text": "Type of discharge" + }, + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-10-16T08:49:21+02:00", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "371827001", + "display": "Patient discharged alive (finding)" + } + ] + } +} \ No newline at end of file diff --git a/src/test/resources/Observation/PatientDischarge/create-patient-discharge-dead.json b/src/test/resources/Observation/PatientDischarge/create-patient-discharge-dead.json new file mode 100644 index 000000000..3d2ed7a7e --- /dev/null +++ b/src/test/resources/Observation/PatientDischarge/create-patient-discharge-dead.json @@ -0,0 +1,63 @@ +{ + "resourceType": "Observation", + "id": "5cf992e8-4003-4f61-a78b-08049b1c3f0f", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/discharge-disposition" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "OBI" + } + ] + }, + "system": "https://www.charite.de/fhir/CodeSystem/observation-identifiers", + "value": "55128-3_DischargeDisposition", + "assigner": { + "reference": "Organization/Charité" + } + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "social-history" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "55128-3", + "display": "Discharge disposition" + } + ], + "text": "Type of discharge" + }, + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-10-16T08:49:21+02:00", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "419099009", + "display": "Dead (finding)" + } + ] + } +} \ No newline at end of file diff --git a/src/test/resources/Observation/PatientDischarge/create-patient-discharge-hospital.json b/src/test/resources/Observation/PatientDischarge/create-patient-discharge-hospital.json new file mode 100644 index 000000000..41acebf30 --- /dev/null +++ b/src/test/resources/Observation/PatientDischarge/create-patient-discharge-hospital.json @@ -0,0 +1,63 @@ +{ + "resourceType": "Observation", + "id": "9a74b814-cf34-455e-ad2b-9f26b70ba665", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/discharge-disposition" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "OBI" + } + ] + }, + "system": "https://www.charite.de/fhir/CodeSystem/observation-identifiers", + "value": "55128-3_DischargeDisposition", + "assigner": { + "reference": "Organization/Charité" + } + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "social-history" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "55128-3", + "display": "Discharge disposition" + } + ], + "text": "Type of discharge" + }, + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-10-16T08:49:21+02:00", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "32485007", + "display": "Hospital admission (procedure)" + } + ] + } +} \ No newline at end of file diff --git a/src/test/resources/Observation/PatientDischarge/create-patient-discharge-invalid-code.json b/src/test/resources/Observation/PatientDischarge/create-patient-discharge-invalid-code.json new file mode 100644 index 000000000..ed9a5c82b --- /dev/null +++ b/src/test/resources/Observation/PatientDischarge/create-patient-discharge-invalid-code.json @@ -0,0 +1,63 @@ +{ + "resourceType": "Observation", + "id": "611b9cc3-d006-4ee3-8ca6-de1888bba24b", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/discharge-disposition" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "OBI" + } + ] + }, + "system": "https://www.charite.de/fhir/CodeSystem/observation-identifiers", + "value": "55128-3_DischargeDisposition", + "assigner": { + "reference": "Organization/Charité" + } + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "social-history" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "55128-3", + "display": "Discharge disposition" + } + ], + "text": "Type of discharge" + }, + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-10-16T08:49:21+02:00", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "999999999", + "display": "Patient discharged alive (finding)" + } + ] + } +} \ No newline at end of file diff --git a/src/test/resources/Observation/PatientDischarge/create-patient-discharge-invalid-system.json b/src/test/resources/Observation/PatientDischarge/create-patient-discharge-invalid-system.json new file mode 100644 index 000000000..1b7eba091 --- /dev/null +++ b/src/test/resources/Observation/PatientDischarge/create-patient-discharge-invalid-system.json @@ -0,0 +1,63 @@ +{ + "resourceType": "Observation", + "id": "611b9cc3-d006-4ee3-8ca6-de1888bba24b", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/discharge-disposition" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "OBI" + } + ] + }, + "system": "https://www.charite.de/fhir/CodeSystem/observation-identifiers", + "value": "55128-3_DischargeDisposition", + "assigner": { + "reference": "Organization/Charité" + } + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "social-history" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "55128-3", + "display": "Discharge disposition" + } + ], + "text": "Type of discharge" + }, + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-10-16T08:49:21+02:00", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://loinc.org", + "code": "371827001", + "display": "Patient discharged alive (finding)" + } + ] + } +} \ No newline at end of file diff --git a/src/test/resources/Observation/PatientDischarge/create-patient-discharge-palliative.json b/src/test/resources/Observation/PatientDischarge/create-patient-discharge-palliative.json new file mode 100644 index 000000000..1e6c98304 --- /dev/null +++ b/src/test/resources/Observation/PatientDischarge/create-patient-discharge-palliative.json @@ -0,0 +1,63 @@ +{ + "id": "f5e75865-0907-4842-bfa5-5d0cec8b2769", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/discharge-disposition" + ] + }, + "category": [ + { + "coding": [ + { + "code": "social-history", + "system": "http://terminology.hl7.org/CodeSystem/observation-category" + } + ] + } + ], + "code": { + "coding": [ + { + "code": "55128-3", + "display": "Discharge disposition", + "system": "http://loinc.org" + } + ], + "text": "Type of discharge" + }, + "effectiveDateTime": "2020-10-16T08:49:21+02:00", + "identifier": [ + { + "assigner": { + "reference": "Organization/Charité" + }, + "system": "https://www.charite.de/fhir/CodeSystem/observation-identifiers", + "type": { + "coding": [ + { + "code": "OBI", + "system": "http://terminology.hl7.org/CodeSystem/v2-0203" + } + ] + }, + "value": "55128-3_DischargeDisposition" + } + ], + "status": "final", + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "valueCodeableConcept": { + "coding": [ + { + "code": "306237005", + "display": "Referral to palliative care service (procedure)", + "system": "http://snomed.info/sct" + } + ] + }, + "resourceType": "Observation" +} \ No newline at end of file diff --git a/src/test/resources/Observation/PatientDischarge/create-patient-discharge-referral.json b/src/test/resources/Observation/PatientDischarge/create-patient-discharge-referral.json new file mode 100644 index 000000000..879f669e0 --- /dev/null +++ b/src/test/resources/Observation/PatientDischarge/create-patient-discharge-referral.json @@ -0,0 +1,63 @@ +{ + "resourceType": "Observation", + "id": "eec00864-8fe5-4c47-89f7-e687f30ae977", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/discharge-disposition" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "OBI" + } + ] + }, + "system": "https://www.charite.de/fhir/CodeSystem/observation-identifiers", + "value": "55128-3_DischargeDisposition", + "assigner": { + "reference": "Organization/Charité" + } + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "social-history" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "55128-3", + "display": "Discharge disposition" + } + ], + "text": "Type of discharge" + }, + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-10-16T08:49:21+02:00", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "3457005", + "display": "Patient referral (procedure)" + } + ] + } +} \ No newline at end of file diff --git a/src/test/resources/Observation/PatientDischarge/create-patient-discharge-unknown.json b/src/test/resources/Observation/PatientDischarge/create-patient-discharge-unknown.json new file mode 100644 index 000000000..d360c912d --- /dev/null +++ b/src/test/resources/Observation/PatientDischarge/create-patient-discharge-unknown.json @@ -0,0 +1,63 @@ +{ + "resourceType": "Observation", + "id": "17c24f1d-12be-4637-8903-e50e6c5f76d1", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/discharge-disposition" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "OBI" + } + ] + }, + "system": "https://www.charite.de/fhir/CodeSystem/observation-identifiers", + "value": "55128-3_DischargeDisposition", + "assigner": { + "reference": "Organization/Charité" + } + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "social-history" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "55128-3", + "display": "Discharge disposition" + } + ], + "text": "Type of discharge" + }, + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-10-16T08:49:21+02:00", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "261665006", + "display": "Unknown (qualifier value)" + } + ] + } +} \ No newline at end of file diff --git a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-alive.json b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-alive.json new file mode 100644 index 000000000..99ebb330a --- /dev/null +++ b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-alive.json @@ -0,0 +1,151 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsdaten" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Entlassungsdaten" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/3/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "ADMIN_ENTRY", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsart" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Art der Entlassung" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Patient discharged alive (finding)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "371827001" + } + }, + "archetype_node_id" : "at0040" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-dead.json b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-dead.json new file mode 100644 index 000000000..c2665a71b --- /dev/null +++ b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-dead.json @@ -0,0 +1,151 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsdaten" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Entlassungsdaten" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/7/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "ADMIN_ENTRY", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsart" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Art der Entlassung" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Dead (finding)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "419099009" + } + }, + "archetype_node_id" : "at0040" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-hospital.json b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-hospital.json new file mode 100644 index 000000000..e9a01afb4 --- /dev/null +++ b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-hospital.json @@ -0,0 +1,151 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsdaten" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Entlassungsdaten" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/9/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "ADMIN_ENTRY", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsart" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Art der Entlassung" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Hospital admission (procedure)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "32485007" + } + }, + "archetype_node_id" : "at0040" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-palliative.json b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-palliative.json new file mode 100644 index 000000000..c5d6b07bb --- /dev/null +++ b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-palliative.json @@ -0,0 +1,151 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsdaten" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Entlassungsdaten" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/11/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "ADMIN_ENTRY", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsart" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Art der Entlassung" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Referral to palliative care service (procedure)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "306237005" + } + }, + "archetype_node_id" : "at0040" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-referral.json b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-referral.json new file mode 100644 index 000000000..ebc44a4dd --- /dev/null +++ b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-referral.json @@ -0,0 +1,151 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsdaten" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Entlassungsdaten" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/13/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "ADMIN_ENTRY", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsart" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Art der Entlassung" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Patient referral (procedure)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "3457005" + } + }, + "archetype_node_id" : "at0040" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-unknown.json b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-unknown.json new file mode 100644 index 000000000..5df115936 --- /dev/null +++ b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-unknown.json @@ -0,0 +1,151 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsdaten" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Entlassungsdaten" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/15/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "ADMIN_ENTRY", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsart" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Art der Entlassung" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Unknown (qualifier value)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "261665006" + } + }, + "archetype_node_id" : "at0040" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file From f11bfc05dca5f86b28ea395f347b3e5ae641d638 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 27 Apr 2021 16:51:58 +0200 Subject: [PATCH 007/141] Upgrade to HAPI FHIR 5.3.0 --- pom.xml | 2 +- .../db/changelog/db.changelog-1.2.xml | 108 ++++++++++++++++++ .../db/changelog/db.changelog-master.xml | 1 + 3 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/db/changelog/db.changelog-1.2.xml diff --git a/pom.xml b/pom.xml index 9f00245db..795400e2f 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ <ehrbase-sdk.version>develop-SNAPSHOT</ehrbase-sdk.version> <findbugs-jsr305.version>3.0.2</findbugs-jsr305.version> <guava.version>30.1-jre</guava.version> - <hapi-fhir.version>5.2.0</hapi-fhir.version> + <hapi-fhir.version>5.3.0</hapi-fhir.version> <ipf.version>4.0.0</ipf.version> <javassist.version>3.27.0-GA</javassist.version> <jaxb-core.version>2.3.0.1</jaxb-core.version> diff --git a/src/main/resources/db/changelog/db.changelog-1.2.xml b/src/main/resources/db/changelog/db.changelog-1.2.xml new file mode 100644 index 000000000..24f6dda53 --- /dev/null +++ b/src/main/resources/db/changelog/db.changelog-1.2.xml @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.9.xsd"> + + <!-- HAPI FHIR 5.3.0 --> + <changeSet id="1" author="subigre"> + <addColumn tableName="MPI_LINK"> + <column name="GOLDEN_RESOURCE_PID" type="bigint"> + <constraints nullable="false"/> + </column> + <column name="RULE_COUNT" type="bigint"/> + </addColumn> + + <addForeignKeyConstraint baseTableName="MPI_LINK" + baseColumnNames="GOLDEN_RESOURCE_PID" + constraintName="FK_EMPI_LINK_GOLDEN_RESOURCE" + referencedTableName="HFJ_RESOURCE" referencedColumnNames="RES_ID"/> + </changeSet> + + <changeSet id="2" author="subigre"> + <dropUniqueConstraint tableName="TRM_VALUESET_CONCEPT" + constraintName="IDX_VS_CONCEPT_CS_CD"/> + + <addUniqueConstraint tableName="TRM_VALUESET_CONCEPT" + columnNames="VALUESET_PID, SYSTEM_URL, CODEVAL" + constraintName="IDX_VS_CONCEPT_CSCD"/> + + <createSequence sequenceName="SEQ_SPIDX_QUANTITY_NRML" + startValue="1" incrementBy="50"/> + + <createTable tableName="HFJ_SPIDX_QUANTITY_NRML"> + <column name="RES_ID" type="bigint"> + <constraints nullable="false"/> + </column> + <column name="RES_TYPE" type="varchar(100)"> + <constraints nullable="false"/> + </column> + <column name="SP_UPDATED" type="timestamp"/> + <column name="SP_MISSING" type="boolean"> + <constraints nullable="false"/> + </column> + <column name="SP_NAME" type="varchar(100)"> + <constraints nullable="false"/> + </column> + <column name="SP_ID" type="bigint"> + <constraints nullable="false" primaryKey="true" + primaryKeyName="HFJ_SPIDX_QTY_NRML_PKEY"/> + </column> + <column name="SP_SYSTEM" type="varchar(200)"/> + <column name="SP_UNITS" type="varchar(200)"/> + <column name="HASH_IDENTITY_AND_UNITS" type="bigint"/> + <column name="HASH_IDENTITY_SYS_UNITS" type="bigint"/> + <column name="HASH_IDENTITY" type="bigint"/> + <column name="SP_VALUE" type="float"/> + </createTable> + + <createIndex indexName="IDX_SP_QNTY_NRML_HASH" + tableName="HFJ_SPIDX_QUANTITY_NRML"> + <column name="HASH_IDENTITY"/> + <column name="SP_VALUE"/> + </createIndex> + + <createIndex indexName="IDX_SP_QNTY_NRML_HASH_UN" + tableName="HFJ_SPIDX_QUANTITY_NRML"> + <column name="HASH_IDENTITY_AND_UNITS"/> + <column name="SP_VALUE"/> + </createIndex> + + <createIndex indexName="IDX_SP_QNTY_NRML_HASH_SYSUN" + tableName="HFJ_SPIDX_QUANTITY_NRML"> + <column name="HASH_IDENTITY_SYS_UNITS"/> + <column name="SP_VALUE"/> + </createIndex> + + <createIndex indexName="IDX_SP_QNTY_NRML_UPDATED" + tableName="HFJ_SPIDX_QUANTITY_NRML"> + <column name="SP_UPDATED"/> + </createIndex> + + <createIndex indexName="IDX_SP_QNTY_NRML_RESID" + tableName="HFJ_SPIDX_QUANTITY_NRML"> + <column name="RES_ID"/> + </createIndex> + + <addColumn tableName="HFJ_RESOURCE"> + <column name="SP_QUANTITY_NRML_PRESENT" type="boolean"/> + </addColumn> + + <addColumn tableName="HFJ_SPIDX_QUANTITY_NRML"> + <column name="PARTITION_ID" type="integer"/> + <column name="PARTITION_DATE" type="date"/> + </addColumn> + + <addForeignKeyConstraint + baseTableName="HFJ_SPIDX_QUANTITY_NRML" baseColumnNames="RES_ID" + constraintName="FKRCJOVMUH5KC0O6FVBLE319PYV" + referencedTableName="HFJ_RESOURCE" referencedColumnNames="RES_ID"/> + + <modifyDataType tableName="HFJ_SPIDX_QUANTITY" + columnName="SP_VALUE" newDataType="double"/> + + <addColumn tableName="HFJ_RES_LINK"> + <column name="TARGET_RESOURCE_VERSION" type="bigint"/> + </addColumn> + </changeSet> +</databaseChangeLog> \ No newline at end of file diff --git a/src/main/resources/db/changelog/db.changelog-master.xml b/src/main/resources/db/changelog/db.changelog-master.xml index 15252f098..d55893195 100644 --- a/src/main/resources/db/changelog/db.changelog-master.xml +++ b/src/main/resources/db/changelog/db.changelog-master.xml @@ -5,4 +5,5 @@ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.9.xsd"> <include file="db/changelog/db.changelog-1.0.xml"/> + <include file="db/changelog/db.changelog-1.2.xml"/> </databaseChangeLog> From b97b7f698fb7b7b865f31f25ecb0f3bc5db7ab85 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 27 Apr 2021 16:52:18 +0200 Subject: [PATCH 008/141] Fix issue with hibernate search properties --- src/main/resources/application.yml | 39 +++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 26d0fbc67..fb70a08e8 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -33,9 +33,6 @@ fhir-bridge: # jwk-set-uri: # jws-algorithm: RS256 -demographics: - patient: - url: https://demographics-service.ctr.dev.num-codex.de/fhir/Patient/ # # Spring Properties # @@ -59,17 +56,15 @@ spring: hibernate: ddl-auto: validate open-in-view: false + # Hibernate Properties properties: hibernate.dialect: org.hibernate.dialect.H2Dialect - hibernate.jdbc.batch_size: 20 - hibernate.cache.use_query_cache: false - hibernate.cache.use_second_level_cache: false - hibernate.cache.use_structured_entries: false - hibernate.cache.use_minimal_puts: false - hibernate.search.default.indexBase: ${java.io.tmpdir}/fhir-bridge/lucenefiles - hibernate.search.model_mapping: ca.uhn.fhir.jpa.search.LuceneSearchMappingFactory - hibernate.search.default.directory_provider: filesystem - hibernate.search.lucene_version: LUCENE_CURRENT + hibernate.search.enabled: true + hibernate.search.backend.type: lucene + hibernate.search.backend.analysis.configurer: ca.uhn.fhir.jpa.search.HapiLuceneAnalysisConfigurer + hibernate.search.backend.directory.type: local-filesystem + hibernate.search.backend.directory.root: ${java.io.tmpdir}/fhir-bridge/lucenefiles + hibernate.search.backend.lucene_version: lucene_current # Liquibase Properties liquibase: database-change-log-table: DATABASE_CHANGELOG @@ -78,17 +73,33 @@ spring: messages: basename: messages/messages use-code-as-default-message: true + +# +# IPF Properties +# ipf: + # Audit Properties atna: audit-enabled: false # audit-repository-host: # audit-repository-port: +# audit-source-id: +# audit-value-if-missing: + # FHIR Properties fhir: fhir-version: r4 + +# +# Server Properties +# server: port: 8888 servlet: context-path: /fhir-bridge + +# +# Logging Properties +# logging: level: ca.uhn.fhir: warn @@ -100,3 +111,7 @@ logging: org.quartz: warn org.springframework: warn org.springframework.boot: warn + +demographics: + patient: + url: https://demographics-service.ctr.dev.num-codex.de/fhir/Patient/ \ No newline at end of file From 5e62afa2c8584d25bebac29f0806f0ee2aed0e9a Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Thu, 29 Apr 2021 15:57:16 +0200 Subject: [PATCH 009/141] added inital mappings --- .../ImmunizationToActionConverter.java | 32 + .../ImmunizationToCompositionConverter.java | 15 + .../ehr/converter/generic/TimeConverter.java | 19 +- .../ehr/converter/specific/CodeSystem.java | 1 + .../DiagnoseCompositionConverter.java | 7 - .../ImpfstatusCompositionConverter.java | 19 + .../impfstatus/ImpfungActionConverter.java | 102 + ...ekannterImpfstatusEvaluationConverter.java | 20 + .../ImpfstatusComposition.java | 246 + .../ImpfstatusCompositionContainment.java | 60 + .../AussageUeberAbwesenheitDefiningCode.java | 42 + .../definition/CareflowStepDefiningCode.java | 45 + .../definition/CurrentStateDefiningCode.java | 43 + .../definition/ImpfstoffDefiningCode.java | 529 ++ .../definition/ImpfungAction.java | 247 + .../definition/ImpfungActionContainment.java | 56 + .../definition/ImpfungGegenDefiningCode.java | 121 + .../UnbekannterImpfstatusEvaluation.java | 112 + ...annterImpfstatusEvaluationContainment.java | 36 + .../definition/VerabreichteDosenCluster.java | 131 + .../VerabreichteDosenClusterContainment.java | 39 + src/main/resources/opt/Impfstatus.opt | 3360 ++++++++++ src/main/resources/profiles/Immunization.xml | 5596 +++++++++++++++++ 23 files changed, 10866 insertions(+), 12 deletions(-) create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToActionConverter.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToCompositionConverter.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfstatusCompositionConverter.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfungActionConverter.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/UnbekannterImpfstatusEvaluationConverter.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusCompositionContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/AussageUeberAbwesenheitDefiningCode.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/CareflowStepDefiningCode.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/CurrentStateDefiningCode.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfstoffDefiningCode.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungAction.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungActionContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungGegenDefiningCode.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluation.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluationContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenCluster.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenClusterContainment.java create mode 100644 src/main/resources/opt/Impfstatus.opt create mode 100644 src/main/resources/profiles/Immunization.xml diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToActionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToActionConverter.java new file mode 100644 index 000000000..cad82aa58 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToActionConverter.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.converter.generic; + +import org.ehrbase.client.classgenerator.interfaces.EntryEntity; +import org.hl7.fhir.r4.model.Immunization; +import org.hl7.fhir.r4.model.Observation; +import org.springframework.lang.NonNull; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.time.temporal.TemporalAccessor; + +public abstract class ImmunizationToActionConverter<E extends EntryEntity> extends EntryEntityConverter<Immunization, E>{ + + @Override + public E convert(@NonNull Immunization resource) { + E entryEntity = super.convert(resource); + invokeTimeValues(entryEntity, resource); + return entryEntity; + } + + protected void invokeTimeValues(E entryEntity, Immunization resource){ + try { + Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); + setTimeValue.invoke(entryEntity, TimeConverter.convertImmunizationTime(resource)); + } catch ( IllegalAccessException | InvocationTargetException exception) { + exception.printStackTrace(); + }catch (NoSuchMethodException ignored){ + //ignored + } + } + +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToCompositionConverter.java new file mode 100644 index 000000000..c6ccd2993 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToCompositionConverter.java @@ -0,0 +1,15 @@ +package org.ehrbase.fhirbridge.ehr.converter.generic; + +import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; +import org.hl7.fhir.r4.model.Immunization; +import org.springframework.lang.NonNull; + +public abstract class ImmunizationToCompositionConverter<C extends CompositionEntity> extends CompositionConverter<Immunization, C>{ + + @Override + public C convert(@NonNull Immunization resource) { + C composition = super.convert(resource); + composition.setStartTimeValue(TimeConverter.convertImmunizationTime(resource)); // occurenceTime + return composition; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java index ede914f26..7098bc696 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java @@ -1,10 +1,9 @@ package org.ehrbase.fhirbridge.ehr.converter.generic; -import org.hl7.fhir.r4.model.Condition; -import org.hl7.fhir.r4.model.DiagnosticReport; -import org.hl7.fhir.r4.model.Observation; -import org.hl7.fhir.r4.model.Procedure; -import org.hl7.fhir.r4.model.QuestionnaireResponse; +import org.ehrbase.fhirbridge.ehr.converter.specific.diagnosticreportlab.DiagnosticReportLabCompositionConverter; +import org.hl7.fhir.r4.model.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.time.OffsetDateTime; import java.time.ZonedDateTime; @@ -12,6 +11,7 @@ import java.util.Optional; public class TimeConverter { + private static final Logger LOG = LoggerFactory.getLogger(TimeConverter.class); private TimeConverter() { throw new IllegalStateException("Utility class"); @@ -102,4 +102,13 @@ public static Optional<TemporalAccessor> convertProcedureEndTime(Procedure resou return Optional.empty(); } } + + public static TemporalAccessor convertImmunizationTime(Immunization immunization) { + if (immunization.hasOccurrenceDateTimeType() && !immunization.getOccurrenceDateTimeType().hasExtension()) { + return immunization.getOccurrenceDateTimeType().getValueAsCalendar().toZonedDateTime(); + } else { + LOG.warn("No occurrence Date Time was given, as default the current time is now taken. This date time should better be added to the resource"); + return ZonedDateTime.now(); + } + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/CodeSystem.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/CodeSystem.java index 5961ce70a..a9843e0d1 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/CodeSystem.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/CodeSystem.java @@ -8,6 +8,7 @@ public enum CodeSystem { HL7_DATA_ABSENT_REASON("http://terminology.hl7.org/CodeSystem/data-absent-reason"); + private final String url; CodeSystem(String url){ diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/diagnose/DiagnoseCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/diagnose/DiagnoseCompositionConverter.java index 482293082..5b1a1944c 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/diagnose/DiagnoseCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/diagnose/DiagnoseCompositionConverter.java @@ -1,15 +1,8 @@ package org.ehrbase.fhirbridge.ehr.converter.specific.diagnose; -import com.nedap.archie.rm.datavalues.DvIdentifier; -import com.nedap.archie.rm.generic.PartyIdentified; -import org.ehrbase.fhirbridge.ehr.converter.generic.CompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.generic.ConditionToCompositionConverter; import org.ehrbase.fhirbridge.ehr.opt.diagnosecomposition.DiagnoseComposition; -import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.Condition; -import org.hl7.fhir.r4.model.DateTimeType; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.lang.NonNull; public class DiagnoseCompositionConverter extends ConditionToCompositionConverter<DiagnoseComposition> { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfstatusCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfstatusCompositionConverter.java new file mode 100644 index 000000000..f60a6347b --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfstatusCompositionConverter.java @@ -0,0 +1,19 @@ +package org.ehrbase.fhirbridge.ehr.converter.specific.impfstatus; + +import org.ehrbase.fhirbridge.ehr.converter.generic.ImmunizationToCompositionConverter; +import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.ImpfstatusComposition; +import org.hl7.fhir.r4.model.Immunization; + +public class ImpfstatusCompositionConverter extends ImmunizationToCompositionConverter<ImpfstatusComposition> { + + @Override + protected ImpfstatusComposition convertInternal(Immunization resource) { + ImpfstatusComposition impfstatusComposition = new ImpfstatusComposition(); + if(!resource.getOccurrenceDateTimeType().hasExtension() || resource.getVaccineCode().getCoding().get(0).getSystem().equals("http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips")){ + impfstatusComposition.setImpfung(new ImpfungActionConverter().convert(resource)); + }else{ + impfstatusComposition.setUnbekannterImpfstatus(new UnbekannterImpfstatusEvaluationConverter().convert(resource)); + } + return impfstatusComposition; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfungActionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfungActionConverter.java new file mode 100644 index 000000000..dd9f21220 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfungActionConverter.java @@ -0,0 +1,102 @@ +package org.ehrbase.fhirbridge.ehr.converter.specific.impfstatus; + +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import org.ehrbase.fhirbridge.ehr.converter.generic.ImmunizationToActionConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem; +import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.ImpfstoffDefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.ImpfungAction; +import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.ImpfungGegenDefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.VerabreichteDosenCluster; +import org.hl7.fhir.r4.model.Immunization; + +import java.util.Optional; + +public class ImpfungActionConverter extends ImmunizationToActionConverter<ImpfungAction> { + + Optional<VerabreichteDosenCluster> verabreichteDosenClusterOptional = Optional.empty(); + + @Override + protected ImpfungAction convertInternal(Immunization resource) { + ImpfungAction impfungAction = new ImpfungAction(); + impfungAction.setImpfstoffDefiningCode(mapImpstoffDefiningCode(resource)); + mapImpfungGegenAndDosis(resource, impfungAction); + return impfungAction; + } + + private void mapImpfungGegenAndDosis(Immunization resource, ImpfungAction impfungAction) { + if (resource.hasProtocolApplied()) { + determineAndSet(resource, impfungAction); + } else { + throw new UnprocessableEntityException("Target Disease code and dose missing"); + } + } + + private void determineAndSet(Immunization resource, ImpfungAction impfungAction) { + for (Immunization.ImmunizationProtocolAppliedComponent immunizationProtocolAppliedComponent : resource.getProtocolApplied()) { + if (immunizationProtocolAppliedComponent.hasTargetDisease()) { + setImfungGegen(impfungAction, resource); + } else if (immunizationProtocolAppliedComponent.hasDoseNumber()) { + setVerabreichteDosis(impfungAction, immunizationProtocolAppliedComponent); + } + } + } + + private void setImfungGegen(ImpfungAction impfungAction, Immunization resource) { + if (resource.getProtocolApplied().get(0).getTargetDisease().get(0).hasCoding() + && resource.getProtocolApplied().get(0).getTargetDisease().get(0).getCoding().get(0).hasSystem() + && resource.getProtocolApplied().get(0).getTargetDisease().get(0).getCoding().get(0).getSystem().equals(CodeSystem.SNOMED.getUrl())) { + impfungAction.setImpfungGegenDefiningCode(mapImpfungGegen(resource)); + } else { + throw new UnprocessableEntityException("Target Disease code"); + } + } + + private ImpfungGegenDefiningCode mapImpfungGegen(Immunization resource) { + String snomedCode = resource.getProtocolApplied().get(0).getTargetDisease().get(0).getCoding().get(0).getCode(); + if (ImpfungGegenDefiningCode.getCodesAsMap().containsKey(snomedCode)) { + return ImpfungGegenDefiningCode.getCodesAsMap().get(snomedCode); + } else { + throw new UnprocessableEntityException("Invalid Snomed Code " + snomedCode + " entered"); + } + } + + private void setVerabreichteDosis(ImpfungAction impfungAction, Immunization.ImmunizationProtocolAppliedComponent resource) { + verabreichteDosenClusterOptional = Optional.empty(); + if (resource.hasDoseNumberPositiveIntType() && !resource.getDoseNumberPositiveIntType().hasExtension()) { // if it contains an unknown no mapping shall be done + setDosisMenge(resource); + } else if (resource.hasSeriesDosesPositiveIntType() && !resource.getSeriesDosesPositiveIntType().hasExtension()) { // if it contains an unknown no mapping shall be done + setDosierungsReihenfolge(resource); + } + verabreichteDosenClusterOptional.ifPresent(impfungAction::setVerabreichteDosen); + } + + private void setDosierungsReihenfolge(Immunization.ImmunizationProtocolAppliedComponent resource) { + VerabreichteDosenCluster verabreichteDosenCluster = getVerabreichteDosenCluster(); + verabreichteDosenCluster.setDosierungsreihenfolgeMagnitude(Long.parseLong(resource.getSeriesDosesPositiveIntType().toString())); + verabreichteDosenClusterOptional = Optional.of(verabreichteDosenCluster); + } + + private void setDosisMenge(Immunization.ImmunizationProtocolAppliedComponent resource) { + VerabreichteDosenCluster verabreichteDosenCluster = getVerabreichteDosenCluster(); + verabreichteDosenCluster.setDosismengeMagnitude(Double.parseDouble(resource.getDoseNumberPositiveIntType().toString())); + verabreichteDosenClusterOptional = Optional.of(verabreichteDosenCluster); + } + + private VerabreichteDosenCluster getVerabreichteDosenCluster() { + if (verabreichteDosenClusterOptional.isEmpty()) { + return new VerabreichteDosenCluster(); + } else { + return verabreichteDosenClusterOptional.get(); + } + } + + private ImpfstoffDefiningCode mapImpstoffDefiningCode(Immunization resource) { + String code = resource.getVaccineCode().getCoding().get(0).getCode(); + if (ImpfstoffDefiningCode.getCodesAsMap().containsKey(code)) { + return ImpfstoffDefiningCode.getCodesAsMap().get(code); + } else { + throw new UnprocessableEntityException("Invalid Code or vaccineCode" + code + " entered"); + } + } +} + diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/UnbekannterImpfstatusEvaluationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/UnbekannterImpfstatusEvaluationConverter.java new file mode 100644 index 000000000..e5a7ff28e --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/UnbekannterImpfstatusEvaluationConverter.java @@ -0,0 +1,20 @@ +package org.ehrbase.fhirbridge.ehr.converter.specific.impfstatus; + +import org.ehrbase.fhirbridge.ehr.converter.generic.EntryEntityConverter; +import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.AussageUeberAbwesenheitDefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.UnbekannterImpfstatusEvaluation; +import org.hl7.fhir.r4.model.Immunization; + +public class UnbekannterImpfstatusEvaluationConverter extends EntryEntityConverter<Immunization, UnbekannterImpfstatusEvaluation> { + + @Override + protected UnbekannterImpfstatusEvaluation convertInternal(Immunization resource) { + UnbekannterImpfstatusEvaluation unbekannterImpfstatusEvaluation = new UnbekannterImpfstatusEvaluation(); + unbekannterImpfstatusEvaluation.setAussageUeberAbwesenheitDefiningCode(mapAussageUeberAbwesenheitCode(resource)); + return unbekannterImpfstatusEvaluation; + } + + private AussageUeberAbwesenheitDefiningCode mapAussageUeberAbwesenheitCode(Immunization resource) { + + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java new file mode 100644 index 000000000..9e27d0e37 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java @@ -0,0 +1,246 @@ +package org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.generic.Participation; +import com.nedap.archie.rm.generic.PartyIdentified; +import com.nedap.archie.rm.generic.PartyProxy; +import java.lang.String; +import java.time.temporal.TemporalAccessor; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Id; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.annotations.Template; +import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; +import org.ehrbase.client.classgenerator.shareddefinition.Category; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.Setting; +import org.ehrbase.client.classgenerator.shareddefinition.Territory; +import org.ehrbase.client.openehrclient.VersionUid; +import org.ehrbase.fhirbridge.ehr.Composition; +import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.ImpfungAction; +import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.UnbekannterImpfstatusEvaluation; + +@Entity +@Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-04-29T13:40:23.832151+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +@Template("Impfstatus") +public class ImpfstatusComposition implements CompositionEntity, Composition { + /** + * Path: Impfstatus/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Impfstatus/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: Impfstatus/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Impfstatus/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Impfstatus/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Impfstatus/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Impfstatus/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Impfstatus/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Impfstatus/Impfung + * Description: Jede Aktivität in Bezug auf die Planung, Vorbereitung, Rezeptverwaltung, Ausgabe, Verabreichung, Einnahme, Absetzung und anderer Verwendung von Arzneimitteln, Impfstoffen, Nahrungsergänzungsmitteln und anderen therapeutischen Mitteln. + * Comment: Dies beschränkt sich nicht nur auf Aktivitäten, die auf der Grundlage von Arzneimittelverordnungen von Ärzten durchgeführt werden, sondern kann sich auch z.B. auf die Einnahme von freiverkäuflichen Medikamenten beziehen. + */ + @Path("/content[openEHR-EHR-ACTION.medication.v1 and name/value='Impfung']") + private ImpfungAction impfung; + + /** + * Path: Impfstatus/Unbekannter Impfstatus + * Description: Aussage darüber, dass bestimmte Gesundheitsinformationen zum Zeitpukt der Erfassung nicht in der Krankenakte oder einem Schriftstück erfasst werden können, da keine Kenntnisse darüber vorhanden sind. + */ + @Path("/content[openEHR-EHR-EVALUATION.absence.v2 and name/value='Unbekannter Impfstatus']") + private UnbekannterImpfstatusEvaluation unbekannterImpfstatus; + + /** + * Path: Impfstatus/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Impfstatus/language + */ + @Path("/language") + private Language language; + + /** + * Path: Impfstatus/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Impfstatus/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode ; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung ; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue ; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public List<Participation> getParticipations() { + return this.participations ; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue ; + } + + public void setLocation(String location) { + this.location = location; + } + + public String getLocation() { + return this.location ; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility ; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode ; + } + + public void setImpfung(ImpfungAction impfung) { + this.impfung = impfung; + } + + public ImpfungAction getImpfung() { + return this.impfung ; + } + + public void setUnbekannterImpfstatus(UnbekannterImpfstatusEvaluation unbekannterImpfstatus) { + this.unbekannterImpfstatus = unbekannterImpfstatus; + } + + public UnbekannterImpfstatusEvaluation getUnbekannterImpfstatus() { + return this.unbekannterImpfstatus ; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } + + public PartyProxy getComposer() { + return this.composer ; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public Language getLanguage() { + return this.language ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } + + public void setTerritory(Territory territory) { + this.territory = territory; + } + + public Territory getTerritory() { + return this.territory ; + } + + public VersionUid getVersionUid() { + return this.versionUid ; + } + + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusCompositionContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusCompositionContainment.java new file mode 100644 index 000000000..c702037cd --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusCompositionContainment.java @@ -0,0 +1,60 @@ +package org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.generic.Participation; +import com.nedap.archie.rm.generic.PartyIdentified; +import com.nedap.archie.rm.generic.PartyProxy; +import java.lang.String; +import java.time.temporal.TemporalAccessor; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.Category; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.Setting; +import org.ehrbase.client.classgenerator.shareddefinition.Territory; +import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.ImpfungAction; +import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.UnbekannterImpfstatusEvaluation; + +public class ImpfstatusCompositionContainment extends Containment { + public SelectAqlField<ImpfstatusComposition> IMPFSTATUS_COMPOSITION = new AqlFieldImp<ImpfstatusComposition>(ImpfstatusComposition.class, "", "ImpfstatusComposition", ImpfstatusComposition.class, this); + + public SelectAqlField<Category> CATEGORY_DEFINING_CODE = new AqlFieldImp<Category>(ImpfstatusComposition.class, "/category|defining_code", "categoryDefiningCode", Category.class, this); + + public ListSelectAqlField<Cluster> ERWEITERUNG = new ListAqlFieldImp<Cluster>(ImpfstatusComposition.class, "/context/other_context[at0001]/items[at0002]", "erweiterung", Cluster.class, this); + + public SelectAqlField<TemporalAccessor> START_TIME_VALUE = new AqlFieldImp<TemporalAccessor>(ImpfstatusComposition.class, "/context/start_time|value", "startTimeValue", TemporalAccessor.class, this); + + public ListSelectAqlField<Participation> PARTICIPATIONS = new ListAqlFieldImp<Participation>(ImpfstatusComposition.class, "/context/participations", "participations", Participation.class, this); + + public SelectAqlField<TemporalAccessor> END_TIME_VALUE = new AqlFieldImp<TemporalAccessor>(ImpfstatusComposition.class, "/context/end_time|value", "endTimeValue", TemporalAccessor.class, this); + + public SelectAqlField<String> LOCATION = new AqlFieldImp<String>(ImpfstatusComposition.class, "/context/location", "location", String.class, this); + + public SelectAqlField<PartyIdentified> HEALTH_CARE_FACILITY = new AqlFieldImp<PartyIdentified>(ImpfstatusComposition.class, "/context/health_care_facility", "healthCareFacility", PartyIdentified.class, this); + + public SelectAqlField<Setting> SETTING_DEFINING_CODE = new AqlFieldImp<Setting>(ImpfstatusComposition.class, "/context/setting|defining_code", "settingDefiningCode", Setting.class, this); + + public SelectAqlField<ImpfungAction> IMPFUNG = new AqlFieldImp<ImpfungAction>(ImpfstatusComposition.class, "/content[openEHR-EHR-ACTION.medication.v1]", "impfung", ImpfungAction.class, this); + + public SelectAqlField<UnbekannterImpfstatusEvaluation> UNBEKANNTER_IMPFSTATUS = new AqlFieldImp<UnbekannterImpfstatusEvaluation>(ImpfstatusComposition.class, "/content[openEHR-EHR-EVALUATION.absence.v2]", "unbekannterImpfstatus", UnbekannterImpfstatusEvaluation.class, this); + + public SelectAqlField<PartyProxy> COMPOSER = new AqlFieldImp<PartyProxy>(ImpfstatusComposition.class, "/composer", "composer", PartyProxy.class, this); + + public SelectAqlField<Language> LANGUAGE = new AqlFieldImp<Language>(ImpfstatusComposition.class, "/language", "language", Language.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(ImpfstatusComposition.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + public SelectAqlField<Territory> TERRITORY = new AqlFieldImp<Territory>(ImpfstatusComposition.class, "/territory", "territory", Territory.class, this); + + private ImpfstatusCompositionContainment() { + super("openEHR-EHR-COMPOSITION.registereintrag.v1"); + } + + public static ImpfstatusCompositionContainment getInstance() { + return new ImpfstatusCompositionContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/AussageUeberAbwesenheitDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/AussageUeberAbwesenheitDefiningCode.java new file mode 100644 index 000000000..74f4a6b41 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/AussageUeberAbwesenheitDefiningCode.java @@ -0,0 +1,42 @@ +package org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition; + +import java.lang.String; +import org.ehrbase.client.classgenerator.EnumValueSet; + +public enum AussageUeberAbwesenheitDefiningCode implements EnumValueSet { + NO_KNOWN_IMMUNIZATIONS("No known immunizations", "", "HL7 NoImmunizationInfoUvIps", "no-known-immunizations"), + + NO_INFORMATION_ABOUT_IMMUNIZATIONS("No information about immunizations", "", "HL7 NoImmunizationInfoUvIps", "no-immunization-info"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + AussageUeberAbwesenheitDefiningCode(String value, String description, String terminologyId, + String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/CareflowStepDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/CareflowStepDefiningCode.java new file mode 100644 index 000000000..8f9d6e897 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/CareflowStepDefiningCode.java @@ -0,0 +1,45 @@ +package org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition; + +import java.lang.String; +import org.ehrbase.client.classgenerator.EnumValueSet; + +public enum CareflowStepDefiningCode implements EnumValueSet { + VERABREICHUNG_EINER_DOSIS_WURDE_AUSGELASSEN("Verabreichung einer Dosis wurde ausgelassen", "Eine Gabe des Arzneimittels wurde zurückgehalten und nicht gegeben. Es besteht keine Erwartung, dass sie später verabreicht wird, obwohl die nächste Dosis (falls es eine gibt) gemäß der ursprünglichen Verordnung verabreicht werden sollte.", "openehr", "at0018"), + + REZEPT_WURDE_AUSGEFUEHRT("Rezept wurde ausgeführt", "Das Rezept wurde erfolgreich ausgeführt/eingehalten.", "openehr", "at0152"), + + REZEPT_IST_UNGUELTIG_ODER_ABGELAUFEN("Rezept ist ungültig oder abgelaufen", "Das Rezept ist ungültig geworden oder ist abgelaufen, ohne das es eingelöst wurde.", "openehr", "at0151"), + + ARZNEIMITTELBEHANDLUNG_GESTOPPT("Arzneimittelbehandlung gestoppt", "Die Verabreichung des Arzneimittels wurde während der Dauer der geplanten Behandlung eingestellt.", "openehr", "at0015"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + CareflowStepDefiningCode(String value, String description, String terminologyId, String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/CurrentStateDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/CurrentStateDefiningCode.java new file mode 100644 index 000000000..a0f852746 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/CurrentStateDefiningCode.java @@ -0,0 +1,43 @@ +package org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition; + +import java.lang.String; +import org.ehrbase.client.classgenerator.EnumValueSet; + +public enum CurrentStateDefiningCode implements EnumValueSet { + COMPLETED("completed", "completed", "openehr", "532"), + + ABORTED("aborted", "aborted", "openehr", "531"), + + ACTIVE("active", "active", "openehr", "245"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + CurrentStateDefiningCode(String value, String description, String terminologyId, String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfstoffDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfstoffDefiningCode.java new file mode 100644 index 000000000..57acad6bf --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfstoffDefiningCode.java @@ -0,0 +1,529 @@ +package org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition; + +import java.lang.String; +import java.util.HashMap; +import java.util.Map; + +import org.ehrbase.client.classgenerator.EnumValueSet; + +public enum ImpfstoffDefiningCode implements EnumValueSet { + TYPHUS_VACCINE_PRODUCT("Typhus vaccine (product)", "", "local_terms", "37146000"), + + VACCINE_PRODUCT_CONTAINING_ONLY_HAEMOPHILUS_INFLUENZAE_TYPE_B_AND_NEISSERIA_MENINGITIDIS_SEROGROUP_C_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing only Haemophilus influenzae type B and Neisseria meningitidis serogroup C antigens (medicinal product)", "", "local_terms", "836500008"), + + HEPATITIS_A_VIRUS_VACCINE("Hepatitis A virus vaccine", "", "local_terms", "14745005"), + + POLIOMYELITIS_ORAL_TRIVALENT_LEBEND_ABGESCHWAECHT("Poliomyelitis, oral, trivalent, lebend abgeschwächt", "", "local_terms", "J07BF02"), + + HAEMOPHILUS_INFLUENZAE_TYPE_B_RECOMBINANT_HEPATITIS_B_VIRUS_VACCINE_PRODUCT("Haemophilus influenzae Type b + recombinant hepatitis B virus vaccine (product)", "", "local_terms", "426971004"), + + VACCINE_PRODUCT_CONTAINING_SALMONELLA_ENTERICA_SUBSPECIES_ENTERICA_SEROVAR_TYPHI_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Salmonella enterica subspecies enterica serovar Typhi antigen (medicinal product)", "", "local_terms", "836390004"), + + DIPHTHERIA_TETANUS_PERTUSSIS_POLIOMYELITIS_RECOMBINANT_HEPATITIS_B_VIRUS_VACCINE_PRODUCT("Diphtheria + tetanus + pertussis + poliomyelitis + recombinant hepatitis B virus vaccine (product)", "", "local_terms", "427542001"), + + VACCINE_PRODUCT_CONTAINING_HEPATITIS_B_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Hepatitis B virus antigen (medicinal product)", "", "local_terms", "836374004"), + + VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_CHOLERA_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_TYPHOID_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Cholera vaccine (substance) } { Has active ingredient (attribute) = Typhoid vaccine (substance) }", "", "local_terms", "787859002:{127489000=396422009}{127489000=396441007}"), + + TOLLWUT_IMPFSTOFFE("Tollwut-Impfstoffe", "", "local_terms", "J07BG"), + + HEPATITIS_A_B_VACCINE_PRODUCT("Hepatitis A+B vaccine (product)", "", "local_terms", "333702001"), + + PERTUSSIS_IMPFSTOFFE("Pertussis-Impfstoffe", "", "local_terms", "J07AJ"), + + VACCINE_PRODUCT_CONTAINING_VACCINIA_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Vaccinia virus antigen (medicinal product)", "", "local_terms", "836389008"), + + VACCINE_PRODUCT_CONTAINING_LIVE_ATTENUATED_MYCOBACTERIUM_BOVIS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing live attenuated Mycobacterium bovis antigen (medicinal product)", "", "local_terms", "836402002"), + + PERTUSSIS_GEREINIGTES_ANTIGEN_KOMBINATIONEN_MIT_TOXOIDEN("Pertussis, gereinigtes Antigen, Kombinationen mit Toxoiden", "", "local_terms", "J07AJ52"), + + IMMUNGLOBULINE_NORMAL_HUMAN("Immunglobuline, normal human", "", "local_terms", "J06BA"), + + DIPHTHERIA_VACCINE("Diphtheria vaccine", "", "local_terms", "428214002"), + + BRUCELLA_ANTIGEN("Brucella-Antigen", "", "local_terms", "J07AD01"), + + MENINGOKOKKEN_TETRAVALENT_A_C_Y_W135_GEREINIGTES_POLYSACCHARID_ANTIGEN("Meningokokken tetravalent (A, C, Y, W-135), gereinigtes Polysaccharid-Antigen", "", "local_terms", "J07AH04"), + + VACCINE_PRODUCT_CONTAINING_ONLY_LIVE_ATTENUATED_HUMAN_ALPHAHERPESVIRUS3_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing only live attenuated Human alphaherpesvirus 3 antigen (medicinal product)", "", "local_terms", "2221000221107"), + + VACCINE_PRODUCT_CONTAINING_YELLOW_FEVER_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Yellow fever virus antigen (medicinal product)", "", "local_terms", "836385002"), + + TUBERKULOSE_IMPFSTOFFE("Tuberkulose-Impfstoffe", "", "local_terms", "J07AN"), + + CYTOMEGALIEVIRUS_IMMUNGLOBULIN("Cytomegalievirus-Immunglobulin", "", "local_terms", "J06BB09"), + + VACCINE_PRODUCT_CONTAINING_HAEMOPHILUS_INFLUENZAE_TYPE_B_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_HUMAN_POLIOVIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Haemophilus influenzae type B antigen (medicinal product) + Vaccine product containing Human poliovirus antigen (medicinal product)", "", "local_terms", "836380007+1031000221108"), + + DIPHTHERIE_POLIOMYELITIS_TETANUS("Diphtherie-Poliomyelitis-Tetanus", "", "local_terms", "J07CA01"), + + ZOSTER_VIRUS_LEBEND_ABGESCHWAECHT("Zoster Virus, lebend abgeschwächt", "", "local_terms", "J07BK02"), + + POCKEN_IMPFSTOFF_LEBEND_MODIFIZIERT("Pocken-Impfstoff, lebend, modifiziert", "", "local_terms", "J07BX01"), + + MEASLES_MUMPS_RUBELLA_VARICELLA_VACCINE_PRODUCT("Measles + mumps + rubella + varicella vaccine (product)", "", "local_terms", "419550004"), + + PRODUCT_CONTAINING_VARICELLA_ZOSTER_VIRUS_ANTIBODY_MEDICINAL_PRODUCT("Product containing Varicella-zoster virus antibody (medicinal product)", "", "local_terms", "62294009"), + + ANTI_D_RH_IMMUNGLOBULIN("Anti-D(rh)-Immunglobulin", "", "local_terms", "J06BB01"), + + VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_AND_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_AND_HAEMOPHILUS_INFLUENZAE_TYPE_B_AND_HUMAN_POLIOVIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae and Haemophilus influenzae type B and Human poliovirus antigens (medicinal product)", "", "local_terms", "838279002"), + + PRODUCT_CONTAINING_HEPATITIS_B_SURFACE_ANTIGEN_IMMUNOGLOBULIN_MEDICINAL_PRODUCT("Product containing Hepatitis B surface antigen immunoglobulin (medicinal product)", "", "local_terms", "9542007"), + + INFLUENZA_VIRUS_VACCINE("Influenza virus vaccine", "", "local_terms", "46233009"), + + MEASLES_AND_MUMPS_VACCINE_PRODUCT("Measles and mumps vaccine (product)", "", "local_terms", "785865001"), + + VARICELLA_ZOSTER_VACCINE("Varicella-zoster vaccine", "", "local_terms", "407737004"), + + DIPHTHERIE_HEPATITIS_B_PERTUSSIS_TETANUS("Diphtherie-Hepatitis B-Pertussis-Tetanus", "", "local_terms", "J07CA05"), + + VACCINE_PRODUCT_CONTAINING_HUMAN_ALPHAHERPESVIRUS3_AND_MEASLES_MORBILLIVIRUS_AND_MUMPS_ORTHORUBULAVIRUS_AND_RUBELLA_VIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Human alphaherpesvirus 3 and Measles morbillivirus and Mumps orthorubulavirus and Rubella virus antigens (medicinal product)", "", "local_terms", "838280004"), + + HAEMOPHILUS_INFLUENZAE_B_UND_HEPATITIS_B("Haemophilus influenzae B und Hepatitis B", "", "local_terms", "J07CA08"), + + MASERN_KOMBINATIONEN_MIT_ROETELN_LEBEND_ABGESCHWAECHT("Masern, Kombinationen mit Röteln, lebend abgeschwächt", "", "local_terms", "J07BD53"), + + TETANUS_TOXOID_KOMBINATIONEN_MIT_DIPHTHERIE_TOXOID("Tetanus-Toxoid, Kombinationen mit Diphtherie-Toxoid", "", "local_terms", "J07AM51"), + + PAPILLOMVIRUS_IMPFSTOFFE("Papillomvirus-Impfstoffe", "", "local_terms", "J07BM"), + + VACCINE_PRODUCT_CONTAINING_INFLUENZA_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Influenza virus antigen (medicinal product)", "", "local_terms", "836377006"), + + GELBFIEBER_IMPFSTOFFE("Gelbfieber-Impfstoffe", "", "local_terms", "J07BL"), + + MENINGOKOKKEN_C_GEREINIGTES_POLYSACCHARID_ANTIGEN_KONJUGIERT("Meningokokken C, gereinigtes Polysaccharid-Antigen, konjugiert", "", "local_terms", "J07AH07"), + + BRUCELLOSE_IMPFSTOFFE("Brucellose-Impfstoffe", "", "local_terms", "J07AD"), + + MEASLES_VACCINE("Measles vaccine", "", "local_terms", "386012008"), + + MASERN_LEBEND_ABGESCHWAECHT("Masern, lebend abgeschwächt", "", "local_terms", "J07BD01"), + + DIPHTHERIE_IMPFSTOFFE("Diphtherie-Impfstoffe", "", "local_terms", "J07AF"), + + PRODUCT_CONTAINING_HUMAN_ANTI_D_IMMUNOGLOBULIN_MEDICINAL_PRODUCT("Product containing human anti-D immunoglobulin (medicinal product)|", "", "local_terms", "786224004"), + + PRODUCT_CONTAINING_PALIVIZUMAB_MEDICINAL_PRODUCT("Product containing palivizumab (medicinal product)", "", "local_terms", "108725001"), + + IMMUNGLOBULINE_NORMAL_HUMAN_ZUR_INTRAVASALEN_ANWENDUNG("Immunglobuline, normal human, zur intravasalen Anwendung", "", "local_terms", "J06BA02"), + + PALIVIZUMAB("Palivizumab", "", "local_terms", "J06BB16"), + + POLIOMYELITIS_IMPFSTOFFE("Poliomyelitis-Impfstoffe", "", "local_terms", "J07BF"), + + CHOLERA_VACCINE("Cholera vaccine", "", "local_terms", "35736007"), + + PRODUCT_CONTAINING_NORMAL_IMMUNOGLOBULIN_HUMAN_MEDICINAL_PRODUCT("Product containing normal immunoglobulin human (medicinal product)", "", "local_terms", "714569001"), + + DIPHTHERIA_PERTUSSIS_TETANUS_VACCINE_PRODUCT("Diphtheria + pertussis + tetanus vaccine (product)", "", "local_terms", "421245007"), + + VACCINE_PRODUCT_CONTAINING_ROTAVIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Rotavirus antigen (medicinal product)", "", "local_terms", "836387005"), + + VARICELLA_ZOSTER_IMMUNGLOBULIN("Varicella/Zoster-Immunglobulin", "", "local_terms", "J06BB03"), + + VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HAEMOPHILUS_INFLUENZAE_TYPE_B_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_LIVE_POLIOVIRUS_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Haemophilus influenzae type b vaccine (substance) } { Has active ingredient (attribute) = Live Poliovirus vaccine (substance) }", "", "local_terms", "787859002:{127489000=412374001}{127489000=396436004}"), + + RUBELLA_VACCINE("Rubella vaccine", "", "local_terms", "386013003"), + + CHOLERA_IMPFSTOFFE("Cholera-Impfstoffe", "", "local_terms", "J07AE"), + + DIPHTHERIA_TETANUS_PERTUSSIS_POLIOMYELITIS_HAEMOPHILUS_INFLUENZAE_B_VACCINE_PRODUCT("Diphtheria + tetanus + pertussis + poliomyelitis + haemophilus influenzae b vaccine (product)", "", "local_terms", "414004005"), + + PRODUCT_CONTAINING_RABIES_HUMAN_IMMUNE_GLOBULIN_MEDICINAL_PRODUCT("Product containing rabies human immune globulin (medicinal product)", "", "local_terms", "80834004"), + + ENCEPHALITIS_JAPANISCHE_LEBEND_ABGESCHWAECHT("Encephalitis, japanische, lebend abgeschwächt", "", "local_terms", "J07BA03"), + + MENINGOCOCCUS_VACCINE("Meningococcus vaccine", "", "local_terms", "423531006"), + + VACCINE_PRODUCT_CONTAINING_ONLY_SEVERE_ACUTE_RESPIRATORY_SYNDROME_CORONAVIRUS2_MESSENGER_RIBONUCLEIC_ACID_MEDICINAL_PRODUCT("Vaccine product containing only Severe acute respiratory syndrome coronavirus 2 messenger ribonucleic acid (medicinal product)", "", "local_terms", "1119349007"), + + VARICELLA_ZOSTER_IMPFSTOFFE("Varicella Zoster Impfstoffe", "", "local_terms", "J07BK"), + + VACCINE_PRODUCT_CONTAINING_HUMAN_POLIOVIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Human poliovirus antigen (medicinal product)", "", "local_terms", "1031000221108"), + + HUMANER_PAPILLOMVIRUS_IMPFSTOFF_TYPEN6111618("Humaner-Papillomvirus-Impfstoff (Typen 6,11,16,18)", "", "local_terms", "J07BM01"), + + INFLUENZA_LEBEND_ABGESCHWAECHT("Influenza, lebend abgeschwächt", "", "local_terms", "J07BB03"), + + PERTUSSIS_INAKTIVIERT_GANZE_ZELLE_KOMBINATIONEN_MIT_TOXOIDEN("Pertussis, inaktiviert, ganze Zelle, Kombinationen mit Toxoiden", "", "local_terms", "J07AJ51"), + + DIPHTHERIE_PERTUSSIS_POLIOMYELITIS_TETANUS_HEPATITIS_B("Diphtherie-Pertussis-Poliomyelitis-Tetanus-Hepatitis B", "", "local_terms", "J07CA12"), + + PERTUSSIS_VACCINE("Pertussis vaccine", "", "local_terms", "61602008"), + + MENINGOKOKKEN_A_GEREINIGTES_POLYSACCHARID_ANTIGEN_KONJUGIERT("Meningokokken A, gereinigtes Polysaccharid-Antigen, konjugiert", "", "local_terms", "J07AH10"), + + VACCINE_PRODUCT_CONTAINING_RABIES_LYSSAVIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Rabies lyssavirus antigen (medicinal product)", "", "local_terms", "836393002"), + + VACCINE_PRODUCT_CONTAINING_NEISSERIA_MENINGITIDIS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Neisseria meningitidis antigen (medicinal product)", "", "local_terms", "836401009"), + + MENINGOKOKKEN_A_GEREINIGTES_POLYSACCHARID_ANTIGEN("Meningokokken A, gereinigtes Polysaccharid-Antigen", "", "local_terms", "J07AH01"), + + DIPHTHERIA_TETANUS_PERTUSSIS_RECOMBINANT_HEPATITIS_B_VIRUS_VACCINE_PRODUCT("Diphtheria + tetanus + pertussis + recombinant hepatitis B virus vaccine (product)", "", "local_terms", "426081003"), + + VACCINE_PRODUCT_CONTAINING_MEASLES_MORBILLIVIRUS_AND_MUMPS_ORTHORUBULAVIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Measles morbillivirus and Mumps orthorubulavirus antigens (medicinal product)", "", "local_terms", "836499004"), + + VACCINE_PRODUCT_CONTAINING_ONLY_CORYNEBACTERIUM_DIPHTHERIAE_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_HAEMOPHILUS_INFLUENZAE_TYPE_B_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_CLOSTRIDIUM_TETANI_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_HEPATITIS_B_VIRUS_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_ONLY_NEISSERIA_MENINGITIDIS_SEROGROUP_A_AND_C_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing only Corynebacterium diphtheriae antigen (medicinal product) + Vaccine product containing Haemophilus influenzae type B antigen (medicinal product) + Vaccine product containing Bordetella pertussis antigen (medicinal product) + Vaccine product containing Clostridium tetani antigen (medicinal product) + Vaccine product containing Hepatitis B virus antigen (medicinal product) + Vaccine product containing only Neisseria meningitidis serogroup A and C antigens (medicinal product)", "", "local_terms", "871729003+836380007+601000221108+863911006+836374004+871871008"), + + MASERN_KOMBINATIONEN_MIT_MUMPS_UND_ROETELN_LEBEND_ABGESCHWAECHT("Masern, Kombinationen mit Mumps und Röteln, lebend abgeschwächt", "", "local_terms", "J07BD52"), + + PNEUMOCOCCAL_VACCINE("Pneumococcal vaccine", "", "local_terms", "333598008"), + + HAEMOPHILUS_INFLUENZAE_TYPE_B_VACCINE("Haemophilus influenzae Type b vaccine", "", "local_terms", "333680004"), + + PEST_INAKTIVIERT_GANZE_ZELLE("Pest, inaktiviert, ganze Zelle", "", "local_terms", "J07AK01"), + + VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_DIPHTHERIA_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HAEMOPHILUS_INFLUENZAE_TYPE_B_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_PERTUSSIS_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_TETANUS_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HEPATITIS_B_VIRUS_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Diphtheria vaccine (substance) } { Has active ingredient (attribute) = Haemophilus influenzae type b vaccine (substance) } { Has active ingredient (attribute) = Pertussis vaccine (substance) } { Has active ingredient (attribute) = Tetanus vaccine (substance) } { Has active ingredient (attribute) = Hepatitis B virus vaccine (substance) }", "", "local_terms", "787859002:{127489000=428126001}{127489000=412374001}{127489000=396433007}{127489000=412375000}{127489000=396424005}"), + + TYPHOID_VACCINE("Typhoid vaccine", "", "local_terms", "89428009"), + + MILZBRAND_IMPFSTOFFE("Milzbrand-Impfstoffe", "", "local_terms", "J07AC"), + + VACCINE_PRODUCT_CONTAINING_ONLY_CORYNEBACTERIUM_DIPHTHERIAE_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_RUBELLA_VIRUS_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_CLOSTRIDIUM_TETANI_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing only Corynebacterium diphtheriae antigen (medicinal product) + Vaccine product containing Rubella virus antigen (medicinal product) + Vaccine product containing Clostridium tetani antigen (medicinal product)", "", "local_terms", "871729003+836388000+863911006"), + + MUMPS_LIVE_VIRUS_VACCINE("Mumps live virus vaccine", "", "local_terms", "90043005"), + + VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_RUBELLA_AND_MUMPS_VACCINE_SUBSTANCE("Vaccine product (product): Has active ingredient (attribute) = Rubella and mumps vaccine (substance)", "", "local_terms", "787859002:127489000=412300006"), + + HAEMOPHILUS_INFLUENZAE_B_KOMBINATIONEN_MIT_MENINGOKOKKEN_C_KONJUGIERT("Haemophilus influenzae B, Kombinationen mit Meningokokken C, konjugiert", "", "local_terms", "J07AG53"), + + VACCINE_PRODUCT_CONTAINING_HAEMOPHILUS_INFLUENZAE_TYPE_B_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Haemophilus influenzae type B antigen (medicinal product) + Vaccine product containing Bordetella pertussis antigen (medicinal product)", "", "local_terms", "836380007+601000221108"), + + VACCINE_PRODUCT_CONTAINING_MUMPS_ORTHORUBULAVIRUS_AND_RUBELLA_VIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Mumps orthorubulavirus and Rubella virus antigens (medicinal product)", "", "local_terms", "836376002"), + + VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_MEASLES_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_RUBELLA_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Measles vaccine (substance) } { Has active ingredient (attribute) = Rubella vaccine (substance) }", "", "local_terms", "787859002:{127489000=396427003}{127489000=396438003}"), + + HEPATITIS_A_TYPHOID_VACCINE_PRODUCT("Hepatitis A+typhoid vaccine (product)", "", "local_terms", "333707007"), + + HUMAN_PAPILLOMAVIRUS_VACCINE("Human papillomavirus vaccine", "", "local_terms", "424519000"), + + VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_AND_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_AND_HAEMOPHILUS_INFLUENZAE_TYPE_B_AND_HEPATITIS_B_VIRUS_AND_HUMAN_POLIOVIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae and Haemophilus influenzae type B and Hepatitis B virus and Human poliovirus antigens (medicinal product)", "", "local_terms", "871896006"), + + KOMBINATIONEN("Kombinationen", "", "local_terms", "J07BC20"), + + BRUCELLA_VACCINE("Brucella vaccine", "", "local_terms", "7230005"), + + PRODUCT_CONTAINING_TETANUS_ANTITOXIN_MEDICINAL_PRODUCT("Product containing tetanus antitoxin (medicinal product)", "", "local_terms", "384706007"), + + VACCINE_PRODUCT_CONTAINING_STREPTOCOCCUS_PNEUMONIAE_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_HAEMOPHILUS_INFLUENZAE_TYPE_B_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Streptococcus pneumoniae antigen (medicinal product) + Vaccine product containing Haemophilus influenzae type B antigen (medicinal product)", "", "local_terms", "836398006+836380007"), + + VACCINE_PRODUCT_CONTAINING_RUBELLA_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Rubella virus antigen (medicinal product)", "", "local_terms", "836388000"), + + PERTUSSIS_GEREINIGTES_ANTIGEN("Pertussis, gereinigtes Antigen", "", "local_terms", "J07AJ02"), + + DIPHTHERIE_PERTUSSIS_POLIOMYELITIS_TETANUS("Diphtherie-Pertussis-Poliomyelitis-Tetanus", "", "local_terms", "J07CA02"), + + VARICELLA_ZOSTER_LIVE_ATTENUATED_VACCINE_PRODUCT("Varicella-zoster live attenuated vaccine (product)", "", "local_terms", "407746005"), + + BEZLOTOXUMAB("Bezlotoxumab", "", "local_terms", "J06BB21"), + + VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_AND_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_AND_HEPATITIS_B_VIRUS_AND_HUMAN_POLIOVIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae and Hepatitis B virus and Human poliovirus antigens (medicinal product)", "", "local_terms", "871892008"), + + PERTUSSIS_INAKTIVIERT_GANZE_ZELLE("Pertussis, inaktiviert, ganze Zelle", "", "local_terms", "J07AJ01"), + + INFLUENZA_IMPFSTOFFE("Influenza-Impfstoffe", "", "local_terms", "J07BB"), + + TOLLWUT_INAKTIVIERT_GANZES_VIRUS("Tollwut, inaktiviert, ganzes Virus", "", "local_terms", "J07BG01"), + + TYPHUS_GEREINIGTES_POLYSACCHARID_ANTIGEN("Typhus, gereinigtes Polysaccharid-Antigen", "", "local_terms", "J07AP03"), + + DIPHTHERIA_TETANUS_POLIOMYELITIS_VACCINE_PRODUCT("Diphtheria + tetanus + poliomyelitis vaccine (product)", "", "local_terms", "414006007"), + + MENINGOKOKKEN_IMPFSTOFFE("Meningokokken-Impfstoffe", "", "local_terms", "J07AH"), + + PRODUCT_CONTAINING_CYTOMEGALOVIRUS_ANTIBODY_MEDICINAL_PRODUCT("Product containing Cytomegalovirus antibody (medicinal product)", "", "local_terms", "9778000"), + + POLIOMYELITIS_TRIVALENT_INAKTIVIERT_GANZES_VIRUS("Poliomyelitis, trivalent, inaktiviert, ganzes Virus", "", "local_terms", "J07BF03"), + + VACCINE_PRODUCT_CONTAINING_VIBRIO_CHOLERAE_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_SALMONELLA_ENTERICA_SUBSPECIES_ENTERICA_SEROVAR_TYPHI_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Vibrio cholerae antigen (medicinal product) + Vaccine product containing Salmonella enterica subspecies enterica serovar Typhi antigen (medicinal product)", "", "local_terms", "836383009+836390004"), + + TETANUS_TOXOID("Tetanus-Toxoid", "", "local_terms", "J07AM01"), + + VACCINE_PRODUCT_CONTAINING_MEASLES_MORBILLIVIRUS_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_RUBELLA_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Measles morbillivirus antigen (medicinal product) + Vaccine product containing Rubella virus antigen (medicinal product)", "", "local_terms", "836382004+836388000"), + + DIPHTHERIE_TOXOID("Diphtherie-Toxoid", "", "local_terms", "J07AF01"), + + VACCINE_PRODUCT_CONTAINING_HEPATITIS_A_AND_HEPATITIS_B_VIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Hepatitis A and Hepatitis B virus antigens (medicinal product)", "", "local_terms", "836493003"), + + ROETELN_KOMBINATIONEN_MIT_MUMPS_LEBEND_ABGESCHWAECHT("Röteln, Kombinationen mit Mumps, lebend abgeschwächt", "", "local_terms", "J07BJ51"), + + YELLOW_FEVER_VACCINE("Yellow fever vaccine", "", "local_terms", "56844000"), + + VACCINE_PRODUCT_CONTAINING_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_AND_HUMAN_POLIOVIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Clostridium tetani and Corynebacterium diphtheriae and Human poliovirus antigens (medicinal product)", "", "local_terms", "836505003"), + + MUMPS_LEBEND_ABGESCHWAECHT("Mumps, lebend abgeschwächt", "", "local_terms", "J07BE01"), + + VACCINE_PRODUCT_CONTAINING_STREPTOCOCCUS_PNEUMONIAE_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Streptococcus pneumoniae antigen (medicinal product)", "", "local_terms", "836398006"), + + MENINGOKOKKEN_B_AEUSSERE_VESIKELMEMBRAN_IMPFSTOFF("Meningokokken B, äußere Vesikelmembran-Impfstoff", "", "local_terms", "J07AH06"), + + ANTHRAX_VACCINE("Anthrax vaccine", "", "local_terms", "333521006"), + + HEPATITIS_A_INAKTIVIERT_GANZES_VIRUS("Hepatitis A, inaktiviert, ganzes Virus", "", "local_terms", "J07BC02"), + + CHOLERA_LEBEND_ABGESCHWAECHT("Cholera, lebend abgeschwächt", "", "local_terms", "J07AE02"), + + TYPHUS_KOMBINATIONEN_MIT_PARATYPHUSTYPEN("Typhus, Kombinationen mit Paratyphustypen", "", "local_terms", "J07AP10"), + + TUBERCULOSOS_VACCINE("Tuberculosos vaccine", "", "local_terms", "420538001"), + + VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Bordetella pertussis antigen (medicinal product)", "", "local_terms", "601000221108"), + + VACCINE_PRODUCT_CONTAINING_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Clostridium tetani and Corynebacterium diphtheriae antigens (medicinal product)", "", "local_terms", "836502000"), + + DIPHTHERIE_HEPATITIS_B_TETANUS("Diphtherie-Hepatitis B-Tetanus", "", "local_terms", "J07CA07"), + + CHOLERA_KOMBINATIONEN_MIT_TYPHUS_IMPFSTOFF_INAKTIVIERT_GANZE_ZELLE("Cholera, Kombinationen mit Typhus-Impfstoff, inaktiviert, ganze Zelle", "", "local_terms", "J07AE51"), + + TYPHUS_EXANTHEMATICUS_IMPFSTOFF("Typhus (exanthematicus)-Impfstoff", "", "local_terms", "J07AR"), + + PNEUMOKOKKEN_GEREINIGTES_POLYSACCHARID_ANTIGEN_KONJUGIERT("Pneumokokken, gereinigtes Polysaccharid-Antigen, konjugiert", "", "local_terms", "J07AL02"), + + VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HAEMOPHILUS_INFLUENZAE_TYPE_B_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_PERTUSSIS_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_TOXOID_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Haemophilus influenzae type b vaccine (substance) } { Has active ingredient (attribute) = Pertussis vaccine (substance) } { Has active ingredient (attribute) = Toxoid (substance) }", "", "local_terms", "787859002:{127489000=412374001}{127489000=396433007}{127489000=396411005}"), + + POLIOVIRUS_VACCINE("Poliovirus vaccine", "", "local_terms", "111164008"), + + HAEMOPHILUS_INFLUENZAE_B_GEREINIGTES_ANTIGEN_KONJUGIERT("Haemophilus influenzae B, gereinigtes Antigen konjugiert", "", "local_terms", "J07AG01"), + + TOLLWUT_IMMUNGLOBULIN("Tollwut-Immunglobulin", "", "local_terms", "J06BB05"), + + VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_DIPHTHERIA_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HAEMOPHILUS_INFLUENZAE_TYPE_B_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_PERTUSSIS_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_TETANUS_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HEPATITIS_B_VIRUS_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_MENINGOCOCCUS_GROUP_A_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_MENINGOCOCCUS_GROUP_C_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Diphtheria vaccine (substance) } { Has active ingredient (attribute) = Haemophilus influenzae type b vaccine (substance) } { Has active ingredient (attribute) = Pertussis vaccine (substance) } { Has active ingredient (attribute) = Tetanus vaccine (substance) } { Has active ingredient (attribute) = Hepatitis B virus vaccine (substance) } { Has active ingredient (attribute) = Meningococcus group A vaccine (substance) } { Has active ingredient (attribute) = Meningococcus group C vaccine (substance) }", "", "local_terms", "787859002:{127489000=428126001}{127489000=412374001}{127489000=396433007}{127489000=412375000}{127489000=396424005}{127489000=768365004}{127489000=768366003}"), + + DIPHTHERIE_HAEMOPHILUS_INFLUENZAE_B_PERTUSSIS_TETANUS_HEPATITIS_B("Diphtherie-Haemophilus influenzae B-Pertussis-Tetanus-Hepatitis B", "", "local_terms", "J07CA11"), + + IMMUNGLOBULINE_NORMAL_HUMAN_ZUR_EXTRAVASALEN_ANWENDUNG("Immunglobuline, normal human, zur extravasalen Anwendung", "", "local_terms", "J06BA01"), + + VACCINE_PRODUCT_CONTAINING_ONLY_LIVE_ATTENUATED_MUMPS_ORTHORUBULAVIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing only live attenuated Mumps orthorubulavirus antigen (medicinal product)", "", "local_terms", "871738001"), + + VARICELLA_LEBEND_ABGESCHWAECHT("Varicella, lebend abgeschwächt", "", "local_terms", "J07BK01"), + + VACCINE_PRODUCT_CONTAINING_ONLY_CORYNEBACTERIUM_DIPHTHERIAE_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_HAEMOPHILUS_INFLUENZAE_TYPE_B_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_CLOSTRIDIUM_TETANI_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_HEPATITIS_B_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing only Corynebacterium diphtheriae antigen (medicinal product) + Vaccine product containing Haemophilus influenzae type B antigen (medicinal product) + Vaccine product containing Bordetella pertussis antigen (medicinal product) + Vaccine product containing Clostridium tetani antigen (medicinal product) + Vaccine product containing Hepatitis B virus antigen (medicinal product)", "", "local_terms", "871729003+836380007+601000221108+863911006+836374004"), + + ANDERE_MENINGOKOKKEN_POLYVALENT_GEREINIGTES_POLYSACCHARID_ANTIGEN("Andere Meningokokken polyvalent, gereinigtes Polysaccharid-Antigen", "", "local_terms", "J07AH05"), + + HAEMOPHILUS_INFLUENZAE_TYPE_B_MENINGOCOCCAL_GROUP_C_VACCINE_PRODUCT("Haemophilus influenzae type b + Meningococcal group C vaccine (product)", "", "local_terms", "423912009"), + + FSME_INAKTIVIERT_GANZES_VIRUS("FSME, inaktiviert, ganzes Virus", "", "local_terms", "J07BA01"), + + VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_PNEUMOCOCCAL_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HAEMOPHILUS_INFLUENZAE_TYPE_B_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Pneumococcal vaccine (substance) } { Has active ingredient (attribute) = Haemophilus influenzae type b vaccine (substance) }", "", "local_terms", "78785900:{127489000=398730001}{127489000=412374001}"), + + VACCINE_PRODUCT_CONTAINING_HEPATITIS_A_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Hepatitis A virus antigen (medicinal product)", "", "local_terms", "836375003"), + + PEST_IMPFSTOFFE("Pest-Impfstoffe", "", "local_terms", "J07AK"), + + DIPHTHERIA_TETANUS_PERTUSSIS_POLIOMYELITIS_RECOMBINANT_HEPATITIS_B_VIRUS_RECOMBINANT_HAEMOPHILUS_INFLUENZAE_TYPE_B_VACCINE_PRODUCT("Diphtheria + tetanus + pertussis + poliomyelitis + recombinant hepatitis B virus + recombinant haemophilus influenzae type B vaccine (product)", "", "local_terms", "426842004"), + + ANDERE_MENINGOKOKKEN_MONOVALENT_GEREINIGTES_POLYSACCHARID_ANTIGEN("Andere Meningokokken monovalent, gereinigtes Polysaccharid-Antigen", "", "local_terms", "J07AH02"), + + CHOLERA_INAKTIVIERT_GANZE_ZELLE("Cholera, inaktiviert, ganze Zelle", "", "local_terms", "J07AE01"), + + VACCINE_PRODUCT_CONTAINING_HAEMOPHILUS_INFLUENZAE_TYPE_B_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Haemophilus influenzae type B antigen (medicinal product)", "", "local_terms", "836380007"), + + MUMPS_IMPFSTOFFE("Mumps-Impfstoffe", "", "local_terms", "J07BE"), + + TYPHUS_IMPFSTOFFE("Typhus-Impfstoffe", "", "local_terms", "J07AP"), + + VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_AND_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_AND_HUMAN_POLIOVIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae and Human poliovirus antigens (medicinal product)", "", "local_terms", "836508001"), + + ENCEPHALITIS_IMPFSTOFFE("Encephalitis-Impfstoffe", "", "local_terms", "J07BA"), + + MASERN_KOMBINATIONEN_MIT_MUMPS_ROETELN_UND_VARICELLA_LEBEND_ABGESCHWAECHT("Masern, Kombinationen mit Mumps, Röteln und Varicella, lebend abgeschwächt", "", "local_terms", "J07BD54"), + + HEPATITIS_B_GEREINIGTES_ANTIGEN("Hepatitis B, gereinigtes Antigen", "", "local_terms", "J07BC01"), + + ROETELN_IMPFSTOFFE("Röteln-Impfstoffe", "", "local_terms", "J07BJ"), + + PRODUCT_CONTAINING_BEZLOTOXUMAB_MEDICINAL_PRODUCT("Product containing bezlotoxumab (medicinal product)", "", "local_terms", "763703008"), + + HUMANER_PAPILLOMVIRUS_IMPFSTOFF_TYPEN1618("Humaner-Papillomvirus-Impfstoff (Typen 16,18)", "", "local_terms", "J07BM02"), + + ENCEPHALITIS_JAPANISCHE_INAKTIVIERT_GANZES_VIRUS("Encephalitis, japanische, inaktiviert, ganzes Virus", "", "local_terms", "J07BA02"), + + DIPHTHERIE_HAEMOPHILUS_INFLUENZAE_B_PERTUSSIS_POLIOMYELITIS_TETANUS("Diphtherie-Haemophilus influenzae B-Pertussis-Poliomyelitis-Tetanus", "", "local_terms", "J07CA06"), + + TYPHUS_HEPATITIS_A("Typhus-Hepatitis A", "", "local_terms", "J07CA10"), + + MENINGOKOKKEN_B_MULTIKOMPONENTEN_IMPFSTOFF("Meningokokken B, Multikomponenten-Impfstoff", "", "local_terms", "J07AH09"), + + POLIOMYELITIS_ORAL_MONOVALENT_LEBEND_ABGESCHWAECHT("Poliomyelitis, oral, monovalent, lebend abgeschwächt", "", "local_terms", "J07BF01"), + + MEASLES_MUMPS_AND_RUBELLA_VACCINE_PRODUCT("Measles, mumps and rubella vaccine (product)", "", "local_terms", "61153008"), + + HEPATITIS_A_GEREINIGTES_ANTIGEN("Hepatitis A, gereinigtes Antigen", "", "local_terms", "J07BC03"), + + VACCINE_PRODUCT_CONTAINING_ONLY_SEVERE_ACUTE_RESPIRATORY_SYNDROME_CORONAVIRUS2_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing only Severe acute respiratory syndrome coronavirus 2 antigen (medicinal product)", "", "local_terms", "1119305005"), + + VACCINE_PRODUCT_CONTAINING_HUMAN_ALPHAHERPESVIRUS3_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Human alphaherpesvirus 3 antigen (medicinal product)", "", "local_terms", "836495005"), + + ROTAVIRUS_PENTAVALENT_LEBEND_REASSORTANTEN("Rotavirus, pentavalent, lebend, Reassortanten", "", "local_terms", "J07BH02"), + + INFLUENZA_INAKTIVIERT_SPALTVIRUS_ODER_OBERFLAECHENANTIGEN("Influenza, inaktiviert, Spaltvirus oder Oberflächenantigen", "", "local_terms", "J07BB02"), + + VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_AND_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae antigens (medicinal product)", "", "local_terms", "836503005"), + + VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_DIPHTHERIA_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HEPATITIS_B_VIRUS_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_TETANUS_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Diphtheria vaccine (substance) } { Has active ingredient (attribute) = Hepatitis B virus vaccine (substance) } { Has active ingredient (attribute) = Tetanus vaccine (substance) }", "", "local_terms", "787859002:{127489000=428126001}{127489000=396424005}{127489000=412375000}"), + + HAEMOPHILUS_INFLUENZAE_B_UND_POLIOMYELITIS("Haemophilus influenzae B und Poliomyelitis", "", "local_terms", "J07CA04"), + + ROTAVIRUS_LEBEND_ABGESCHWAECHT("Rotavirus, lebend abgeschwächt", "", "local_terms", "J07BH01"), + + VACCINE_PRODUCT_CONTAINING_ONLY_CORYNEBACTERIUM_DIPHTHERIAE_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_HEPATITIS_B_VIRUS_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_CLOSTRIDIUM_TETANI_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing only Corynebacterium diphtheriae antigen (medicinal product) + Vaccine product containing Hepatitis B virus antigen (medicinal product) + Vaccine product containing Clostridium tetani antigen (medicinal product)", "", "local_terms", "871729003+836374004+863911006"), + + VACCINE_PRODUCT_CONTAINING_HEPATITIS_A_VIRUS_AND_SALMONELLA_ENTERICA_SUBSPECIES_ENTERICA_SEROVAR_TYPHI_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Hepatitis A virus and Salmonella enterica subspecies enterica serovar Typhi antigens (medicinal product)", "", "local_terms", "836501007"), + + TYPHUS_INAKTIVIERT_GANZE_ZELLE("Typhus, inaktiviert, ganze Zelle", "", "local_terms", "J07AP02"), + + TYPHUS_EXANTHEMATICUS_INAKTIVIERT_GANZE_ZELLE("Typhus exanthematicus, inaktiviert, ganze Zelle", "", "local_terms", "J07AR01"), + + VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_AND_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_AND_HEPATITIS_B_VIRUS_MEDICINAL_PRODUCT("Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae and Hepatitis B virus (medicinal product)", "", "local_terms", "871917002"), + + SMALLPOX_VACCINE("Smallpox vaccine", "", "local_terms", "33234009"), + + VACCINE_PRODUCT_CONTAINING_JAPANESE_ENCEPHALITIS_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Japanese encephalitis virus antigen (medicinal product)", "", "local_terms", "836378001"), + + HAEMOPHILUS_INFLUENZAE_B_IMPFSTOFFE("Haemophilus influenzae B-Impfstoffe", "", "local_terms", "J07AG"), + + VACCINE_PRODUCT_PRODUCT("Vaccine product (product)", "", "local_terms", "787859002"), + + JAPANESE_B_ENCEPHALITIS_VACCINE("Japanese B encephalitis vaccine", "", "local_terms", "333697005"), + + HEPATITIS_B_IMMUNGLOBULIN("Hepatitis-B-Immunglobulin", "", "local_terms", "J06BB04"), + + PNEUMOKOKKEN_GEREINIGTES_POLYSACCHARID_ANTIGEN("Pneumokokken, gereinigtes Polysaccharid-Antigen", "", "local_terms", "J07AL01"), + + PNEUMOKOKKEN_GEREINIGTES_POLYSACCHARID_ANTIGEN_UND_HAEMOPHILUS_INFLUENZAE_B_KONJUGIERT("Pneumokokken, gereinigtes Polysaccharid-Antigen und Haemophilus influenzae B, konjugiert", "", "local_terms", "J07AL52"), + + INFLUENZA_INAKTIVIERT_GANZES_VIRUS("Influenza, inaktiviert, ganzes Virus", "", "local_terms", "J07BB01"), + + VACCINE_PRODUCT_CONTAINING_YERSINIA_PESTIS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Yersinia pestis antigen (medicinal product)", "", "local_terms", "840549009"), + + VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_DIPHTHERIA_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_RUBELLA_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_TETANUS_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Diphtheria vaccine (substance) } { Has active ingredient (attribute) = Rubella vaccine (substance) } { Has active ingredient (attribute) = Tetanus vaccine (substance) }", "", "local_terms", "787859002:{127489000=428126001}{127489000=396438003}{127489000=412375000}"), + + TETANUS_IMPFSTOFFE("Tetanus-Impfstoffe", "", "local_terms", "J07AM"), + + MENINGOKOKKEN_BIVALENT_A_C_GEREINIGTES_POLYSACCHARID_ANTIGEN("Meningokokken bivalent (A, C), gereinigtes Polysaccharid-Antigen", "", "local_terms", "J07AH03"), + + MASERN_IMPFSTOFFE("Masern-Impfstoffe", "", "local_terms", "J07BD"), + + TICK_BORNE_ENCEPHALITIS_VACCINE("Tick-borne encephalitis vaccine", "", "local_terms", "333699008"), + + RABIES_VACCINE("Rabies vaccine", "", "local_terms", "333606008"), + + ROTAVIRUS_VACCINE("Rotavirus vaccine", "", "local_terms", "116077000"), + + POLIOMYELITIS_ORAL_BIVALENT_LEBEND_ABGESCHWAECHT("Poliomyelitis, oral, bivalent, lebend abgeschwächt", "", "local_terms", "J07BF04"), + + DIPHTHERIE_HAEMOPHILUS_INFLUENZAE_B_PERTUSSIS_POLIOMYELITIS_TETANUS_HEPATITIS_B("Diphtherie-Haemophilus influenzae B-Pertussis-Poliomyelitis-Tetanus-Hepatitis B", "", "local_terms", "J07CA09"), + + DIPHTHERIA_TETANUS_PERTUSSIS_POLIOMYELITIS_VACCINE_PRODUCT("Diphtheria + tetanus + pertussis + poliomyelitis vaccine (product)", "", "local_terms", "414005006"), + + TUBERKULOSE_LEBEND_ABGESCHWAECHT("Tuberkulose, lebend abgeschwächt", "", "local_terms", "J07AN01"), + + TETANUS_IMMUNGLOBULIN("Tetanus-Immunglobulin", "", "local_terms", "J06BB02"), + + PLAGUE_VACCINE("Plague vaccine", "", "local_terms", "11866009"), + + ROTAVIRUS_DIARRHOE_IMPFSTOFFE("Rotavirus-Diarrhoe-Impfstoffe", "", "local_terms", "J07BH"), + + MASERN_KOMBINATIONEN_MIT_MUMPS_LEBEND_ABGESCHWAECHT("Masern, Kombinationen mit Mumps, lebend abgeschwächt", "", "local_terms", "J07BD51"), + + VACCINE_PRODUCT_CONTAINING_CLOSTRIDIUM_TETANI_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Clostridium tetani antigen (medicinal product)", "", "local_terms", "863911006"), + + HAEMOPHILUS_INFLUENZAE_B_KOMBINATIONEN_MIT_PERTUSSIS_UND_TOXOIDEN("Haemophilus influenzae B, Kombinationen mit Pertussis und Toxoiden", "", "local_terms", "J07AG52"), + + HUMANER_PAPILLOMVIRUS_IMPFSTOFF_TYPEN61116183133455258("Humaner-Papillomvirus-Impfstoff (Typen 6,11,16,18,31,33,45,52,58)", "", "local_terms", "J07BM03"), + + ZOSTER_VIRUS_GEREINIGTES_ANTIGEN("Zoster Virus, gereinigtes Antigen", "", "local_terms", "J07BK03"), + + DIPHTHERIE_HAEMOPHILUS_INFLUENZAE_B_PERTUSSIS_TETANUS_HEPATITIS_B_MENINGOKOKKEN_A_C("Diphtherie-Haemophilus influenzae B-Pertussis-Tetanus-Hepatitis B-Meningokokken A + C", "", "local_terms", "J07CA13"), + + VACCINE_PRODUCT_CONTAINING_HUMAN_PAPILLOMAVIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Human papillomavirus antigen (medicinal product)", "", "local_terms", "836379009"), + + MENINGOKOKKEN_TETRAVALENT_A_C_Y_W135_GEREINIGTES_POLYSACCHARID_ANTIGEN_KONJUGIERT("Meningokokken tetravalent (A, C, Y, W-135), gereinigtes Polysaccharid-Antigen, konjugiert", "", "local_terms", "J07AH08"), + + VACCINE_PRODUCT_CONTAINING_BACILLUS_ANTHRACIS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Bacillus anthracis antigen (medicinal product)", "", "local_terms", "836384003"), + + HEPATITIS_B_VIRUS_VACCINE("Hepatitis B virus vaccine", "", "local_terms", "34689006"), + + ANDERE_VIRALE_IMPFSTOFFE("Andere virale Impfstoffe", "", "local_terms", "J07BX"), + + VACCINE_PRODUCT_CONTAINING_VIBRIO_CHOLERAE_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Vibrio cholerae antigen (medicinal product)", "", "local_terms", "836383009"), + + DIPHTHERIA_TETANUS_VACCINE_PRODUCT("Diphtheria + tetanus vaccine (product)", "", "local_terms", "350327004"), + + ANTHRAX_ANTIGEN("Anthrax-Antigen", "", "local_terms", "J07AC01"), + + PNEUMOKOKKEN_IMPFSTOFFE("Pneumokokken-Impfstoffe", "", "local_terms", "J07AL"), + + VACCINE_PRODUCT_CONTAINING_MEASLES_MORBILLIVIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Measles morbillivirus antigen (medicinal product)", "", "local_terms", "836382004"), + + VACCINE_PRODUCT_CONTAINING_HAEMOPHILUS_INFLUENZAE_TYPE_B_AND_HEPATITIS_B_VIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Haemophilus influenzae type B and Hepatitis B virus antigens (medicinal product)", "", "local_terms", "865946000"), + + BAKTERIELLE_UND_VIRALE_IMPFSTOFFE_KOMBINIERT("Bakterielle und virale Impfstoffe, kombiniert", "", "local_terms", "J07CA"), + + GELBFIEBER_LEBEND_ABGESCHWAECHT("Gelbfieber, lebend abgeschwächt", "", "local_terms", "J07BL01"), + + VACCINE_PRODUCT_CONTAINING_CORYNEBACTERIUM_DIPHTHERIAE_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Corynebacterium diphtheriae antigen (medicinal product)", "", "local_terms", "836381006"), + + DIPHTHERIE_ROETELN_TETANUS("Diphtherie-Röteln-Tetanus", "", "local_terms", "J07CA03"), + + HEPATITIS_IMPFSTOFFE("Hepatitis-Impfstoffe", "", "local_terms", "J07BC"), + + HAEMOPHILUS_INFLUENZAE_B_KOMBINATIONEN_MIT_TOXOIDEN("Haemophilus influenzae B, Kombinationen mit Toxoiden", "", "local_terms", "J07AG51"), + + SPEZIFISCHE_IMMUNGLOBULINE("Spezifische Immunglobuline", "", "local_terms", "J06BB"), + + VACCINE_PRODUCT_CONTAINING_TICK_BORNE_ENCEPHALITIS_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Tick-borne encephalitis virus antigen (medicinal product)", "", "local_terms", "836403007"), + + VACCINE_PRODUCT_CONTAINING_MEASLES_MORBILLIVIRUS_AND_MUMPS_ORTHORUBULAVIRUS_AND_RUBELLA_VIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Measles morbillivirus and Mumps orthorubulavirus and Rubella virus antigens (medicinal product)", "", "local_terms", "836494009"), + + TYPHUS_ORAL_LEBEND_ABGESCHWAECHT("Typhus, oral, lebend abgeschwächt", "", "local_terms", "J07AP01"), + + ROETELN_LEBEND_ABGESCHWAECHT("Röteln, lebend abgeschwächt", "", "local_terms", "J07BJ01"), + + TETANUS_TOXOID_KOMBINATIONEN_MIT_TETANUS_IMMUNGLOBULIN("Tetanus-Toxoid, Kombinationen mit Tetanus-Immunglobulin", "", "local_terms", "J07AM52"), + + TETANUS_VACCINE("Tetanus vaccine", "", "local_terms", "333621002"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + ImpfstoffDefiningCode(String value, String description, String terminologyId, String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public static Map<String, ImpfstoffDefiningCode> getCodesAsMap(){ + Map<String, ImpfstoffDefiningCode> impfstoffDefiningCodeHashMap = new HashMap<>(); + for (ImpfstoffDefiningCode impfstoffDefiningCode : ImpfstoffDefiningCode.values()) { + impfstoffDefiningCodeHashMap.put(impfstoffDefiningCode.getCode(), impfstoffDefiningCode); + } + return impfstoffDefiningCodeHashMap; + } + + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungAction.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungAction.java new file mode 100644 index 000000000..e8cbcae85 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungAction.java @@ -0,0 +1,247 @@ +package org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.generic.PartyProxy; +import java.time.temporal.TemporalAccessor; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.EntryEntity; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; +import org.ehrbase.client.classgenerator.shareddefinition.Transition; + +@Entity +@Archetype("openEHR-EHR-ACTION.medication.v1") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-04-29T13:40:23.862565+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +public class ImpfungAction implements EntryEntity { + /** + * Path: Impfstatus/Impfung/Impfstoff + * Description: Name des Arzneimittels, eines Impfstoffs oder eines anderen therapeutischen Mittels, welches im Mittelpunkt der Aktivität steht. + * Comment: Zum Beispiel: "Atenolol 100 mg" oder "Tenormin Tabletten 100 mg". + * Es wird dringend empfohlen, dass das Element "Arzneimittel" mit einer Terminologie kodiert wird, die nach Möglichkeit eine Entscheidungsunterstützung auslösen kann. Der Umfang der Kodierung kann vom einfachen Namen des Arzneimittels bis hin zu strukturierten Details über die tatsächlich verwendete Medikamentenpackung variieren. Die Freitext-Eingabe sollte nur dann verwendet werden, wenn keine entsprechende Terminologie vorhanden ist. + */ + @Path("/description[at0017]/items[at0020 and name/value='Impfstoff']/value|defining_code") + private ImpfstoffDefiningCode impfstoffDefiningCode; + + /** + * Path: Impfstatus/Impfung/Tree/Impfstoff/null_flavour + */ + @Path("/description[at0017]/items[at0020 and name/value='Impfstoff']/null_flavour|defining_code") + private NullFlavour impfstoffNullFlavourDefiningCode; + + /** + * Path: Impfstatus/Impfung/Arzneimitteldetails + * Description: Strukturierte Details über das Arzneimittel inklusive Stärke, Form und Inhaltsstoffe. + * Comment: Verwenden Sie diesen SLOT, wenn die detaillierte Beschreibung des ausgegebenen, autorisierten oder verabreichten Arzneimittels ausdrücklich angegeben werden muss. Zum Beispiel: die Form, Stärke, alle Verdünner oder Mischung von Inhaltsstoffen. + */ + @Path("/description[at0017]/items[at0104]") + private Cluster arzneimitteldetails; + + /** + * Path: Impfstatus/Impfung/Verabreichte Dosen + * Description: Kombination von Medikamentendosis und Verabreichungszeit an einem Tag im Kontext einer Medikamentenverordnung oder der Arzneimittelverwaltung. + * Comment: Zum Beispiel: "2 Tabletten um 18 Uhr" oder "20 mg dreimal täglich". Bitte beachten Sie: Dieser Cluster kann mehrfach vorkommen, um einen vollständigen Satz von Dosismustern für eine einzelne Dosisanweisung darzustellen. + */ + @Path("/description[at0017]/items[openEHR-EHR-CLUSTER.dosage.v1 and name/value='Verabreichte Dosen']") + private VerabreichteDosenCluster verabreichteDosen; + + /** + * Path: Impfstatus/Impfung/Impfung gegen + * Description: Begründung, warum der Prozessschritt für das identifizierte Arzneimittel durchgeführt wurde. + * Comment: Zum Beispiel: "Verschoben - Patient war zum Zeitpunkt der Arzneimittelgabe nicht verfügbar", "abgesagt - Nebenwirkung". Merke: Dies ist nicht der Grund für die Arzneimittelverordnung, sondern der spezifische Grund, warum ein Behandlungsschritt durchgeführt wurde. Wird oft verwendet, um Abweichungen von der ursprünglichen Verordnung zu dokumentieren. + */ + @Path("/description[at0017]/items[at0021 and name/value='Impfung gegen']/value|defining_code") + private ImpfungGegenDefiningCode impfungGegenDefiningCode; + + /** + * Path: Impfstatus/Impfung/Tree/Impfung gegen/null_flavour + */ + @Path("/description[at0017]/items[at0021 and name/value='Impfung gegen']/null_flavour|defining_code") + private NullFlavour impfungGegenNullFlavourDefiningCode; + + /** + * Path: Impfstatus/Impfung/Zusätzliche Details + * Description: Weitere strukturierte Details zu einer Aktivität, möglicherweise speziell zu einem Prozessschritt. + */ + @Path("/description[at0017]/items[at0053]") + private List<Cluster> zusaetzlicheDetails; + + /** + * Path: Impfstatus/Impfung/Erweiterung + * Description: Zusätzliche Informationen zur Erfassung lokaler Inhalte oder Anpassung an andere Referenzmodelle/Formalismen. + * Comment: Zum Beispiel: Lokaler Informationsbedarf oder zusätzliche Metadaten zur Anpassung an FHIR-Ressourcen oder CIMI-Modelle. + */ + @Path("/protocol[at0030]/items[at0085]") + private List<Cluster> erweiterung; + + /** + * Path: Impfstatus/Impfung/subject + */ + @Path("/subject") + private PartyProxy subject; + + /** + * Path: Impfstatus/Impfung/language + */ + @Path("/language") + private Language language; + + /** + * Path: Impfstatus/Impfung/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Impfstatus/Impfung/time + */ + @Path("/time|value") + private TemporalAccessor timeValue; + + /** + * Path: Impfstatus/Impfung/ism_transition/Careflow_step + */ + @Path("/ism_transition/careflow_step|defining_code") + private CareflowStepDefiningCode careflowStepDefiningCode; + + /** + * Path: Impfstatus/Impfung/ism_transition/Current_state + */ + @Path("/ism_transition/current_state|defining_code") + private CurrentStateDefiningCode currentStateDefiningCode; + + /** + * Path: Impfstatus/Impfung/ism_transition/transition + */ + @Path("/ism_transition/transition|defining_code") + private Transition transitionDefiningCode; + + public void setImpfstoffDefiningCode(ImpfstoffDefiningCode impfstoffDefiningCode) { + this.impfstoffDefiningCode = impfstoffDefiningCode; + } + + public ImpfstoffDefiningCode getImpfstoffDefiningCode() { + return this.impfstoffDefiningCode ; + } + + public void setImpfstoffNullFlavourDefiningCode(NullFlavour impfstoffNullFlavourDefiningCode) { + this.impfstoffNullFlavourDefiningCode = impfstoffNullFlavourDefiningCode; + } + + public NullFlavour getImpfstoffNullFlavourDefiningCode() { + return this.impfstoffNullFlavourDefiningCode ; + } + + public void setArzneimitteldetails(Cluster arzneimitteldetails) { + this.arzneimitteldetails = arzneimitteldetails; + } + + public Cluster getArzneimitteldetails() { + return this.arzneimitteldetails ; + } + + public void setVerabreichteDosen(VerabreichteDosenCluster verabreichteDosen) { + this.verabreichteDosen = verabreichteDosen; + } + + public VerabreichteDosenCluster getVerabreichteDosen() { + return this.verabreichteDosen ; + } + + public void setImpfungGegenDefiningCode(ImpfungGegenDefiningCode impfungGegenDefiningCode) { + this.impfungGegenDefiningCode = impfungGegenDefiningCode; + } + + public ImpfungGegenDefiningCode getImpfungGegenDefiningCode() { + return this.impfungGegenDefiningCode ; + } + + public void setImpfungGegenNullFlavourDefiningCode( + NullFlavour impfungGegenNullFlavourDefiningCode) { + this.impfungGegenNullFlavourDefiningCode = impfungGegenNullFlavourDefiningCode; + } + + public NullFlavour getImpfungGegenNullFlavourDefiningCode() { + return this.impfungGegenNullFlavourDefiningCode ; + } + + public void setZusaetzlicheDetails(List<Cluster> zusaetzlicheDetails) { + this.zusaetzlicheDetails = zusaetzlicheDetails; + } + + public List<Cluster> getZusaetzlicheDetails() { + return this.zusaetzlicheDetails ; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung ; + } + + public void setSubject(PartyProxy subject) { + this.subject = subject; + } + + public PartyProxy getSubject() { + return this.subject ; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public Language getLanguage() { + return this.language ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } + + public void setTimeValue(TemporalAccessor timeValue) { + this.timeValue = timeValue; + } + + public TemporalAccessor getTimeValue() { + return this.timeValue ; + } + + public void setCareflowStepDefiningCode(CareflowStepDefiningCode careflowStepDefiningCode) { + this.careflowStepDefiningCode = careflowStepDefiningCode; + } + + public CareflowStepDefiningCode getCareflowStepDefiningCode() { + return this.careflowStepDefiningCode ; + } + + public void setCurrentStateDefiningCode(CurrentStateDefiningCode currentStateDefiningCode) { + this.currentStateDefiningCode = currentStateDefiningCode; + } + + public CurrentStateDefiningCode getCurrentStateDefiningCode() { + return this.currentStateDefiningCode ; + } + + public void setTransitionDefiningCode(Transition transitionDefiningCode) { + this.transitionDefiningCode = transitionDefiningCode; + } + + public Transition getTransitionDefiningCode() { + return this.transitionDefiningCode ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungActionContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungActionContainment.java new file mode 100644 index 000000000..aeda67167 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungActionContainment.java @@ -0,0 +1,56 @@ +package org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.generic.PartyProxy; +import java.time.temporal.TemporalAccessor; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; +import org.ehrbase.client.classgenerator.shareddefinition.Transition; + +public class ImpfungActionContainment extends Containment { + public SelectAqlField<ImpfungAction> IMPFUNG_ACTION = new AqlFieldImp<ImpfungAction>(ImpfungAction.class, "", "ImpfungAction", ImpfungAction.class, this); + + public SelectAqlField<ImpfstoffDefiningCode> IMPFSTOFF_DEFINING_CODE = new AqlFieldImp<ImpfstoffDefiningCode>(ImpfungAction.class, "/description[at0017]/items[at0020]/value|defining_code", "impfstoffDefiningCode", ImpfstoffDefiningCode.class, this); + + public SelectAqlField<NullFlavour> IMPFSTOFF_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ImpfungAction.class, "/description[at0017]/items[at0020]/null_flavour|defining_code", "impfstoffNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<Cluster> ARZNEIMITTELDETAILS = new AqlFieldImp<Cluster>(ImpfungAction.class, "/description[at0017]/items[at0104]", "arzneimitteldetails", Cluster.class, this); + + public SelectAqlField<VerabreichteDosenCluster> VERABREICHTE_DOSEN = new AqlFieldImp<VerabreichteDosenCluster>(ImpfungAction.class, "/description[at0017]/items[openEHR-EHR-CLUSTER.dosage.v1]", "verabreichteDosen", VerabreichteDosenCluster.class, this); + + public SelectAqlField<ImpfungGegenDefiningCode> IMPFUNG_GEGEN_DEFINING_CODE = new AqlFieldImp<ImpfungGegenDefiningCode>(ImpfungAction.class, "/description[at0017]/items[at0021]/value|defining_code", "impfungGegenDefiningCode", ImpfungGegenDefiningCode.class, this); + + public SelectAqlField<NullFlavour> IMPFUNG_GEGEN_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ImpfungAction.class, "/description[at0017]/items[at0021]/null_flavour|defining_code", "impfungGegenNullFlavourDefiningCode", NullFlavour.class, this); + + public ListSelectAqlField<Cluster> ZUSAETZLICHE_DETAILS = new ListAqlFieldImp<Cluster>(ImpfungAction.class, "/description[at0017]/items[at0053]", "zusaetzlicheDetails", Cluster.class, this); + + public ListSelectAqlField<Cluster> ERWEITERUNG = new ListAqlFieldImp<Cluster>(ImpfungAction.class, "/protocol[at0030]/items[at0085]", "erweiterung", Cluster.class, this); + + public SelectAqlField<PartyProxy> SUBJECT = new AqlFieldImp<PartyProxy>(ImpfungAction.class, "/subject", "subject", PartyProxy.class, this); + + public SelectAqlField<Language> LANGUAGE = new AqlFieldImp<Language>(ImpfungAction.class, "/language", "language", Language.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(ImpfungAction.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + public SelectAqlField<TemporalAccessor> TIME_VALUE = new AqlFieldImp<TemporalAccessor>(ImpfungAction.class, "/time|value", "timeValue", TemporalAccessor.class, this); + + public SelectAqlField<CareflowStepDefiningCode> CAREFLOW_STEP_DEFINING_CODE = new AqlFieldImp<CareflowStepDefiningCode>(ImpfungAction.class, "/ism_transition/careflow_step|defining_code", "careflowStepDefiningCode", CareflowStepDefiningCode.class, this); + + public SelectAqlField<CurrentStateDefiningCode> CURRENT_STATE_DEFINING_CODE = new AqlFieldImp<CurrentStateDefiningCode>(ImpfungAction.class, "/ism_transition/current_state|defining_code", "currentStateDefiningCode", CurrentStateDefiningCode.class, this); + + public SelectAqlField<Transition> TRANSITION_DEFINING_CODE = new AqlFieldImp<Transition>(ImpfungAction.class, "/ism_transition/transition|defining_code", "transitionDefiningCode", Transition.class, this); + + private ImpfungActionContainment() { + super("openEHR-EHR-ACTION.medication.v1"); + } + + public static ImpfungActionContainment getInstance() { + return new ImpfungActionContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungGegenDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungGegenDefiningCode.java new file mode 100644 index 000000000..18393db38 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungGegenDefiningCode.java @@ -0,0 +1,121 @@ +package org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition; + +import java.lang.String; +import java.util.HashMap; +import java.util.Map; + +import org.ehrbase.client.classgenerator.EnumValueSet; +import org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.InterpretationDefiningCode; + +public enum ImpfungGegenDefiningCode implements EnumValueSet { + DISEASE_CAUSED_BY_SEVERE_ACUTE_RESPIRATORY_SYNDROME_CORONAVIRUS2_DISORDER("Disease caused by Severe acute respiratory syndrome coronavirus 2 (disorder)", "", "SNOMED Clinical Terms", "840539006"), + + YELLOW_FEVER("Yellow fever", "", "SNOMED Clinical Terms", "16541001"), + + JAPANESE_ENCEPHALITIS_VIRUS_DISEASE("Japanese encephalitis virus disease", "", "SNOMED Clinical Terms", "52947006"), + + CLOSTRIDIOIDES_DIFFICILE_INFECTION_DISORDER("Clostridioides difficile infection (disorder)", "", "SNOMED Clinical Terms", "186431008"), + + VIRAL_HEPATITIS_TYPE_B("Viral hepatitis, type B", "", "SNOMED Clinical Terms", "66071002"), + + CENTRAL_EUROPEAN_ENCEPHALITIS_DISORDER("Central European encephalitis (disorder)", "", "SNOMED Clinical Terms", "16901001"), + + BRUCELLOSIS("Brucellosis", "", "SNOMED Clinical Terms", "75702008"), + + ACUTE_POLIOMYELITIS("Acute Poliomyelitis", "", "SNOMED Clinical Terms", "398102009"), + + MUMPS("Mumps", "", "SNOMED Clinical Terms", "36989005"), + + TETANUS("Tetanus", "", "SNOMED Clinical Terms", "76902006"), + + CYTOMEGALOVIRUS_INFECTION_DISORDER("Cytomegalovirus infection (disorder)", "", "SNOMED Clinical Terms", "28944009"), + + DISEASE_DISORDER("Disease (disorder)", "", "SNOMED Clinical Terms", "64572001"), + + MENINGOCOCCAL_INFECTIOUS_DISEASE("Meningococcal infectious disease", "", "SNOMED Clinical Terms", "23511006"), + + RUBELLA("Rubella", "", "SNOMED Clinical Terms", "36653000"), + + PERTUSSIS("Pertussis", "", "SNOMED Clinical Terms", "27836007"), + + HAEMOPHILUS_INFLUENZAE_TYPE_B_INFECTION("Haemophilus influenzae type b infection", "", "SNOMED Clinical Terms", "709410003"), + + INFLUENZA("Influenza", "", "SNOMED Clinical Terms", "6142004"), + + PNEUMOCOCCAL_INFECTIOUS_DISEASE("Pneumococcal infectious disease", "", "SNOMED Clinical Terms", "16814004"), + + DISEASE_CAUSED_BY_ROTAVIRUS("Disease caused by Rotavirus", "", "SNOMED Clinical Terms", "18624000"), + + THYPHOID_FEVER("Thyphoid fever", "", "SNOMED Clinical Terms", "4834000"), + + CHOLERA("Cholera", "", "SNOMED Clinical Terms", "63650001"), + + LOUSE_BORNE_TYPHUS_DISORDER("Louse-borne typhus (disorder)", "", "SNOMED Clinical Terms", "39111003"), + + MEASLES("Measles", "", "SNOMED Clinical Terms", "14189004"), + + HUMAN_PAPILOMAVIRUS_INFECTION("human papilomavirus infection", "", "SNOMED Clinical Terms", "240532009"), + + VARICELLA("Varicella", "", "SNOMED Clinical Terms", "38907003"), + + DIPHTHERIA_CAUSED_BY_CORYNEBACTERIUM_DIPHTHERIAE("Diphtheria caused by Corynebacterium diphtheriae", "", "SNOMED Clinical Terms", "397430003"), + + RHESUS_ISOIMMUNIZATION_DUE_TO_ANTI_D_DISORDER("Rhesus isoimmunization due to anti-D (disorder)", "", "SNOMED Clinical Terms", "307333004"), + + SMALLPOX("Smallpox", "", "SNOMED Clinical Terms", "67924001"), + + RABIES("Rabies", "", "SNOMED Clinical Terms", "14168008"), + + ANTHRAX("Anthrax", "", "SNOMED Clinical Terms", "409498004"), + + RESPIRATORY_SYNCYTIAL_VIRUS_INFECTION_DISORDER("Respiratory syncytial virus infection (disorder)", "", "SNOMED Clinical Terms", "55735004"), + + PLAGUE("Plague", "", "SNOMED Clinical Terms", "58750007"), + + INFECTIOUS_DISEASE_DISORDER("Infectious disease (disorder)", "", "SNOMED Clinical Terms", "40733004"), + + HERPES_ZOSTER("Herpes Zoster", "", "SNOMED Clinical Terms", "4740000"), + + VIRAL_HEPATITIS_TYPE_A("Viral hepatitis, type A", "", "SNOMED Clinical Terms", "40468003"), + + TUBERCULOSIS("Tuberculosis", "", "SNOMED Clinical Terms", "56717001"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + ImpfungGegenDefiningCode(String value, String description, String terminologyId, String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public static Map<String, ImpfungGegenDefiningCode> getCodesAsMap(){ + Map<String, ImpfungGegenDefiningCode> impfungGegenDefiningCodeHashMap = new HashMap<>(); + for (ImpfungGegenDefiningCode impfungGegenDefiningCode : ImpfungGegenDefiningCode.values()) { + impfungGegenDefiningCodeHashMap.put(impfungGegenDefiningCode.getCode(), impfungGegenDefiningCode); + } + return impfungGegenDefiningCodeHashMap; + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluation.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluation.java new file mode 100644 index 000000000..081c32b23 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluation.java @@ -0,0 +1,112 @@ +package org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.generic.PartyProxy; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.EntryEntity; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Archetype("openEHR-EHR-EVALUATION.absence.v2") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-04-29T13:40:23.919374+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +public class UnbekannterImpfstatusEvaluation implements EntryEntity { + /** + * Path: Impfstatus/Unbekannter Impfstatus/Aussage über Abwesenheit + * Description: Positive Aussage, dass keine Informationen verfügbar sind. + * Comment: Zum Beispiel: "Es liegen keine Informationen über Nebenwirkungen vor"; "Es liegen keine Informationen über Probleme oder Diagnosen vor"; "Es liegen keine Informationen über vorangegangene Verfahren vor"; oder "Es liegen keine Informationen über verwendete Medikamente vor". + */ + @Path("/data[at0001]/items[at0002]/value|defining_code") + private AussageUeberAbwesenheitDefiningCode aussageUeberAbwesenheitDefiningCode; + + /** + * Path: Impfstatus/Unbekannter Impfstatus/Baum/Aussage über Abwesenheit/null_flavour + */ + @Path("/data[at0001]/items[at0002]/null_flavour|defining_code") + private NullFlavour aussageUeberAbwesenheitNullFlavourDefiningCode; + + /** + * Path: Impfstatus/Unbekannter Impfstatus/Erweiterung + * Description: Zusätzliche Informationen zur Erfassung lokaler Inhalte oder Anpassung an andere Referenzmodelle/Formalismen. + * Comment: Kommentar: Zum Beispiel: Lokaler Informationsbedarf oder zusätzliche Metadaten zur Anpassung an FHIR-Ressourcen oder CIMI-Modelle. + */ + @Path("/protocol[at0003]/items[at0006]") + private List<Cluster> erweiterung; + + /** + * Path: Impfstatus/Unbekannter Impfstatus/subject + */ + @Path("/subject") + private PartyProxy subject; + + /** + * Path: Impfstatus/Unbekannter Impfstatus/language + */ + @Path("/language") + private Language language; + + /** + * Path: Impfstatus/Unbekannter Impfstatus/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setAussageUeberAbwesenheitDefiningCode( + AussageUeberAbwesenheitDefiningCode aussageUeberAbwesenheitDefiningCode) { + this.aussageUeberAbwesenheitDefiningCode = aussageUeberAbwesenheitDefiningCode; + } + + public AussageUeberAbwesenheitDefiningCode getAussageUeberAbwesenheitDefiningCode() { + return this.aussageUeberAbwesenheitDefiningCode ; + } + + public void setAussageUeberAbwesenheitNullFlavourDefiningCode( + NullFlavour aussageUeberAbwesenheitNullFlavourDefiningCode) { + this.aussageUeberAbwesenheitNullFlavourDefiningCode = aussageUeberAbwesenheitNullFlavourDefiningCode; + } + + public NullFlavour getAussageUeberAbwesenheitNullFlavourDefiningCode() { + return this.aussageUeberAbwesenheitNullFlavourDefiningCode ; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung ; + } + + public void setSubject(PartyProxy subject) { + this.subject = subject; + } + + public PartyProxy getSubject() { + return this.subject ; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public Language getLanguage() { + return this.language ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluationContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluationContainment.java new file mode 100644 index 000000000..31a699909 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluationContainment.java @@ -0,0 +1,36 @@ +package org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.generic.PartyProxy; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +public class UnbekannterImpfstatusEvaluationContainment extends Containment { + public SelectAqlField<UnbekannterImpfstatusEvaluation> UNBEKANNTER_IMPFSTATUS_EVALUATION = new AqlFieldImp<UnbekannterImpfstatusEvaluation>(UnbekannterImpfstatusEvaluation.class, "", "UnbekannterImpfstatusEvaluation", UnbekannterImpfstatusEvaluation.class, this); + + public SelectAqlField<AussageUeberAbwesenheitDefiningCode> AUSSAGE_UEBER_ABWESENHEIT_DEFINING_CODE = new AqlFieldImp<AussageUeberAbwesenheitDefiningCode>(UnbekannterImpfstatusEvaluation.class, "/data[at0001]/items[at0002]/value|defining_code", "aussageUeberAbwesenheitDefiningCode", AussageUeberAbwesenheitDefiningCode.class, this); + + public SelectAqlField<NullFlavour> AUSSAGE_UEBER_ABWESENHEIT_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(UnbekannterImpfstatusEvaluation.class, "/data[at0001]/items[at0002]/null_flavour|defining_code", "aussageUeberAbwesenheitNullFlavourDefiningCode", NullFlavour.class, this); + + public ListSelectAqlField<Cluster> ERWEITERUNG = new ListAqlFieldImp<Cluster>(UnbekannterImpfstatusEvaluation.class, "/protocol[at0003]/items[at0006]", "erweiterung", Cluster.class, this); + + public SelectAqlField<PartyProxy> SUBJECT = new AqlFieldImp<PartyProxy>(UnbekannterImpfstatusEvaluation.class, "/subject", "subject", PartyProxy.class, this); + + public SelectAqlField<Language> LANGUAGE = new AqlFieldImp<Language>(UnbekannterImpfstatusEvaluation.class, "/language", "language", Language.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(UnbekannterImpfstatusEvaluation.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + private UnbekannterImpfstatusEvaluationContainment() { + super("openEHR-EHR-EVALUATION.absence.v2"); + } + + public static UnbekannterImpfstatusEvaluationContainment getInstance() { + return new UnbekannterImpfstatusEvaluationContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenCluster.java new file mode 100644 index 000000000..6927eff2f --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenCluster.java @@ -0,0 +1,131 @@ +package org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import java.lang.Double; +import java.lang.Long; +import java.lang.String; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.LocatableEntity; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Archetype("openEHR-EHR-CLUSTER.dosage.v1") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-04-29T13:40:23.902029+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +public class VerabreichteDosenCluster implements LocatableEntity { + /** + * Path: Impfstatus/Impfung/Verabreichte Dosen/Dosierungsreihenfolge + * Description: Beabsichtigte Reihenfolge dieser Dosierung in der Gesamtdosierungsfolge. + * Comment: Zum Beispiel: '1', '2', '3'. + * Wenn mehrere Dosierungen angegeben werden, gibt die 'Dosierungsreihenfolge' die Reihenfolge an, in der sie ausgeführt werden soll. Zum Beispiel: (1) 1 Tablette am Morgen, (2) 2 Tabletten um 14 Uhr, (3) 1 Tablette am Abend. + */ + @Path("/items[at0164]/value|magnitude") + private Long dosierungsreihenfolgeMagnitude; + + /** + * Path: Impfstatus/Impfung/Tree/Verabreichte Dosen/Dosierungsreihenfolge/null_flavour + */ + @Path("/items[at0164]/null_flavour|defining_code") + private NullFlavour dosierungsreihenfolgeNullFlavourDefiningCode; + + /** + * Path: Impfstatus/Impfung/Verabreichte Dosen/Dosismenge + * Description: Der Wert der Arzneimittelmenge, die an einem Zeitpunkt verabreicht wird, als reelle Zahl oder als Bereich von reellen Zahlen. Dem Wert ist die Dosiseinheit zugeordnet. + * Comment: Zum Beispiel: 1; 1,5; 0,125 oder 1-2; 12,5 - 20,5 + */ + @Path("/items[at0144]/value|magnitude") + private Double dosismengeMagnitude; + + /** + * Path: Impfstatus/Impfung/Verabreichte Dosen/Dosismenge + * Description: Der Wert der Arzneimittelmenge, die an einem Zeitpunkt verabreicht wird, als reelle Zahl oder als Bereich von reellen Zahlen. Dem Wert ist die Dosiseinheit zugeordnet. + * Comment: Zum Beispiel: 1; 1,5; 0,125 oder 1-2; 12,5 - 20,5 + */ + @Path("/items[at0144]/value|units") + private String dosismengeUnits; + + /** + * Path: Impfstatus/Impfung/Tree/Verabreichte Dosen/Dosismenge/null_flavour + */ + @Path("/items[at0144]/null_flavour|defining_code") + private NullFlavour dosismengeNullFlavourDefiningCode; + + /** + * Path: Impfstatus/Impfung/Verabreichte Dosen/Tägliche Verabreichungszeiten + * Description: Strukturierte Details des Musters für Verabreichungszeiten innerhalb eines Tages. + * Comment: Zum Beispiel: 'Morgens', 'um 06:00, 14:00, 21:00'. + */ + @Path("/items[at0037]") + private List<Cluster> taeglicheVerabreichungszeiten; + + /** + * Path: Impfstatus/Impfung/Verabreichte Dosen/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setDosierungsreihenfolgeMagnitude(Long dosierungsreihenfolgeMagnitude) { + this.dosierungsreihenfolgeMagnitude = dosierungsreihenfolgeMagnitude; + } + + public Long getDosierungsreihenfolgeMagnitude() { + return this.dosierungsreihenfolgeMagnitude ; + } + + public void setDosierungsreihenfolgeNullFlavourDefiningCode( + NullFlavour dosierungsreihenfolgeNullFlavourDefiningCode) { + this.dosierungsreihenfolgeNullFlavourDefiningCode = dosierungsreihenfolgeNullFlavourDefiningCode; + } + + public NullFlavour getDosierungsreihenfolgeNullFlavourDefiningCode() { + return this.dosierungsreihenfolgeNullFlavourDefiningCode ; + } + + public void setDosismengeMagnitude(Double dosismengeMagnitude) { + this.dosismengeMagnitude = dosismengeMagnitude; + } + + public Double getDosismengeMagnitude() { + return this.dosismengeMagnitude ; + } + + public void setDosismengeUnits(String dosismengeUnits) { + this.dosismengeUnits = dosismengeUnits; + } + + public String getDosismengeUnits() { + return this.dosismengeUnits ; + } + + public void setDosismengeNullFlavourDefiningCode(NullFlavour dosismengeNullFlavourDefiningCode) { + this.dosismengeNullFlavourDefiningCode = dosismengeNullFlavourDefiningCode; + } + + public NullFlavour getDosismengeNullFlavourDefiningCode() { + return this.dosismengeNullFlavourDefiningCode ; + } + + public void setTaeglicheVerabreichungszeiten(List<Cluster> taeglicheVerabreichungszeiten) { + this.taeglicheVerabreichungszeiten = taeglicheVerabreichungszeiten; + } + + public List<Cluster> getTaeglicheVerabreichungszeiten() { + return this.taeglicheVerabreichungszeiten ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenClusterContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenClusterContainment.java new file mode 100644 index 000000000..6b735cb73 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenClusterContainment.java @@ -0,0 +1,39 @@ +package org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import java.lang.Double; +import java.lang.Long; +import java.lang.String; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +public class VerabreichteDosenClusterContainment extends Containment { + public SelectAqlField<VerabreichteDosenCluster> VERABREICHTE_DOSEN_CLUSTER = new AqlFieldImp<VerabreichteDosenCluster>(VerabreichteDosenCluster.class, "", "VerabreichteDosenCluster", VerabreichteDosenCluster.class, this); + + public SelectAqlField<Long> DOSIERUNGSREIHENFOLGE_MAGNITUDE = new AqlFieldImp<Long>(VerabreichteDosenCluster.class, "/items[at0164]/value|magnitude", "dosierungsreihenfolgeMagnitude", Long.class, this); + + public SelectAqlField<NullFlavour> DOSIERUNGSREIHENFOLGE_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(VerabreichteDosenCluster.class, "/items[at0164]/null_flavour|defining_code", "dosierungsreihenfolgeNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<Double> DOSISMENGE_MAGNITUDE = new AqlFieldImp<Double>(VerabreichteDosenCluster.class, "/items[at0144]/value|magnitude", "dosismengeMagnitude", Double.class, this); + + public SelectAqlField<String> DOSISMENGE_UNITS = new AqlFieldImp<String>(VerabreichteDosenCluster.class, "/items[at0144]/value|units", "dosismengeUnits", String.class, this); + + public SelectAqlField<NullFlavour> DOSISMENGE_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(VerabreichteDosenCluster.class, "/items[at0144]/null_flavour|defining_code", "dosismengeNullFlavourDefiningCode", NullFlavour.class, this); + + public ListSelectAqlField<Cluster> TAEGLICHE_VERABREICHUNGSZEITEN = new ListAqlFieldImp<Cluster>(VerabreichteDosenCluster.class, "/items[at0037]", "taeglicheVerabreichungszeiten", Cluster.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(VerabreichteDosenCluster.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + private VerabreichteDosenClusterContainment() { + super("openEHR-EHR-CLUSTER.dosage.v1"); + } + + public static VerabreichteDosenClusterContainment getInstance() { + return new VerabreichteDosenClusterContainment(); + } +} diff --git a/src/main/resources/opt/Impfstatus.opt b/src/main/resources/opt/Impfstatus.opt new file mode 100644 index 000000000..8b067ce34 --- /dev/null +++ b/src/main/resources/opt/Impfstatus.opt @@ -0,0 +1,3360 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Operational template XML automatically generated by Ocean OPT Generator webservice --> +<template xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.openehr.org/v1"> + <language> + <terminology_id> + <value>ISO_639-1</value> + </terminology_id> + <code_string>de</code_string> + </language> + <description> + <original_author id="Name">Sarah Ballout</original_author> + <original_author id="Email">ballout.sarah@mh-hannover.de</original_author> + <original_author id="Organisation">Peter L. Reichertz Institut für Medizinische Informatik</original_author> + <other_contributors>Antje Wulff</other_contributors> + <lifecycle_state>published</lifecycle_state> + <other_details id="MetaDataSet:Sample Set ">Template metadata sample set</other_details> + <other_details id="Acknowledgements"/> + <other_details id="Business Process Level"/> + <other_details id="Care setting"/> + <other_details id="Client group"/> + <other_details id="Clinical Record Element"/> + <other_details id="Copyright"/> + <other_details id="Issues"/> + <other_details id="Owner"/> + <other_details id="Sign off"/> + <other_details id="Speciality"/> + <other_details id="User roles"/> + <other_details id="MD5-CAM-1.0.1">dede7b805905a1ff811408523dff835d</other_details> + <other_details id="PARENT:MD5-CAM-1.0.1">8BD8D5F850A9DEE8A16075105D36FD32</other_details> + <other_details id="original_language">ISO_639-1::de</other_details> + <other_details id="original_language">ISO_639-1::de</other_details> + <details> + <language> + <terminology_id> + <value>ISO_639-1</value> + </terminology_id> + <code_string>de</code_string> + </language> + <purpose>Zur Repräsentation des Impfstatus im Rahmen des FoDaPl-Projektes / GECCO-Datensatzes.</purpose> + <keywords>Impfung</keywords> + <keywords>Impfungen</keywords> + <keywords>Impfstoff</keywords> + <keywords>Vakzine</keywords> + <keywords>GECCO</keywords> + <keywords>NUM</keywords> + <keywords>FoDaPl</keywords> + <use>Für die Abbildung des Impfstatus für die Speicherung im Rahmen des FoDaPI-Projektes / GECCO-Datensatzes.</use> + <misuse>Nicht zur Repräsentation über die Art der Verabreichungswege der Medikationen verwenden.</misuse> + </details> + </description> + <uid> + <value>b6e9dce4-21d4-49e5-9bcd-4f63eec8e2bf</value> + </uid> + <template_id> + <value>Impfstatus</value> + </template_id> + <concept>Impfstatus</concept> + <definition> + <rm_type_name>COMPOSITION</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>category</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>openehr</value> + </terminology_id> + <code_list>433</code_list> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>context</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>EVENT_CONTEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>other_context</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ITEM_TREE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0001</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0002</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </interval> + </cardinality> + </attributes> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Impfstatus</list> + </item> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>content</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>ACTION</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>ism_transition</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ISM_TRANSITION</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0018</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>current_state</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>openehr</value> + </terminology_id> + <code_list>245</code_list> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>careflow_step</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>local</value> + </terminology_id> + <code_list>at0018</code_list> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>not-done</list> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ISM_TRANSITION</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0015</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>current_state</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>openehr</value> + </terminology_id> + <code_list>531</code_list> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>careflow_step</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>local</value> + </terminology_id> + <code_list>at0015</code_list> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>stopped</list> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ISM_TRANSITION</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0151</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>current_state</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>openehr</value> + </terminology_id> + <code_list>531</code_list> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>careflow_step</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>local</value> + </terminology_id> + <code_list>at0151</code_list> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>entered-in error</list> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ISM_TRANSITION</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0152</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>current_state</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>openehr</value> + </terminology_id> + <code_list>532</code_list> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>careflow_step</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>local</value> + </terminology_id> + <code_list>at0152</code_list> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>completed</list> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>description</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ITEM_TREE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0017</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0020</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>local_terms</value> + </terminology_id> + <code_list>421245007</code_list> + <code_list>787859002</code_list> + <code_list>37146000</code_list> + <code_list>407746005</code_list> + <code_list>787859002:127489000=412300006</code_list> + <code_list>787859002:{127489000=428126001}{127489000=412374001}{127489000=396433007}{127489000=412375000}{127489000=396424005}{127489000=768365004}{127489000=768366003}</code_list> + <code_list>427542001</code_list> + <code_list>787859002:{127489000=428126001}{127489000=412374001}{127489000=396433007}{127489000=412375000}{127489000=396424005}</code_list> + <code_list>333707007</code_list> + <code_list>426842004</code_list> + <code_list>426971004</code_list> + <code_list>787859002:{127489000=428126001}{127489000=396424005}{127489000=412375000}</code_list> + <code_list>414004005</code_list> + <code_list>426081003</code_list> + <code_list>787859002:{127489000=412374001}{127489000=396436004}</code_list> + <code_list>787859002:{127489000=428126001}{127489000=396438003}{127489000=412375000}</code_list> + <code_list>414005006</code_list> + <code_list>414006007</code_list> + <code_list>419550004</code_list> + <code_list>787859002:{127489000=396427003}{127489000=396438003}</code_list> + <code_list>61153008</code_list> + <code_list>785865001</code_list> + <code_list>333702001</code_list> + <code_list>350327004</code_list> + <code_list>78785900:{127489000=398730001}{127489000=412374001}</code_list> + <code_list>423912009</code_list> + <code_list>787859002:{127489000=412374001}{127489000=396433007}{127489000=396411005}</code_list> + <code_list>787859002:{127489000=396422009}{127489000=396441007}</code_list> + <code_list>333697005</code_list> + <code_list>333699008</code_list> + <code_list>90043005</code_list> + <code_list>111164008</code_list> + <code_list>116077000</code_list> + <code_list>333606008</code_list> + <code_list>407737004</code_list> + <code_list>33234009</code_list> + <code_list>424519000</code_list> + <code_list>56844000</code_list> + <code_list>386013003</code_list> + <code_list>386012008</code_list> + <code_list>14745005</code_list> + <code_list>34689006</code_list> + <code_list>46233009</code_list> + <code_list>89428009</code_list> + <code_list>420538001</code_list> + <code_list>333621002</code_list> + <code_list>333598008</code_list> + <code_list>11866009</code_list> + <code_list>61602008</code_list> + <code_list>423531006</code_list> + <code_list>333680004</code_list> + <code_list>428214002</code_list> + <code_list>35736007</code_list> + <code_list>7230005</code_list> + <code_list>333521006</code_list> + <code_list>714569001</code_list> + <code_list>786224004</code_list> + <code_list>384706007</code_list> + <code_list>62294009</code_list> + <code_list>9542007</code_list> + <code_list>80834004</code_list> + <code_list>9778000</code_list> + <code_list>108725001</code_list> + <code_list>763703008</code_list> + <code_list>J07AR</code_list> + <code_list>J07AR01</code_list> + <code_list>J07AC</code_list> + <code_list>J07AC01</code_list> + <code_list>J07AD</code_list> + <code_list>J07AD01</code_list> + <code_list>J07AE</code_list> + <code_list>J07AE01</code_list> + <code_list>J07AE02</code_list> + <code_list>J07AE51</code_list> + <code_list>J07AF</code_list> + <code_list>J07AF01</code_list> + <code_list>J07AG</code_list> + <code_list>J07AG01</code_list> + <code_list>J07AG51</code_list> + <code_list>J07AG52</code_list> + <code_list>J07AG53</code_list> + <code_list>J07AH</code_list> + <code_list>J07AH01</code_list> + <code_list>J07AH02</code_list> + <code_list>J07AH03</code_list> + <code_list>J07AH04</code_list> + <code_list>J07AH05</code_list> + <code_list>J07AH06</code_list> + <code_list>J07AH07</code_list> + <code_list>J07AH08</code_list> + <code_list>J07AH09</code_list> + <code_list>J07AH10</code_list> + <code_list>J07AJ</code_list> + <code_list>J07AJ01</code_list> + <code_list>J07AJ02</code_list> + <code_list>J07AJ51</code_list> + <code_list>J07AJ52</code_list> + <code_list>J07AK</code_list> + <code_list>J07AK01</code_list> + <code_list>J07AL</code_list> + <code_list>J07AL01</code_list> + <code_list>J07AL02</code_list> + <code_list>J07AL52</code_list> + <code_list>J07AM</code_list> + <code_list>J07AM01</code_list> + <code_list>J07AM51</code_list> + <code_list>J07AM52</code_list> + <code_list>J07AN</code_list> + <code_list>J07AN01</code_list> + <code_list>J07AP</code_list> + <code_list>J07AP01</code_list> + <code_list>J07AP02</code_list> + <code_list>J07AP03</code_list> + <code_list>J07AP10</code_list> + <code_list>J07BA</code_list> + <code_list>J07BA01</code_list> + <code_list>J07BA02</code_list> + <code_list>J07BA03</code_list> + <code_list>J07BB</code_list> + <code_list>J07BB01</code_list> + <code_list>J07BB02</code_list> + <code_list>J07BB03</code_list> + <code_list>J07BC</code_list> + <code_list>J07BC01</code_list> + <code_list>J07BC02</code_list> + <code_list>J07BC03</code_list> + <code_list>J07BC20</code_list> + <code_list>J07BD</code_list> + <code_list>J07BD01</code_list> + <code_list>J07BD51</code_list> + <code_list>J07BD52</code_list> + <code_list>J07BD53</code_list> + <code_list>J07BD54</code_list> + <code_list>J07BE</code_list> + <code_list>J07BE01</code_list> + <code_list>J07BF</code_list> + <code_list>J07BF01</code_list> + <code_list>J07BF02</code_list> + <code_list>J07BF03</code_list> + <code_list>J07BF04</code_list> + <code_list>J07BG</code_list> + <code_list>J07BG01</code_list> + <code_list>J07BH</code_list> + <code_list>J07BH01</code_list> + <code_list>J07BH02</code_list> + <code_list>J07BJ</code_list> + <code_list>J07BJ01</code_list> + <code_list>J07BJ51</code_list> + <code_list>J07BK</code_list> + <code_list>J07BK01</code_list> + <code_list>J07BK02</code_list> + <code_list>J07BK03</code_list> + <code_list>J07BL</code_list> + <code_list>J07BL01</code_list> + <code_list>J07BM</code_list> + <code_list>J07BM01</code_list> + <code_list>J07BM02</code_list> + <code_list>J07BM03</code_list> + <code_list>J07BX</code_list> + <code_list>J07BX01</code_list> + <code_list>J07CA</code_list> + <code_list>J07CA01</code_list> + <code_list>J07CA02</code_list> + <code_list>J07CA03</code_list> + <code_list>J07CA04</code_list> + <code_list>J07CA05</code_list> + <code_list>J07CA06</code_list> + <code_list>J07CA07</code_list> + <code_list>J07CA08</code_list> + <code_list>J07CA09</code_list> + <code_list>J07CA10</code_list> + <code_list>J07CA11</code_list> + <code_list>J07CA12</code_list> + <code_list>J07CA13</code_list> + <code_list>J06BA</code_list> + <code_list>J06BA01</code_list> + <code_list>J06BA02</code_list> + <code_list>J06BB</code_list> + <code_list>J06BB01</code_list> + <code_list>J06BB02</code_list> + <code_list>J06BB03</code_list> + <code_list>J06BB04</code_list> + <code_list>J06BB05</code_list> + <code_list>J06BB09</code_list> + <code_list>J06BB16</code_list> + <code_list>J06BB21</code_list> + <code_list>1119305005</code_list> + <code_list>1119349007</code_list> + <code_list>836503005</code_list> + <code_list>2221000221107</code_list> + <code_list>836376002</code_list> + <code_list>871729003+836380007+601000221108+863911006+836374004+871871008</code_list> + <code_list>871892008</code_list> + <code_list>871729003+836380007+601000221108+863911006+836374004</code_list> + <code_list>836501007</code_list> + <code_list>871896006</code_list> + <code_list>865946000</code_list> + <code_list>871729003+836374004+863911006</code_list> + <code_list>838279002</code_list> + <code_list>871917002</code_list> + <code_list>836380007+1031000221108</code_list> + <code_list>871729003+836388000+863911006</code_list> + <code_list>836508001</code_list> + <code_list>836505003</code_list> + <code_list>838280004</code_list> + <code_list>836382004+836388000</code_list> + <code_list>836494009</code_list> + <code_list>836499004</code_list> + <code_list>836493003</code_list> + <code_list>836502000</code_list> + <code_list>836398006+836380007</code_list> + <code_list>836500008</code_list> + <code_list>836380007+601000221108</code_list> + <code_list>836383009+836390004</code_list> + <code_list>836378001</code_list> + <code_list>836403007</code_list> + <code_list>871738001</code_list> + <code_list>1031000221108</code_list> + <code_list>836387005</code_list> + <code_list>836393002</code_list> + <code_list>836495005</code_list> + <code_list>836389008</code_list> + <code_list>836379009</code_list> + <code_list>836385002</code_list> + <code_list>836388000</code_list> + <code_list>836382004</code_list> + <code_list>836375003</code_list> + <code_list>836374004</code_list> + <code_list>836377006</code_list> + <code_list>836390004</code_list> + <code_list>836402002</code_list> + <code_list>863911006</code_list> + <code_list>836398006</code_list> + <code_list>840549009</code_list> + <code_list>601000221108</code_list> + <code_list>836401009</code_list> + <code_list>836380007</code_list> + <code_list>836381006</code_list> + <code_list>836383009</code_list> + <code_list>836384003</code_list> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Impfstoff</list> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0104</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>openEHR-EHR-CLUSTER\.medication(-[a-zA-Z0-9_]+)*\.v1</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0164</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_COUNT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>magnitude</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>INTEGER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_INTEGER"> + <range> + <lower_included>true</lower_included> + <upper_included>false</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </range> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0144</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_DV_QUANTITY"> + <rm_type_name>DV_QUANTITY</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <property> + <terminology_id> + <value>openehr</value> + </terminology_id> + <code_string>380</code_string> + </property> + <list> + <magnitude> + <lower_included>true</lower_included> + <upper_included>false</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </magnitude> + <units>1</units> + </list> + </children> + </attributes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0037</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>openEHR-EHR-CLUSTER\.timing_daily(-[a-zA-Z0-9_]+)*\.v1</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </interval> + </cardinality> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Verabreichte Dosen</list> + </item> + </children> + </attributes> + </children> + </attributes> + <archetype_id> + <value>openEHR-EHR-CLUSTER.dosage.v1</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="comment">Zum Beispiel: "2 Tabletten um 18 Uhr" oder "20 mg dreimal täglich". Bitte beachten Sie: Dieser Cluster kann mehrfach vorkommen, um einen vollständigen Satz von Dosismustern für eine einzelne Dosisanweisung darzustellen.</items> + <items id="description">Kombination von Medikamentendosis und Verabreichungszeit an einem Tag im Kontext einer Medikamentenverordnung oder der Arzneimittelverwaltung.</items> + <items id="text">Dosierung</items> + </term_definitions> + <term_definitions code="at0037"> + <items id="comment">Zum Beispiel: 'Morgens', 'um 06:00, 14:00, 21:00'.</items> + <items id="description">Strukturierte Details des Musters für Verabreichungszeiten innerhalb eines Tages.</items> + <items id="text">Tägliche Verabreichungszeiten</items> + </term_definitions> + <term_definitions code="at0102"> + <items id="comment">Zum Beispiel: "Über 10 Minuten verabreichen".</items> + <items id="description">Der Zeitraum, in dem eine Einzeldosis des Medikaments oder Impfstoffs verabreicht werden soll.</items> + <items id="text">Verabreichungsdauer</items> + </term_definitions> + <term_definitions code="at0134"> + <items id="comment">Zum Beispiel: '200 ml/h'. Verwenden Sie den Datentyp Text, um nicht- oder nur teilweise quantifizierbare Anweisungen aufzuzeichnen.</items> + <items id="description">Die Rate, mit der das Medikament, beispielsweise eine Infusion, verabreicht werden soll.</items> + <items id="text">Verabreichungsrate</items> + </term_definitions> + <term_definitions code="at0135"> + <items id="comment">Zum Beispiel: "10 mg/kg/Tag". Das Ergebnis dieser Formel wird normalerweise in Dosismenge / Einheit oder Verabreichungsrate / Dauer gespeichert. Wenn klinische Messungen wie das Körpergewicht bei der Dosisberechnung verwendet werden, sollte ein LINK-Attribut verwendet werden, um anzugeben, welche bestimmte Messung verwendet wurde.</items> + <items id="description">Die Formel zur Berechnung der Dosismenge oder der Verabreichungsrate, wenn dies von einem anderen Faktor abhängt, wie z. B. dem Körpergewicht oder der Hautoberfläche.</items> + <items id="text">Dosisformel</items> + </term_definitions> + <term_definitions code="at0144"> + <items id="comment">Zum Beispiel: 1; 1,5; 0,125 oder 1-2; 12,5 - 20,5</items> + <items id="description">Der Wert der Arzneimittelmenge, die an einem Zeitpunkt verabreicht wird, als reelle Zahl oder als Bereich von reellen Zahlen. Dem Wert ist die Dosiseinheit zugeordnet.</items> + <items id="text">Dosismenge</items> + </term_definitions> + <term_definitions code="at0145"> + <items id="comment">Zum Beispiel: "Tablette", "mg". Die Kodierung der Dosiseinheit mit einer Terminologie wird nach Möglichkeit bevorzugt.</items> + <items id="description">Die Einheit, die der Dosismenge zugeordnet ist.</items> + <items id="text">Dosiseinheit</items> + </term_definitions> + <term_definitions code="at0164"> + <items id="comment">Zum Beispiel: '1', '2', '3'. +Wenn mehrere Dosierungen angegeben werden, gibt die 'Dosierungsreihenfolge' die Reihenfolge an, in der sie ausgeführt werden soll. Zum Beispiel: (1) 1 Tablette am Morgen, (2) 2 Tabletten um 14 Uhr, (3) 1 Tablette am Abend.</items> + <items id="description">Beabsichtigte Reihenfolge dieser Dosierung in der Gesamtdosierungsfolge.</items> + <items id="text">Dosierungsreihenfolge</items> + </term_definitions> + <term_definitions code="at0176"> + <items id="comment">Kann zum Beispiel verwendet werden, um einen Wert darzustellen, der auf Verpackungseinheit wie "Tabletten" basiert, wobei die Dosismenge als SI-Einheit angegeben ist, z. B. 'mg'; oder wenn sowohl die Gesamtmenge als auch die Dosismenge des Wirkstoffes einer Infusionslösung angegeben werden müssen.</items> + <items id="description">Eine alternative Darstellung des Werts, der an einem Zeitpunkt verabreichten Medikamentenmenge als reelle Zahl oder als Bereich von reellen Zahlen, die der Dosiseinheit zugeordnet sind.</items> + <items id="text">Alternative Dosismenge</items> + </term_definitions> + <term_definitions code="at0177"> + <items id="description">Die Einheit, die der alternativen Dosismenge zugeordnet ist.</items> + <items id="text">Alternative Dosiseinheit</items> + </term_definitions> + <term_definitions code="at0178"> + <items id="comment">Zum Beispiel: "Salbe auf die betroffene Stelle auftragen, bis sie glänzt". Dieses Element soll den Entwicklern ermöglichen, die Strukturen zum Erhöhen / Verringern von Dosierungen zu verwenden, ohne die Dosierungen notwendigerweise auf strukturierte Weise spezifizieren zu müssen.</items> + <items id="description">Textbeschreibung der Dosis.</items> + <items id="text">Dosisberschreibung</items> + </term_definitions> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0021</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>SNOMED Clinical Terms</value> + </terminology_id> + <code_list>840539006</code_list> + <code_list>40733004</code_list> + <code_list>16901001</code_list> + <code_list>64572001</code_list> + <code_list>307333004</code_list> + <code_list>39111003</code_list> + <code_list>28944009</code_list> + <code_list>55735004</code_list> + <code_list>186431008</code_list> + <code_list>67924001</code_list> + <code_list>240532009</code_list> + <code_list>16541001</code_list> + <code_list>4740000</code_list> + <code_list>38907003</code_list> + <code_list>36653000</code_list> + <code_list>14168008</code_list> + <code_list>398102009</code_list> + <code_list>36989005</code_list> + <code_list>14189004</code_list> + <code_list>40468003</code_list> + <code_list>66071002</code_list> + <code_list>6142004</code_list> + <code_list>52947006</code_list> + <code_list>18624000</code_list> + <code_list>4834000</code_list> + <code_list>56717001</code_list> + <code_list>76902006</code_list> + <code_list>16814004</code_list> + <code_list>58750007</code_list> + <code_list>27836007</code_list> + <code_list>23511006</code_list> + <code_list>709410003</code_list> + <code_list>397430003</code_list> + <code_list>63650001</code_list> + <code_list>75702008</code_list> + <code_list>409498004</code_list> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Impfung gegen</list> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0053</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>openEHR-EHR-CLUSTER\.medication_authorisation(-[a-zA-Z0-9_]+)*\.v0|openEHR-EHR-CLUSTER\.medication_authorisation(-[a-zA-Z0-9_]+)*\.v1</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </interval> + </cardinality> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>protocol</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ITEM_TREE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0030</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0085</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </interval> + </cardinality> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Impfung</list> + </item> + </children> + </attributes> + </children> + </attributes> + <archetype_id> + <value>openEHR-EHR-ACTION.medication.v1</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="comment">Dies beschränkt sich nicht nur auf Aktivitäten, die auf der Grundlage von Arzneimittelverordnungen von Ärzten durchgeführt werden, sondern kann sich auch z.B. auf die Einnahme von freiverkäuflichen Medikamenten beziehen.</items> + <items id="description">Jede Aktivität in Bezug auf die Planung, Vorbereitung, Rezeptverwaltung, Ausgabe, Verabreichung, Einnahme, Absetzung und anderer Verwendung von Arzneimitteln, Impfstoffen, Nahrungsergänzungsmitteln und anderen therapeutischen Mitteln.</items> + <items id="text">Arzneimittelverwaltung</items> + </term_definitions> + <term_definitions code="at0002"> + <items id="description">Für das Arzneimittel wurde ein Rezept ausgestellt.</items> + <items id="text">Rezept ausgestellt</items> + </term_definitions> + <term_definitions code="at0003"> + <items id="description">Das verordnete Arzneimittel ist an einen Patienten ausgegeben worden, z.B. von einer Apotheke.</items> + <items id="text">Rezept wurde ausgegeben/eingelöst</items> + </term_definitions> + <term_definitions code="at0004"> + <items id="description">Das Arzneimittel wurde zum ersten Mal von dem Patienten eingenommen oder verabreicht. Obwohl in einigen Situation die erste von mehreren Anwendungen errechenbar ist, kann es in der Primärversorgung sein, dass genaue Verabreichungsdaten nicht ohne weiteres verfügbar sind.</items> + <items id="text">Arzneimittelbehandlung hat begonnen</items> + </term_definitions> + <term_definitions code="at0005"> + <items id="description">Das individuelle Arzneimittel wurde neu bewertet, beispielsweise ob das Arzneimittel noch angewendet werden soll. Eine Überprüfung der Arzneimittelliste soll nicht durchgeführt werden.</items> + <items id="text">Arzneimittel wurde neu bewertet</items> + </term_definitions> + <term_definitions code="at0006"> + <items id="description">Eine einzelne Verabreichung des Arzneimittels ist erfolgt.</items> + <items id="text">Dosis wurde verabreicht</items> + </term_definitions> + <term_definitions code="at0007"> + <items id="description">Die medikamentöse Behandlung wurde, wie geplant, beendet.</items> + <items id="text">Arzneimittelbehandlung ist abgeschlossen</items> + </term_definitions> + <term_definitions code="at0008"> + <items id="description">Das Rezept wurde aufgrund einer technischen oder pharmazeutischen Störung nicht ausgegeben.</items> + <items id="text">Verzögerung der Rezeptabgabe</items> + </term_definitions> + <term_definitions code="at0009"> + <items id="description">Die Verabreichung des Arzneimittels wurde bis zum Erhalt weiterer Informationen ausgesetzt. Es sollten keine weiteren Dosen, bis zur Bekanntgabe des neuen Startdatums oder bis die Bedingungen erfüllt sind, verabreicht werden. Wenn Sie das Datum/Bedingungen für den Neustart nach dem Aussetzen festlegen, sollte ein "suspend_step" von der ausgesetzten Gabe und zurück erfolgen.</items> + <items id="text">Verabreichung wurde ausgesetzt</items> + </term_definitions> + <term_definitions code="at0010"> + <items id="description">Ein Rezept wurde für eine vorhandene Arzneimittelverordnung neu ausgestellt.</items> + <items id="text">Rezept neu ausgestellt</items> + </term_definitions> + <term_definitions code="at0011"> + <items id="description">Die Ausstellung des Rezeptes wartet auf die erneute Re-Autorisierung durch einen Arzt.</items> + <items id="text">Re-Autorisierug des Rezepts ausstehend</items> + </term_definitions> + <term_definitions code="at0012"> + <items id="description">Die geplante Arzneimittelbehanlung wurde vor der Verabreichung abgesagt.</items> + <items id="text">Arzneimittelbehanlung wurde abgesagt</items> + </term_definitions> + <term_definitions code="at0013"> + <items id="description">Die geplante Medikamentenbehanlung wurde vor der Verabreichung verschoben.</items> + <items id="text">Medikamentenbehanlung wurde verschoben</items> + </term_definitions> + <term_definitions code="at0015"> + <items id="description">Die Verabreichung des Arzneimittels wurde während der Dauer der geplanten Behandlung eingestellt.</items> + <items id="text">Arzneimittelbehandlung gestoppt</items> + </term_definitions> + <term_definitions code="at0016"> + <items id="description">Das Startdatum der Arzneimittelanwendung oder andere Startbedingungen wurden festgelegt.</items> + <items id="text">Arzneimittel Startdatum/Voraussetzung</items> + </term_definitions> + <term_definitions code="at0017"> + <items id="description">@ internal @</items> + <items id="text">Tree</items> + </term_definitions> + <term_definitions code="at0018"> + <items id="description">Eine Gabe des Arzneimittels wurde zurückgehalten und nicht gegeben. Es besteht keine Erwartung, dass sie später verabreicht wird, obwohl die nächste Dosis (falls es eine gibt) gemäß der ursprünglichen Verordnung verabreicht werden sollte.</items> + <items id="text">Verabreichung einer Dosis wurde ausgelassen</items> + </term_definitions> + <term_definitions code="at0020"> + <items id="comment">Zum Beispiel: "Atenolol 100 mg" oder "Tenormin Tabletten 100 mg". +Es wird dringend empfohlen, dass das Element "Arzneimittel" mit einer Terminologie kodiert wird, die nach Möglichkeit eine Entscheidungsunterstützung auslösen kann. Der Umfang der Kodierung kann vom einfachen Namen des Arzneimittels bis hin zu strukturierten Details über die tatsächlich verwendete Medikamentenpackung variieren. Die Freitext-Eingabe sollte nur dann verwendet werden, wenn keine entsprechende Terminologie vorhanden ist.</items> + <items id="description">Name des Arzneimittels, eines Impfstoffs oder eines anderen therapeutischen Mittels, welches im Mittelpunkt der Aktivität steht.</items> + <items id="text">Arzneimittel</items> + </term_definitions> + <term_definitions code="at0021"> + <items id="comment">Zum Beispiel: "Verschoben - Patient war zum Zeitpunkt der Arzneimittelgabe nicht verfügbar", "abgesagt - Nebenwirkung". Merke: Dies ist nicht der Grund für die Arzneimittelverordnung, sondern der spezifische Grund, warum ein Behandlungsschritt durchgeführt wurde. Wird oft verwendet, um Abweichungen von der ursprünglichen Verordnung zu dokumentieren.</items> + <items id="description">Begründung, warum der Prozessschritt für das identifizierte Arzneimittel durchgeführt wurde.</items> + <items id="text">Begründung</items> + </term_definitions> + <term_definitions code="at0024"> + <items id="comment">Zum Beispiel: "Patient war in der Radiologie.", "Versehentliche Punktion der Vene während der i.m. Gabe."</items> + <items id="description">Zur Dokumentation von zusätzlichen Schilderungen über die Aktivitäten innerhalb der Prozessschritte, wenn sie noch nicht in anderen Feldern erfasst wurden. Dabei sollen jegliche Abweichungen zwischen durchzuführender Aktion und tatsächlich durchgeführter Aktion erfasst werden.</items> + <items id="text">Kommentar</items> + </term_definitions> + <term_definitions code="at0025"> + <items id="description">Die Sequenznummer des Prozessschritts wird erfasst.</items> + <items id="text">Sequenznummer</items> + </term_definitions> + <term_definitions code="at0030"> + <items id="description">@ internal @</items> + <items id="text">Tree</items> + </term_definitions> + <term_definitions code="at0033"> + <items id="comment">Zum Beispiel: "Vermeiden Sie den Konsum von Grapefruits oder grapefruithaltigen Lebensmitteln.", "Die Einnahme sollte mindestens 2 Stunden vor dem Zubettgehen erfolgen.", "Bitte zusammen mit Nahrung einnehmen." Wenn es klinisch zutreffend ist, kann für dieses Item eine Terminologie hinterlegt werden.</items> + <items id="description">Jede Anweisung, Anleitung oder Empfehlung, die dem Patienten oder der Pflegekraft zum Zeitpunkt eines Prozessschrittes übermittelt wird.</items> + <items id="text">Patientenanweisung</items> + </term_definitions> + <term_definitions code="at0039"> + <items id="description">Eine große Änderung der Verordnung war erforderlich, die dazu führte, dass diese Verordnung gestoppt und ein neue Verordnung ausgestellt wurde.</items> + <items id="text">Größere Änderung der Verordnung</items> + </term_definitions> + <term_definitions code="at0041"> + <items id="description">Die Arzneimittelverordnung wurde so geändert, dass keine neue Verordnung/neues Rezept nach den lokalen klinischen Regeln ausgestellt werden muss.</items> + <items id="text">Geringfügige Änderung der Verordnung</items> + </term_definitions> + <term_definitions code="at0043"> + <items id="comment">Wird verwendet, um die Abweichung von der tatsächlichen Anwendungszeit zu vergleichen, wenn diese aus der ursprünglichen Anweisung nicht leicht berechenbar ist.</items> + <items id="description">Das Datum/die Uhrzeit, an dem die Arzneimittelgabe eingeplant war.</items> + <items id="text">Ursprünglich geplantes Datum/Uhrzeit</items> + </term_definitions> + <term_definitions code="at0044"> + <items id="description">Die Verabreichung einer Dosis hat sich verzögert, wird aber so schnell wie möglich erfolgen.</items> + <items id="text">Verabreichung einer Dosis wurde verschoben</items> + </term_definitions> + <term_definitions code="at0053"> + <items id="description">Weitere strukturierte Details zu einer Aktivität, möglicherweise speziell zu einem Prozessschritt.</items> + <items id="text">Zusätzliche Details</items> + </term_definitions> + <term_definitions code="at0085"> + <items id="comment">Zum Beispiel: Lokaler Informationsbedarf oder zusätzliche Metadaten zur Anpassung an FHIR-Ressourcen oder CIMI-Modelle.</items> + <items id="description">Zusätzliche Informationen zur Erfassung lokaler Inhalte oder Anpassung an andere Referenzmodelle/Formalismen.</items> + <items id="text">Erweiterung</items> + </term_definitions> + <term_definitions code="at0103"> + <items id="comment">Kommentar: Dieses Datenelement ermöglicht während der Laufzeit eine genauere Spezifikation von mehrfach auftretenden Datenelemente, wenn notwendig.</items> + <items id="description">Eindeutige ID der Arzneimittelverordnung.</items> + <items id="text">ID der Verordnung</items> + </term_definitions> + <term_definitions code="at0104"> + <items id="comment">Verwenden Sie diesen SLOT, wenn die detaillierte Beschreibung des ausgegebenen, autorisierten oder verabreichten Arzneimittels ausdrücklich angegeben werden muss. Zum Beispiel: die Form, Stärke, alle Verdünner oder Mischung von Inhaltsstoffen.</items> + <items id="description">Strukturierte Details über das Arzneimittel inklusive Stärke, Form und Inhaltsstoffe.</items> + <items id="text">Arzneimitteldetails</items> + </term_definitions> + <term_definitions code="at0106"> + <items id="description">Die ursprüngliche Arzneimittelverordnung wurde erneut genehmigt, um eine wiederholte Verschreibung oder Abgabe zu ermöglichen. In einigen Ländern, wie z.B. Deutschland, muss unter diesen Umständen ein völlig neues Rezept ausgestellt werden.</items> + <items id="text">Rezept ist re-autorisiert</items> + </term_definitions> + <term_definitions code="at0109"> + <items id="description">Das Arzneimittel wurde empfohlen, aber es wurden keine Schritte unternommen, um die Verschreibung/Verordnung einzuleiten.</items> + <items id="text">Empfohlene Arzneimittel</items> + </term_definitions> + <term_definitions code="at0131"> + <items id="comment">CLUSTER.dosage soll Details zu Änderungen der Arzneimittelverordnung oder der Dosisverabreichung enthalten, während CLUSTER.medication_supply_amount ist für Details über die Dosis der Verabreichung bestimmt.</items> + <items id="description">Spezifische Details über die Dosis des Arzneimittels.</items> + <items id="text">Dosis</items> + </term_definitions> + <term_definitions code="at0132"> + <items id="comment">In vielen Rechtssystemen ist die Substitution eines verordneten Arzneimittels in generischer Form oder mit einem anderen Markennamen, welcher als bioäquivalent bestimmt wurde, zum Zeitpunkt der Ausgabe oder Verabreichung erlaubt. In anderen Fällen wird eine Substitution erwartet und der Arzt muss ausdrücklich die Nicht-Substitution verlangen.</items> + <items id="description">Substitutionsmaßnahmen, die von der Person ergriffen werden, die das Medikament verabreicht oder ausgibt.</items> + <items id="text">Substitution</items> + </term_definitions> + <term_definitions code="at0133"> + <items id="comment">Zum Beispiel: "Generische Alternative beinhaltet eine Substanz, die vom Patient nicht vertragen wird." Kann bei klinischer Eignung mit einer Terminologie kodiert werden.</items> + <items id="description">Die Ursache oder die Begründung für die durchgeführte Substitution.</items> + <items id="text">Grund für die Substitution</items> + </term_definitions> + <term_definitions code="at0138"> + <items id="description">Ein Arzneimittel wurde substituiert, welches bioäquivalent zu dem Angeforderten ist.</items> + <items id="text">Substitution wurde durchgeführt</items> + </term_definitions> + <term_definitions code="at0139"> + <items id="description">Obwohl es nach der Arzneimittelverordnung erlaubt gewesen wäre, wurde nicht mit einem bioäquivalenten Arzneimittel substituiert.</items> + <items id="text">Substitution wurde nicht durchgeführt</items> + </term_definitions> + <term_definitions code="at0140"> + <items id="description">Details über die Körperstelle und über die Verabreichung des Arzneimittels.</items> + <items id="text">Details zur Verabreichung</items> + </term_definitions> + <term_definitions code="at0141"> + <items id="comment">Zum Beispiel: "linker Oberarm", "intravenöser Katheter rechte Hand". Die Kodierung der Körperstelle mit einer Terminologie, wenn möglich, wird bevorzugt.</items> + <items id="description">Strukturierte Beschreibung der Körperstelle, an der das Arzneimittel angewendet wird.</items> + <items id="text">Körperstelle</items> + </term_definitions> + <term_definitions code="at0142"> + <items id="comment">Zum Beispiel: "Auf der medialen Hautoberfläche des linken Unterarms, 10 cm bis 20 cm distal von der Spitze des Ellbogens entfernt."</items> + <items id="description">Genaue Beschreibung der Körperstelle, an der das Arzneimittel, der Impfstoff oder ein therapeutisches Produkt angewendet wird.</items> + <items id="text">Lokalisation</items> + </term_definitions> + <term_definitions code="at0143"> + <items id="comment">Kommentar: Zum Beispiel: "via Z-track Injektion"; "via Vernebler". Die Kodierung der Methode mit einer Terminologie, wenn möglich, wird bevorzugt.</items> + <items id="description">Die Technik oder das Gerät mit dem das verschriebene Arzneimittel verabreicht wird oder werden soll.</items> + <items id="text">Methode der Verabreichung</items> + </term_definitions> + <term_definitions code="at0144"> + <items id="description">Details zu der Vorrichtung mit dem das Arzneimittel verabreicht wird.</items> + <items id="text">Verabreichungsmittel</items> + </term_definitions> + <term_definitions code="at0145"> + <items id="description">Der Rezeptentwurf wurde erstellt und wartet auf die Bestätigung durch einen autorisierten Arzt. Kann auch verwendet werden, wenn die Re-autorisierung gebündelt erfolgt. Dieser "careflow_step" hat den Status "geplant" oder "aktiv", was die Notwendigkeit widerspiegelt, sowohl Neuaufträge als auch wieder autorisierte Aufträge zu bearbeiten.</items> + <items id="text">Rezept wartet auf Genehmigung</items> + </term_definitions> + <term_definitions code="at0147"> + <items id="comment">Kommentar: Zum Beispiel: "oral", "intravenös" oder "topisch". Die Kodierung des Verabreichungswegs wird bevorzugt, wenn möglich. Mehrere potentielle Anwendungsformen können spezifiziert werden.</items> + <items id="description">Die Angabe darüber, auf welche Art das verordnete Arzneimittel am Körper des Patienten angewendet wird.</items> + <items id="text">Verabreichungsweg</items> + </term_definitions> + <term_definitions code="at0148"> + <items id="description">Das Arzneimittel wurde zubereitet. Zum Beispiel: Zubereitung einer intravenösen Mischung.</items> + <items id="text">Arzneimittel wurde vorbereitet</items> + </term_definitions> + <term_definitions code="at0149"> + <items id="comment">Details zu der Person, die die Überprüfung vornimmt, können in das Referenzmodell "Participations" übertragen werden.</items> + <items id="description">Der Prozessschritt wurde durch eine unabhängige Person überprüft.</items> + <items id="text">Nachkontrolliert?</items> + </term_definitions> + <term_definitions code="at0150"> + <items id="description">Das Rezept wurde vor der Ausstellung widerrufen.</items> + <items id="text">Rezept wurde widerrufen</items> + </term_definitions> + <term_definitions code="at0151"> + <items id="description">Das Rezept ist ungültig geworden oder ist abgelaufen, ohne das es eingelöst wurde.</items> + <items id="text">Rezept ist ungültig oder abgelaufen</items> + </term_definitions> + <term_definitions code="at0152"> + <items id="description">Das Rezept wurde erfolgreich ausgeführt/eingehalten.</items> + <items id="text">Rezept wurde ausgeführt</items> + </term_definitions> + <term_definitions code="at0153"> + <items id="description">Das Arzneimittel ist offiziell zur Anwendung genehmigt.</items> + <items id="text">Arzneimittel wurde genehmigt</items> + </term_definitions> + <term_definitions code="at0154"> + <items id="comment">Zum Beispiel: 29.10.2017</items> + <items id="description">Das Datum/die Uhrzeit an dem die Arzneimittelbehandlung wieder begonnen wird, gemäß dem "Verabreichung wurde ausgesetzt"- Schritt.</items> + <items id="text">Datum/Uhrzeit des Neuanfangs</items> + </term_definitions> + <term_definitions code="at0155"> + <items id="comment">Zum Beispiel: "An Tag 2 nach der OP."</items> + <items id="description">Das Kriterium, das den Neustart der Arzneimitteleinnahme auslöst, gemäß dem Schritt "Verabreichung wurde ausgesetzt".</items> + <items id="text">Kriterium des Neuanfangs</items> + </term_definitions> + <term_definitions code="421245007"> + <items id="text">Diphtheria + pertussis + tetanus vaccine (product)</items> + </term_definitions> + <term_definitions code="787859002"> + <items id="text">Vaccine product (product)</items> + </term_definitions> + <term_definitions code="37146000"> + <items id="text">Typhus vaccine (product)</items> + </term_definitions> + <term_definitions code="407746005"> + <items id="text">Varicella-zoster live attenuated vaccine (product)</items> + </term_definitions> + <term_definitions code="787859002:127489000=412300006"> + <items id="text">Vaccine product (product): Has active ingredient (attribute) = Rubella and mumps vaccine (substance)</items> + </term_definitions> + <term_definitions code="787859002:{127489000=428126001}{127489000=412374001}{127489000=396433007}{127489000=412375000}{127489000=396424005}{127489000=768365004}{127489000=768366003}"> + <items id="text">Vaccine product (product): { Has active ingredient (attribute) = Diphtheria vaccine (substance) } { Has active ingredient (attribute) = Haemophilus influenzae type b vaccine (substance) } { Has active ingredient (attribute) = Pertussis vaccine (substance) } { Has active ingredient (attribute) = Tetanus vaccine (substance) } { Has active ingredient (attribute) = Hepatitis B virus vaccine (substance) } { Has active ingredient (attribute) = Meningococcus group A vaccine (substance) } { Has active ingredient (attribute) = Meningococcus group C vaccine (substance) }</items> + </term_definitions> + <term_definitions code="427542001"> + <items id="text">Diphtheria + tetanus + pertussis + poliomyelitis + recombinant hepatitis B virus vaccine (product)</items> + </term_definitions> + <term_definitions code="787859002:{127489000=428126001}{127489000=412374001}{127489000=396433007}{127489000=412375000}{127489000=396424005}"> + <items id="text">Vaccine product (product): { Has active ingredient (attribute) = Diphtheria vaccine (substance) } { Has active ingredient (attribute) = Haemophilus influenzae type b vaccine (substance) } { Has active ingredient (attribute) = Pertussis vaccine (substance) } { Has active ingredient (attribute) = Tetanus vaccine (substance) } { Has active ingredient (attribute) = Hepatitis B virus vaccine (substance) }</items> + </term_definitions> + <term_definitions code="333707007"> + <items id="text">Hepatitis A+typhoid vaccine (product)</items> + </term_definitions> + <term_definitions code="426842004"> + <items id="text">Diphtheria + tetanus + pertussis + poliomyelitis + recombinant hepatitis B virus + recombinant haemophilus influenzae type B vaccine (product)</items> + </term_definitions> + <term_definitions code="426971004"> + <items id="text">Haemophilus influenzae Type b + recombinant hepatitis B virus vaccine (product)</items> + </term_definitions> + <term_definitions code="787859002:{127489000=428126001}{127489000=396424005}{127489000=412375000}"> + <items id="text">Vaccine product (product): { Has active ingredient (attribute) = Diphtheria vaccine (substance) } { Has active ingredient (attribute) = Hepatitis B virus vaccine (substance) } { Has active ingredient (attribute) = Tetanus vaccine (substance) }</items> + </term_definitions> + <term_definitions code="414004005"> + <items id="text">Diphtheria + tetanus + pertussis + poliomyelitis + haemophilus influenzae b vaccine (product)</items> + </term_definitions> + <term_definitions code="426081003"> + <items id="text">Diphtheria + tetanus + pertussis + recombinant hepatitis B virus vaccine (product)</items> + </term_definitions> + <term_definitions code="787859002:{127489000=412374001}{127489000=396436004}"> + <items id="text">Vaccine product (product): { Has active ingredient (attribute) = Haemophilus influenzae type b vaccine (substance) } { Has active ingredient (attribute) = Live Poliovirus vaccine (substance) }</items> + </term_definitions> + <term_definitions code="787859002:{127489000=428126001}{127489000=396438003}{127489000=412375000}"> + <items id="text">Vaccine product (product): { Has active ingredient (attribute) = Diphtheria vaccine (substance) } { Has active ingredient (attribute) = Rubella vaccine (substance) } { Has active ingredient (attribute) = Tetanus vaccine (substance) }</items> + </term_definitions> + <term_definitions code="414005006"> + <items id="text">Diphtheria + tetanus + pertussis + poliomyelitis vaccine (product)</items> + </term_definitions> + <term_definitions code="414006007"> + <items id="text">Diphtheria + tetanus + poliomyelitis vaccine (product)</items> + </term_definitions> + <term_definitions code="419550004"> + <items id="text">Measles + mumps + rubella + varicella vaccine (product)</items> + </term_definitions> + <term_definitions code="787859002:{127489000=396427003}{127489000=396438003}"> + <items id="text">Vaccine product (product): { Has active ingredient (attribute) = Measles vaccine (substance) } { Has active ingredient (attribute) = Rubella vaccine (substance) }</items> + </term_definitions> + <term_definitions code="61153008"> + <items id="text">Measles, mumps and rubella vaccine (product)</items> + </term_definitions> + <term_definitions code="785865001"> + <items id="text">Measles and mumps vaccine (product)</items> + </term_definitions> + <term_definitions code="333702001"> + <items id="text">Hepatitis A+B vaccine (product)</items> + </term_definitions> + <term_definitions code="350327004"> + <items id="text">Diphtheria + tetanus vaccine (product)</items> + </term_definitions> + <term_definitions code="78785900:{127489000=398730001}{127489000=412374001}"> + <items id="text">Vaccine product (product): { Has active ingredient (attribute) = Pneumococcal vaccine (substance) } { Has active ingredient (attribute) = Haemophilus influenzae type b vaccine (substance) }</items> + </term_definitions> + <term_definitions code="423912009"> + <items id="text">Haemophilus influenzae type b + Meningococcal group C vaccine (product)</items> + </term_definitions> + <term_definitions code="787859002:{127489000=412374001}{127489000=396433007}{127489000=396411005}"> + <items id="text">Vaccine product (product): { Has active ingredient (attribute) = Haemophilus influenzae type b vaccine (substance) } { Has active ingredient (attribute) = Pertussis vaccine (substance) } { Has active ingredient (attribute) = Toxoid (substance) }</items> + </term_definitions> + <term_definitions code="787859002:{127489000=396422009}{127489000=396441007}"> + <items id="text">Vaccine product (product): { Has active ingredient (attribute) = Cholera vaccine (substance) } { Has active ingredient (attribute) = Typhoid vaccine (substance) }</items> + </term_definitions> + <term_definitions code="333697005"> + <items id="text">Japanese B encephalitis vaccine</items> + </term_definitions> + <term_definitions code="333699008"> + <items id="text">Tick-borne encephalitis vaccine</items> + </term_definitions> + <term_definitions code="90043005"> + <items id="text">Mumps live virus vaccine</items> + </term_definitions> + <term_definitions code="111164008"> + <items id="text">Poliovirus vaccine</items> + </term_definitions> + <term_definitions code="116077000"> + <items id="text">Rotavirus vaccine</items> + </term_definitions> + <term_definitions code="333606008"> + <items id="text">Rabies vaccine</items> + </term_definitions> + <term_definitions code="407737004"> + <items id="text">Varicella-zoster vaccine</items> + </term_definitions> + <term_definitions code="33234009"> + <items id="text">Smallpox vaccine</items> + </term_definitions> + <term_definitions code="424519000"> + <items id="text">Human papillomavirus vaccine</items> + </term_definitions> + <term_definitions code="56844000"> + <items id="text">Yellow fever vaccine</items> + </term_definitions> + <term_definitions code="386013003"> + <items id="text">Rubella vaccine</items> + </term_definitions> + <term_definitions code="386012008"> + <items id="text">Measles vaccine</items> + </term_definitions> + <term_definitions code="14745005"> + <items id="text">Hepatitis A virus vaccine</items> + </term_definitions> + <term_definitions code="34689006"> + <items id="text">Hepatitis B virus vaccine</items> + </term_definitions> + <term_definitions code="46233009"> + <items id="text">Influenza virus vaccine</items> + </term_definitions> + <term_definitions code="89428009"> + <items id="text">Typhoid vaccine</items> + </term_definitions> + <term_definitions code="420538001"> + <items id="text">Tuberculosos vaccine</items> + </term_definitions> + <term_definitions code="333621002"> + <items id="text">Tetanus vaccine</items> + </term_definitions> + <term_definitions code="333598008"> + <items id="text">Pneumococcal vaccine</items> + </term_definitions> + <term_definitions code="11866009"> + <items id="text">Plague vaccine</items> + </term_definitions> + <term_definitions code="61602008"> + <items id="text">Pertussis vaccine</items> + </term_definitions> + <term_definitions code="423531006"> + <items id="text">Meningococcus vaccine</items> + </term_definitions> + <term_definitions code="333680004"> + <items id="text">Haemophilus influenzae Type b vaccine</items> + </term_definitions> + <term_definitions code="428214002"> + <items id="text">Diphtheria vaccine</items> + </term_definitions> + <term_definitions code="35736007"> + <items id="text">Cholera vaccine</items> + </term_definitions> + <term_definitions code="7230005"> + <items id="text">Brucella vaccine</items> + </term_definitions> + <term_definitions code="333521006"> + <items id="text">Anthrax vaccine</items> + </term_definitions> + <term_definitions code="714569001"> + <items id="text">Product containing normal immunoglobulin human (medicinal product)</items> + </term_definitions> + <term_definitions code="786224004"> + <items id="text">Product containing human anti-D immunoglobulin (medicinal product)|</items> + </term_definitions> + <term_definitions code="384706007"> + <items id="text">Product containing tetanus antitoxin (medicinal product)</items> + </term_definitions> + <term_definitions code="62294009"> + <items id="text">Product containing Varicella-zoster virus antibody (medicinal product)</items> + </term_definitions> + <term_definitions code="9542007"> + <items id="text">Product containing Hepatitis B surface antigen immunoglobulin (medicinal product)</items> + </term_definitions> + <term_definitions code="80834004"> + <items id="text">Product containing rabies human immune globulin (medicinal product)</items> + </term_definitions> + <term_definitions code="9778000"> + <items id="text">Product containing Cytomegalovirus antibody (medicinal product)</items> + </term_definitions> + <term_definitions code="108725001"> + <items id="text">Product containing palivizumab (medicinal product)</items> + </term_definitions> + <term_definitions code="763703008"> + <items id="text">Product containing bezlotoxumab (medicinal product)</items> + </term_definitions> + <term_definitions code="J07AR"> + <items id="text">Typhus (exanthematicus)-Impfstoff</items> + </term_definitions> + <term_definitions code="J07AR01"> + <items id="text">Typhus exanthematicus, inaktiviert, ganze Zelle</items> + </term_definitions> + <term_definitions code="J07AC"> + <items id="text">Milzbrand-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07AC01"> + <items id="text">Anthrax-Antigen</items> + </term_definitions> + <term_definitions code="J07AD"> + <items id="text">Brucellose-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07AD01"> + <items id="text">Brucella-Antigen</items> + </term_definitions> + <term_definitions code="J07AE"> + <items id="text">Cholera-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07AE01"> + <items id="text">Cholera, inaktiviert, ganze Zelle</items> + </term_definitions> + <term_definitions code="J07AE02"> + <items id="text">Cholera, lebend abgeschwächt</items> + </term_definitions> + <term_definitions code="J07AE51"> + <items id="text">Cholera, Kombinationen mit Typhus-Impfstoff, inaktiviert, ganze Zelle</items> + </term_definitions> + <term_definitions code="J07AF"> + <items id="text">Diphtherie-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07AF01"> + <items id="text">Diphtherie-Toxoid</items> + </term_definitions> + <term_definitions code="J07AG"> + <items id="text">Haemophilus influenzae B-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07AG01"> + <items id="text">Haemophilus influenzae B, gereinigtes Antigen konjugiert</items> + </term_definitions> + <term_definitions code="J07AG51"> + <items id="text">Haemophilus influenzae B, Kombinationen mit Toxoiden</items> + </term_definitions> + <term_definitions code="J07AG52"> + <items id="text">Haemophilus influenzae B, Kombinationen mit Pertussis und Toxoiden</items> + </term_definitions> + <term_definitions code="J07AG53"> + <items id="text">Haemophilus influenzae B, Kombinationen mit Meningokokken C, konjugiert</items> + </term_definitions> + <term_definitions code="J07AH"> + <items id="text">Meningokokken-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07AH01"> + <items id="text">Meningokokken A, gereinigtes Polysaccharid-Antigen</items> + </term_definitions> + <term_definitions code="J07AH02"> + <items id="text">Andere Meningokokken monovalent, gereinigtes Polysaccharid-Antigen</items> + </term_definitions> + <term_definitions code="J07AH03"> + <items id="text">Meningokokken bivalent (A, C), gereinigtes Polysaccharid-Antigen</items> + </term_definitions> + <term_definitions code="J07AH04"> + <items id="text">Meningokokken tetravalent (A, C, Y, W-135), gereinigtes Polysaccharid-Antigen</items> + </term_definitions> + <term_definitions code="J07AH05"> + <items id="text">Andere Meningokokken polyvalent, gereinigtes Polysaccharid-Antigen</items> + </term_definitions> + <term_definitions code="J07AH06"> + <items id="text">Meningokokken B, äußere Vesikelmembran-Impfstoff</items> + </term_definitions> + <term_definitions code="J07AH07"> + <items id="text">Meningokokken C, gereinigtes Polysaccharid-Antigen, konjugiert</items> + </term_definitions> + <term_definitions code="J07AH08"> + <items id="text">Meningokokken tetravalent (A, C, Y, W-135), gereinigtes Polysaccharid-Antigen, konjugiert</items> + </term_definitions> + <term_definitions code="J07AH09"> + <items id="text">Meningokokken B, Multikomponenten-Impfstoff</items> + </term_definitions> + <term_definitions code="J07AH10"> + <items id="text">Meningokokken A, gereinigtes Polysaccharid-Antigen, konjugiert</items> + </term_definitions> + <term_definitions code="J07AJ"> + <items id="text">Pertussis-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07AJ01"> + <items id="text">Pertussis, inaktiviert, ganze Zelle</items> + </term_definitions> + <term_definitions code="J07AJ02"> + <items id="text">Pertussis, gereinigtes Antigen</items> + </term_definitions> + <term_definitions code="J07AJ51"> + <items id="text">Pertussis, inaktiviert, ganze Zelle, Kombinationen mit Toxoiden</items> + </term_definitions> + <term_definitions code="J07AJ52"> + <items id="text">Pertussis, gereinigtes Antigen, Kombinationen mit Toxoiden</items> + </term_definitions> + <term_definitions code="J07AK"> + <items id="text">Pest-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07AK01"> + <items id="text">Pest, inaktiviert, ganze Zelle</items> + </term_definitions> + <term_definitions code="J07AL"> + <items id="text">Pneumokokken-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07AL01"> + <items id="text">Pneumokokken, gereinigtes Polysaccharid-Antigen</items> + </term_definitions> + <term_definitions code="J07AL02"> + <items id="text">Pneumokokken, gereinigtes Polysaccharid-Antigen, konjugiert</items> + </term_definitions> + <term_definitions code="J07AL52"> + <items id="text">Pneumokokken, gereinigtes Polysaccharid-Antigen und Haemophilus influenzae B, konjugiert</items> + </term_definitions> + <term_definitions code="J07AM"> + <items id="text">Tetanus-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07AM01"> + <items id="text">Tetanus-Toxoid</items> + </term_definitions> + <term_definitions code="J07AM51"> + <items id="text">Tetanus-Toxoid, Kombinationen mit Diphtherie-Toxoid</items> + </term_definitions> + <term_definitions code="J07AM52"> + <items id="text">Tetanus-Toxoid, Kombinationen mit Tetanus-Immunglobulin</items> + </term_definitions> + <term_definitions code="J07AN"> + <items id="text">Tuberkulose-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07AN01"> + <items id="text">Tuberkulose, lebend abgeschwächt</items> + </term_definitions> + <term_definitions code="J07AP"> + <items id="text">Typhus-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07AP01"> + <items id="text">Typhus, oral, lebend abgeschwächt</items> + </term_definitions> + <term_definitions code="J07AP02"> + <items id="text">Typhus, inaktiviert, ganze Zelle</items> + </term_definitions> + <term_definitions code="J07AP03"> + <items id="text">Typhus, gereinigtes Polysaccharid-Antigen</items> + </term_definitions> + <term_definitions code="J07AP10"> + <items id="text">Typhus, Kombinationen mit Paratyphustypen</items> + </term_definitions> + <term_definitions code="J07BA"> + <items id="text">Encephalitis-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07BA01"> + <items id="text">FSME, inaktiviert, ganzes Virus</items> + </term_definitions> + <term_definitions code="J07BA02"> + <items id="text">Encephalitis, japanische, inaktiviert, ganzes Virus</items> + </term_definitions> + <term_definitions code="J07BA03"> + <items id="text">Encephalitis, japanische, lebend abgeschwächt</items> + </term_definitions> + <term_definitions code="J07BB"> + <items id="text">Influenza-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07BB01"> + <items id="text">Influenza, inaktiviert, ganzes Virus</items> + </term_definitions> + <term_definitions code="J07BB02"> + <items id="text">Influenza, inaktiviert, Spaltvirus oder Oberflächenantigen</items> + </term_definitions> + <term_definitions code="J07BB03"> + <items id="text">Influenza, lebend abgeschwächt</items> + </term_definitions> + <term_definitions code="J07BC"> + <items id="text">Hepatitis-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07BC01"> + <items id="text">Hepatitis B, gereinigtes Antigen</items> + </term_definitions> + <term_definitions code="J07BC02"> + <items id="text">Hepatitis A, inaktiviert, ganzes Virus</items> + </term_definitions> + <term_definitions code="J07BC03"> + <items id="text">Hepatitis A, gereinigtes Antigen</items> + </term_definitions> + <term_definitions code="J07BC20"> + <items id="text">Kombinationen</items> + </term_definitions> + <term_definitions code="J07BD"> + <items id="text">Masern-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07BD01"> + <items id="text">Masern, lebend abgeschwächt</items> + </term_definitions> + <term_definitions code="J07BD51"> + <items id="text">Masern, Kombinationen mit Mumps, lebend abgeschwächt</items> + </term_definitions> + <term_definitions code="J07BD52"> + <items id="text">Masern, Kombinationen mit Mumps und Röteln, lebend abgeschwächt</items> + </term_definitions> + <term_definitions code="J07BD53"> + <items id="text">Masern, Kombinationen mit Röteln, lebend abgeschwächt</items> + </term_definitions> + <term_definitions code="J07BD54"> + <items id="text">Masern, Kombinationen mit Mumps, Röteln und Varicella, lebend abgeschwächt</items> + </term_definitions> + <term_definitions code="J07BE"> + <items id="text">Mumps-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07BE01"> + <items id="text">Mumps, lebend abgeschwächt</items> + </term_definitions> + <term_definitions code="J07BF"> + <items id="text">Poliomyelitis-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07BF01"> + <items id="text">Poliomyelitis, oral, monovalent, lebend abgeschwächt</items> + </term_definitions> + <term_definitions code="J07BF02"> + <items id="text">Poliomyelitis, oral, trivalent, lebend abgeschwächt</items> + </term_definitions> + <term_definitions code="J07BF03"> + <items id="text">Poliomyelitis, trivalent, inaktiviert, ganzes Virus</items> + </term_definitions> + <term_definitions code="J07BF04"> + <items id="text">Poliomyelitis, oral, bivalent, lebend abgeschwächt</items> + </term_definitions> + <term_definitions code="J07BG"> + <items id="text">Tollwut-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07BG01"> + <items id="text">Tollwut, inaktiviert, ganzes Virus</items> + </term_definitions> + <term_definitions code="J07BH"> + <items id="text">Rotavirus-Diarrhoe-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07BH01"> + <items id="text">Rotavirus, lebend abgeschwächt</items> + </term_definitions> + <term_definitions code="J07BH02"> + <items id="text">Rotavirus, pentavalent, lebend, Reassortanten</items> + </term_definitions> + <term_definitions code="J07BJ"> + <items id="text">Röteln-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07BJ01"> + <items id="text">Röteln, lebend abgeschwächt</items> + </term_definitions> + <term_definitions code="J07BJ51"> + <items id="text">Röteln, Kombinationen mit Mumps, lebend abgeschwächt</items> + </term_definitions> + <term_definitions code="J07BK"> + <items id="text">Varicella Zoster Impfstoffe</items> + </term_definitions> + <term_definitions code="J07BK01"> + <items id="text">Varicella, lebend abgeschwächt</items> + </term_definitions> + <term_definitions code="J07BK02"> + <items id="text">Zoster Virus, lebend abgeschwächt</items> + </term_definitions> + <term_definitions code="J07BK03"> + <items id="text">Zoster Virus, gereinigtes Antigen</items> + </term_definitions> + <term_definitions code="J07BL"> + <items id="text">Gelbfieber-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07BL01"> + <items id="text">Gelbfieber, lebend abgeschwächt</items> + </term_definitions> + <term_definitions code="J07BM"> + <items id="text">Papillomvirus-Impfstoffe</items> + </term_definitions> + <term_definitions code="J07BM01"> + <items id="text">Humaner-Papillomvirus-Impfstoff (Typen 6,11,16,18)</items> + </term_definitions> + <term_definitions code="J07BM02"> + <items id="text">Humaner-Papillomvirus-Impfstoff (Typen 16,18)</items> + </term_definitions> + <term_definitions code="J07BM03"> + <items id="text">Humaner-Papillomvirus-Impfstoff (Typen 6,11,16,18,31,33,45,52,58)</items> + </term_definitions> + <term_definitions code="J07BX"> + <items id="text">Andere virale Impfstoffe</items> + </term_definitions> + <term_definitions code="J07BX01"> + <items id="text">Pocken-Impfstoff, lebend, modifiziert</items> + </term_definitions> + <term_definitions code="J07CA"> + <items id="text">Bakterielle und virale Impfstoffe, kombiniert</items> + </term_definitions> + <term_definitions code="J07CA01"> + <items id="text">Diphtherie-Poliomyelitis-Tetanus</items> + </term_definitions> + <term_definitions code="J07CA02"> + <items id="text">Diphtherie-Pertussis-Poliomyelitis-Tetanus</items> + </term_definitions> + <term_definitions code="J07CA03"> + <items id="text">Diphtherie-Röteln-Tetanus</items> + </term_definitions> + <term_definitions code="J07CA04"> + <items id="text">Haemophilus influenzae B und Poliomyelitis</items> + </term_definitions> + <term_definitions code="J07CA05"> + <items id="text">Diphtherie-Hepatitis B-Pertussis-Tetanus</items> + </term_definitions> + <term_definitions code="J07CA06"> + <items id="text">Diphtherie-Haemophilus influenzae B-Pertussis-Poliomyelitis-Tetanus</items> + </term_definitions> + <term_definitions code="J07CA07"> + <items id="text">Diphtherie-Hepatitis B-Tetanus</items> + </term_definitions> + <term_definitions code="J07CA08"> + <items id="text">Haemophilus influenzae B und Hepatitis B</items> + </term_definitions> + <term_definitions code="J07CA09"> + <items id="text">Diphtherie-Haemophilus influenzae B-Pertussis-Poliomyelitis-Tetanus-Hepatitis B</items> + </term_definitions> + <term_definitions code="J07CA10"> + <items id="text">Typhus-Hepatitis A</items> + </term_definitions> + <term_definitions code="J07CA11"> + <items id="text">Diphtherie-Haemophilus influenzae B-Pertussis-Tetanus-Hepatitis B</items> + </term_definitions> + <term_definitions code="J07CA12"> + <items id="text">Diphtherie-Pertussis-Poliomyelitis-Tetanus-Hepatitis B</items> + </term_definitions> + <term_definitions code="J07CA13"> + <items id="text">Diphtherie-Haemophilus influenzae B-Pertussis-Tetanus-Hepatitis B-Meningokokken A + C</items> + </term_definitions> + <term_definitions code="J06BA"> + <items id="text">Immunglobuline, normal human</items> + </term_definitions> + <term_definitions code="J06BA01"> + <items id="text">Immunglobuline, normal human, zur extravasalen Anwendung</items> + </term_definitions> + <term_definitions code="J06BA02"> + <items id="text">Immunglobuline, normal human, zur intravasalen Anwendung</items> + </term_definitions> + <term_definitions code="J06BB"> + <items id="text">Spezifische Immunglobuline</items> + </term_definitions> + <term_definitions code="J06BB01"> + <items id="text">Anti-D(rh)-Immunglobulin</items> + </term_definitions> + <term_definitions code="J06BB02"> + <items id="text">Tetanus-Immunglobulin</items> + </term_definitions> + <term_definitions code="J06BB03"> + <items id="text">Varicella/Zoster-Immunglobulin</items> + </term_definitions> + <term_definitions code="J06BB04"> + <items id="text">Hepatitis-B-Immunglobulin</items> + </term_definitions> + <term_definitions code="J06BB05"> + <items id="text">Tollwut-Immunglobulin</items> + </term_definitions> + <term_definitions code="J06BB09"> + <items id="text">Cytomegalievirus-Immunglobulin</items> + </term_definitions> + <term_definitions code="J06BB16"> + <items id="text">Palivizumab</items> + </term_definitions> + <term_definitions code="J06BB21"> + <items id="text">Bezlotoxumab</items> + </term_definitions> + <term_definitions code="1119305005"> + <items id="text">Vaccine product containing only Severe acute respiratory syndrome coronavirus 2 antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="1119349007"> + <items id="text">Vaccine product containing only Severe acute respiratory syndrome coronavirus 2 messenger ribonucleic acid (medicinal product)</items> + </term_definitions> + <term_definitions code="836503005"> + <items id="text">Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae antigens (medicinal product)</items> + </term_definitions> + <term_definitions code="2221000221107"> + <items id="text">Vaccine product containing only live attenuated Human alphaherpesvirus 3 antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836376002"> + <items id="text">Vaccine product containing Mumps orthorubulavirus and Rubella virus antigens (medicinal product)</items> + </term_definitions> + <term_definitions code="871729003+836380007+601000221108+863911006+836374004+871871008"> + <items id="text">Vaccine product containing only Corynebacterium diphtheriae antigen (medicinal product) + Vaccine product containing Haemophilus influenzae type B antigen (medicinal product) + Vaccine product containing Bordetella pertussis antigen (medicinal product) + Vaccine product containing Clostridium tetani antigen (medicinal product) + Vaccine product containing Hepatitis B virus antigen (medicinal product) + Vaccine product containing only Neisseria meningitidis serogroup A and C antigens (medicinal product)</items> + </term_definitions> + <term_definitions code="871892008"> + <items id="text">Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae and Hepatitis B virus and Human poliovirus antigens (medicinal product)</items> + </term_definitions> + <term_definitions code="871729003+836380007+601000221108+863911006+836374004"> + <items id="text">Vaccine product containing only Corynebacterium diphtheriae antigen (medicinal product) + Vaccine product containing Haemophilus influenzae type B antigen (medicinal product) + Vaccine product containing Bordetella pertussis antigen (medicinal product) + Vaccine product containing Clostridium tetani antigen (medicinal product) + Vaccine product containing Hepatitis B virus antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836501007"> + <items id="text">Vaccine product containing Hepatitis A virus and Salmonella enterica subspecies enterica serovar Typhi antigens (medicinal product)</items> + </term_definitions> + <term_definitions code="871896006"> + <items id="text">Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae and Haemophilus influenzae type B and Hepatitis B virus and Human poliovirus antigens (medicinal product)</items> + </term_definitions> + <term_definitions code="865946000"> + <items id="text">Vaccine product containing Haemophilus influenzae type B and Hepatitis B virus antigens (medicinal product)</items> + </term_definitions> + <term_definitions code="871729003+836374004+863911006"> + <items id="text">Vaccine product containing only Corynebacterium diphtheriae antigen (medicinal product) + Vaccine product containing Hepatitis B virus antigen (medicinal product) + Vaccine product containing Clostridium tetani antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="838279002"> + <items id="text">Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae and Haemophilus influenzae type B and Human poliovirus antigens (medicinal product)</items> + </term_definitions> + <term_definitions code="871917002"> + <items id="text">Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae and Hepatitis B virus (medicinal product)</items> + </term_definitions> + <term_definitions code="836380007+1031000221108"> + <items id="text">Vaccine product containing Haemophilus influenzae type B antigen (medicinal product) + Vaccine product containing Human poliovirus antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="871729003+836388000+863911006"> + <items id="text">Vaccine product containing only Corynebacterium diphtheriae antigen (medicinal product) + Vaccine product containing Rubella virus antigen (medicinal product) + Vaccine product containing Clostridium tetani antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836508001"> + <items id="text">Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae and Human poliovirus antigens (medicinal product)</items> + </term_definitions> + <term_definitions code="836505003"> + <items id="text">Vaccine product containing Clostridium tetani and Corynebacterium diphtheriae and Human poliovirus antigens (medicinal product)</items> + </term_definitions> + <term_definitions code="838280004"> + <items id="text">Vaccine product containing Human alphaherpesvirus 3 and Measles morbillivirus and Mumps orthorubulavirus and Rubella virus antigens (medicinal product)</items> + </term_definitions> + <term_definitions code="836382004+836388000"> + <items id="text">Vaccine product containing Measles morbillivirus antigen (medicinal product) + Vaccine product containing Rubella virus antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836494009"> + <items id="text">Vaccine product containing Measles morbillivirus and Mumps orthorubulavirus and Rubella virus antigens (medicinal product)</items> + </term_definitions> + <term_definitions code="836499004"> + <items id="text">Vaccine product containing Measles morbillivirus and Mumps orthorubulavirus antigens (medicinal product)</items> + </term_definitions> + <term_definitions code="836493003"> + <items id="text">Vaccine product containing Hepatitis A and Hepatitis B virus antigens (medicinal product)</items> + </term_definitions> + <term_definitions code="836502000"> + <items id="text">Vaccine product containing Clostridium tetani and Corynebacterium diphtheriae antigens (medicinal product)</items> + </term_definitions> + <term_definitions code="836398006+836380007"> + <items id="text">Vaccine product containing Streptococcus pneumoniae antigen (medicinal product) + Vaccine product containing Haemophilus influenzae type B antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836500008"> + <items id="text">Vaccine product containing only Haemophilus influenzae type B and Neisseria meningitidis serogroup C antigens (medicinal product)</items> + </term_definitions> + <term_definitions code="836380007+601000221108"> + <items id="text">Vaccine product containing Haemophilus influenzae type B antigen (medicinal product) + Vaccine product containing Bordetella pertussis antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836383009+836390004"> + <items id="text">Vaccine product containing Vibrio cholerae antigen (medicinal product) + Vaccine product containing Salmonella enterica subspecies enterica serovar Typhi antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836378001"> + <items id="text">Vaccine product containing Japanese encephalitis virus antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836403007"> + <items id="text">Vaccine product containing Tick-borne encephalitis virus antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="871738001"> + <items id="text">Vaccine product containing only live attenuated Mumps orthorubulavirus antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="1031000221108"> + <items id="text">Vaccine product containing Human poliovirus antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836387005"> + <items id="text">Vaccine product containing Rotavirus antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836393002"> + <items id="text">Vaccine product containing Rabies lyssavirus antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836495005"> + <items id="text">Vaccine product containing Human alphaherpesvirus 3 antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836389008"> + <items id="text">Vaccine product containing Vaccinia virus antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836379009"> + <items id="text">Vaccine product containing Human papillomavirus antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836385002"> + <items id="text">Vaccine product containing Yellow fever virus antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836388000"> + <items id="text">Vaccine product containing Rubella virus antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836382004"> + <items id="text">Vaccine product containing Measles morbillivirus antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836375003"> + <items id="text">Vaccine product containing Hepatitis A virus antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836374004"> + <items id="text">Vaccine product containing Hepatitis B virus antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836377006"> + <items id="text">Vaccine product containing Influenza virus antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836390004"> + <items id="text">Vaccine product containing Salmonella enterica subspecies enterica serovar Typhi antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836402002"> + <items id="text">Vaccine product containing live attenuated Mycobacterium bovis antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="863911006"> + <items id="text">Vaccine product containing Clostridium tetani antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836398006"> + <items id="text">Vaccine product containing Streptococcus pneumoniae antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="840549009"> + <items id="text">Vaccine product containing Yersinia pestis antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="601000221108"> + <items id="text">Vaccine product containing Bordetella pertussis antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836401009"> + <items id="text">Vaccine product containing Neisseria meningitidis antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836380007"> + <items id="text">Vaccine product containing Haemophilus influenzae type B antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836381006"> + <items id="text">Vaccine product containing Corynebacterium diphtheriae antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836383009"> + <items id="text">Vaccine product containing Vibrio cholerae antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="836384003"> + <items id="text">Vaccine product containing Bacillus anthracis antigen (medicinal product)</items> + </term_definitions> + <term_definitions code="840539006"> + <items id="text">Disease caused by Severe acute respiratory syndrome coronavirus 2 (disorder)</items> + </term_definitions> + <term_definitions code="40733004"> + <items id="text">Infectious disease (disorder)</items> + </term_definitions> + <term_definitions code="16901001"> + <items id="text">Central European encephalitis (disorder)</items> + </term_definitions> + <term_definitions code="64572001"> + <items id="text">Disease (disorder)</items> + </term_definitions> + <term_definitions code="307333004"> + <items id="text">Rhesus isoimmunization due to anti-D (disorder)</items> + </term_definitions> + <term_definitions code="39111003"> + <items id="text">Louse-borne typhus (disorder)</items> + </term_definitions> + <term_definitions code="28944009"> + <items id="text">Cytomegalovirus infection (disorder)</items> + </term_definitions> + <term_definitions code="55735004"> + <items id="text">Respiratory syncytial virus infection (disorder)</items> + </term_definitions> + <term_definitions code="186431008"> + <items id="text">Clostridioides difficile infection (disorder)</items> + </term_definitions> + <term_definitions code="67924001"> + <items id="text">Smallpox</items> + </term_definitions> + <term_definitions code="240532009"> + <items id="text">human papilomavirus infection</items> + </term_definitions> + <term_definitions code="16541001"> + <items id="text">Yellow fever</items> + </term_definitions> + <term_definitions code="4740000"> + <items id="text">Herpes Zoster</items> + </term_definitions> + <term_definitions code="38907003"> + <items id="text">Varicella</items> + </term_definitions> + <term_definitions code="36653000"> + <items id="text">Rubella</items> + </term_definitions> + <term_definitions code="14168008"> + <items id="text">Rabies</items> + </term_definitions> + <term_definitions code="398102009"> + <items id="text">Acute Poliomyelitis</items> + </term_definitions> + <term_definitions code="36989005"> + <items id="text">Mumps</items> + </term_definitions> + <term_definitions code="14189004"> + <items id="text">Measles</items> + </term_definitions> + <term_definitions code="40468003"> + <items id="text">Viral hepatitis, type A</items> + </term_definitions> + <term_definitions code="66071002"> + <items id="text">Viral hepatitis, type B</items> + </term_definitions> + <term_definitions code="6142004"> + <items id="text">Influenza</items> + </term_definitions> + <term_definitions code="52947006"> + <items id="text">Japanese encephalitis virus disease</items> + </term_definitions> + <term_definitions code="18624000"> + <items id="text">Disease caused by Rotavirus</items> + </term_definitions> + <term_definitions code="4834000"> + <items id="text">Thyphoid fever</items> + </term_definitions> + <term_definitions code="56717001"> + <items id="text">Tuberculosis</items> + </term_definitions> + <term_definitions code="76902006"> + <items id="text">Tetanus</items> + </term_definitions> + <term_definitions code="16814004"> + <items id="text">Pneumococcal infectious disease</items> + </term_definitions> + <term_definitions code="58750007"> + <items id="text">Plague</items> + </term_definitions> + <term_definitions code="27836007"> + <items id="text">Pertussis</items> + </term_definitions> + <term_definitions code="23511006"> + <items id="text">Meningococcal infectious disease</items> + </term_definitions> + <term_definitions code="709410003"> + <items id="text">Haemophilus influenzae type b infection</items> + </term_definitions> + <term_definitions code="397430003"> + <items id="text">Diphtheria caused by Corynebacterium diphtheriae</items> + </term_definitions> + <term_definitions code="63650001"> + <items id="text">Cholera</items> + </term_definitions> + <term_definitions code="75702008"> + <items id="text">Brucellosis</items> + </term_definitions> + <term_definitions code="409498004"> + <items id="text">Anthrax</items> + </term_definitions> + </children> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>EVALUATION</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>data</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ITEM_TREE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0001</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0002</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>HL7 NoImmunizationInfoUvIps</value> + </terminology_id> + <code_list>no-immunization-info</code_list> + <code_list>no-known-immunizations</code_list> + </children> + </attributes> + </children> + </attributes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </interval> + </cardinality> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>protocol</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ITEM_TREE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0003</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0006</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </interval> + </cardinality> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Unbekannter Impfstatus</list> + </item> + </children> + </attributes> + </children> + </attributes> + <archetype_id> + <value>openEHR-EHR-EVALUATION.absence.v2</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="description">Aussage darüber, dass bestimmte Gesundheitsinformationen zum Zeitpukt der Erfassung nicht in der Krankenakte oder einem Schriftstück erfasst werden können, da keine Kenntnisse darüber vorhanden sind.</items> + <items id="text">Fehlen von Informationen</items> + </term_definitions> + <term_definitions code="at0001"> + <items id="description">@ internal @</items> + <items id="text">Baum</items> + </term_definitions> + <term_definitions code="at0002"> + <items id="comment">Zum Beispiel: "Es liegen keine Informationen über Nebenwirkungen vor"; "Es liegen keine Informationen über Probleme oder Diagnosen vor"; "Es liegen keine Informationen über vorangegangene Verfahren vor"; oder "Es liegen keine Informationen über verwendete Medikamente vor".</items> + <items id="description">Positive Aussage, dass keine Informationen verfügbar sind.</items> + <items id="text">Aussage über Abwesenheit</items> + </term_definitions> + <term_definitions code="at0003"> + <items id="description">@ internal @</items> + <items id="text">Baum</items> + </term_definitions> + <term_definitions code="at0004"> + <items id="description">Das Datum, an dem das Fehlen der Information das letzte Mal aktualisiert wurde.</items> + <items id="text">Letzte Aktualisierung</items> + </term_definitions> + <term_definitions code="at0005"> + <items id="comment">Zum Beispiel: Der Patient ist bewusstlos oder weigert sich Informationen preiszugeben. Die Codierung mit einer Terminologie wird empfohlen, wenn möglich.</items> + <items id="description">Beschreibung des Grundes, warum keine Informationen vorhanden sind.</items> + <items id="text">Grund für die Abwesenheit</items> + </term_definitions> + <term_definitions code="at0006"> + <items id="comment">Kommentar: Zum Beispiel: Lokaler Informationsbedarf oder zusätzliche Metadaten zur Anpassung an FHIR-Ressourcen oder CIMI-Modelle.</items> + <items id="description">Zusätzliche Informationen zur Erfassung lokaler Inhalte oder Anpassung an andere Referenzmodelle/Formalismen.</items> + <items id="text">Erweiterung</items> + </term_definitions> + <term_definitions code="no-immunization-info"> + <items id="text">No information about immunizations</items> + </term_definitions> + <term_definitions code="no-known-immunizations"> + <items id="text">No known immunizations</items> + </term_definitions> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </interval> + </cardinality> + </attributes> + <archetype_id> + <value>openEHR-EHR-COMPOSITION.registereintrag.v1</value> + </archetype_id> + <template_id> + <value>Impfstatus</value> + </template_id> + <term_definitions code="at0000"> + <items id="description">Generische Zusammenstellung zur Darstellung eines Datensatzes für Forschungszwecke.</items> + <items id="text">Registereintrag</items> + </term_definitions> + <term_definitions code="at0001"> + <items id="description">@ internal @</items> + <items id="text">Baum</items> + </term_definitions> + <term_definitions code="at0002"> + <items id="description">Ergänzende Angaben zum Registereintrag.</items> + <items id="text">Erweiterung</items> + </term_definitions> + <term_definitions code="at0004"> + <items id="description">Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten.</items> + <items id="text">Status</items> + </term_definitions> + <term_definitions code="at0005"> + <items id="description">Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils).</items> + <items id="text">Kategorie</items> + </term_definitions> + <term_definitions code="at0010"> + <items id="description">*</items> + <items id="text">registriert</items> + </term_definitions> + <term_definitions code="at0011"> + <items id="description">*</items> + <items id="text">vorläufig</items> + </term_definitions> + <term_definitions code="at0012"> + <items id="description">*</items> + <items id="text">final</items> + </term_definitions> + <term_definitions code="at0013"> + <items id="description">*</items> + <items id="text">geändert</items> + </term_definitions> + </definition> + <annotations path="[openEHR-EHR-COMPOSITION.registereintrag.v1]/content[openEHR-EHR-ACTION.medication.v1]/description[at0017]/items[at0020]"> + <items id="ATC">https://fhir.kbv.de/ValueSet/KBV_VS_MIO_Vaccination_Vaccine_List_ATC</items> + <items id="PZN">http://fhir.de/CodeSystem/ifa/pzn</items> + <items id="SNOMED">https://fhir.kbv.de/ValueSet/KBV_VS_MIO_Vaccination_Vaccine_List</items> + </annotations> + <view> + <constraints path="[openEHR-EHR-COMPOSITION.registereintrag.v1]/content[openEHR-EHR-ACTION.medication.v1]/description[at0017]/items[at0020]/null_flavour"> + <items id="VisibleInView"> + <value>null_flavour</value> + </items> + </constraints> + </view> +</template> \ No newline at end of file diff --git a/src/main/resources/profiles/Immunization.xml b/src/main/resources/profiles/Immunization.xml new file mode 100644 index 000000000..5a627a983 --- /dev/null +++ b/src/main/resources/profiles/Immunization.xml @@ -0,0 +1,5596 @@ +<StructureDefinition xmlns="http://hl7.org/fhir"> + <id value="gecco-immunization" /> + <url value="https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization" /> + <version value="1.0" /> + <name value="Immunization" /> + <title value="History of Vaccination" /> + <status value="active" /> + <date value="2020-10-29" /> + <publisher value="Charité" /> + <contact> + <telecom> + <system value="url" /> + <value value="https://www.bihealth.org/en/research/core-facilities/interoperability/" /> + </telecom> + </contact> + <description value="A patient's history of vaccination" /> + <fhirVersion value="4.0.1" /> + <mapping> + <identity value="workflow" /> + <uri value="http://hl7.org/fhir/workflow" /> + <name value="Workflow Pattern" /> + </mapping> + <mapping> + <identity value="v2" /> + <uri value="http://hl7.org/v2" /> + <name value="HL7 v2 Mapping" /> + </mapping> + <mapping> + <identity value="rim" /> + <uri value="http://hl7.org/v3" /> + <name value="RIM Mapping" /> + </mapping> + <mapping> + <identity value="w5" /> + <uri value="http://hl7.org/fhir/fivews" /> + <name value="FiveWs Pattern Mapping" /> + </mapping> + <mapping> + <identity value="cda" /> + <uri value="http://hl7.org/v3/cda" /> + <name value="CDA (R2)" /> + </mapping> + <kind value="resource" /> + <abstract value="false" /> + <type value="Immunization" /> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + <derivation value="constraint" /> + <snapshot> + <element id="Immunization"> + <path value="Immunization" /> + <short value="Immunization event information" /> + <definition value="Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Immunization" /> + <min value="0" /> + <max value="*" /> + </base> + <constraint> + <key value="dom-2" /> + <severity value="error" /> + <human value="If the resource is contained in another resource, it SHALL NOT contain nested Resources" /> + <expression value="contained.contained.empty()" /> + <xpath value="not(parent::f:contained and f:contained)" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="dom-4" /> + <severity value="error" /> + <human value="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated" /> + <expression value="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()" /> + <xpath value="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="dom-3" /> + <severity value="error" /> + <human value="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 value="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 value="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 value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice"> + <valueBoolean value="true" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation"> + <valueMarkdown value="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." /> + </extension> + <key value="dom-6" /> + <severity value="warning" /> + <human value="A resource should have narrative for robust management" /> + <expression value="text.`div`.exists()" /> + <xpath value="exists(f:text/h:div)" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="dom-5" /> + <severity value="error" /> + <human value="If a resource is contained in another resource, it SHALL NOT have a security label" /> + <expression value="contained.meta.security.empty()" /> + <xpath value="not(exists(f:contained/*/f:meta/f:security))" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="Entity. Role, or Act" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="VXU_V04" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="SubstanceAdministration" /> + </mapping> + </element> + <element id="Immunization.id"> + <path value="Immunization.id" /> + <short value="Logical id of this artifact" /> + <definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <isSummary value="true" /> + </element> + <element id="Immunization.meta"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.meta" /> + <short value="Metadata about the resource" /> + <definition value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.meta" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Meta" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.implicitRules"> + <path value="Immunization.implicitRules" /> + <short value="A set of rules under which this content was created" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.implicitRules" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="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 value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.language"> + <path value="Immunization.language" /> + <short value="Language of the resource content" /> + <definition value="The base language in which the resource is written." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.language" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"> + <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="Language" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> + <valueBoolean value="true" /> + </extension> + <strength value="preferred" /> + <description value="A human language." /> + <valueSet value="http://hl7.org/fhir/ValueSet/languages" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.text" /> + <short value="Text summary of the resource, for human interpretation" /> + <definition value="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 value="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 value="narrative" /> + <alias value="html" /> + <alias value="xhtml" /> + <alias value="display" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="DomainResource.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Narrative" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Act.text?" /> + </mapping> + </element> + <element id="Immunization.contained"> + <path value="Immunization.contained" /> + <short value="Contained, inline Resources" /> + <definition value="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 value="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 value="inline resources" /> + <alias value="anonymous resources" /> + <alias value="contained resources" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.contained" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Resource" /> + </type> + <mapping> + <identity value="rim" /> + <map value="Entity. Role, or Act" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.extension:dataAbsentReason"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.extension" /> + <sliceName value="dataAbsentReason" /> + <short value="occurrence[x] absence reason" /> + <definition value="Provides a reason why the expected value or elements in the element that is extended are missing." /> + <comment value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="DomainResource.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + <profile value="http://hl7.org/fhir/StructureDefinition/data-absent-reason" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="ANY.nullFlavor" /> + </mapping> + </element> + <element id="Immunization.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.modifierExtension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Extensions that cannot be ignored" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.identifier"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.identifier" /> + <short value="Business identifier" /> + <definition value="A unique identifier assigned to this immunization record." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Immunization.identifier" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Identifier" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="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]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="Identifier" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.identifier" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.identifier" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".id" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/id" /> + </mapping> + </element> + <element id="Immunization.status"> + <path value="Immunization.status" /> + <short value="completed | entered-in-error | not-done" /> + <definition value="Indicates the current status of the immunization event." /> + <comment value="Will generally be set to show that the immunization has been completed or not done. This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Immunization.status" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="This element is labeled as a modifier because it is a status element that contains statuses entered-in-error and not-done which means that the resource should not be treated as valid" /> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ImmunizationStatus" /> + </extension> + <strength value="required" /> + <description value="A set of codes indicating the current status of an Immunization." /> + <valueSet value="http://hl7.org/fhir/ValueSet/immunization-status|4.0.1" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.status" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.status" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="statusCode" /> + </mapping> + </element> + <element id="Immunization.statusReason"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.statusReason" /> + <short value="Reason not done" /> + <definition value="Indicates the reason the immunization event was not performed." /> + <comment value="This is generally only used for the status of "not-done". The reason for performing the immunization event is captured in reasonCode, not here." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.statusReason" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ImmunizationStatusReason" /> + </extension> + <strength value="example" /> + <description value="The reason why a vaccine was not administered." /> + <valueSet value="http://hl7.org/fhir/ValueSet/immunization-status-reason" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.statusReason" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".inboundRelationship[typeCode=SUBJ].source[classCode=CACT, moodCode=EVN].reasonCOde" /> + </mapping> + </element> + <element id="Immunization.vaccineCode"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode" /> + <short value="Vaccine product administered" /> + <definition value="Vaccine that was administered or was to be administered." /> + <comment value="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 value="1" /> + <max value="1" /> + <base> + <path value="Immunization.vaccineCode" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="VaccineCode" /> + </extension> + <strength value="example" /> + <description value="The code for vaccine product administered." /> + <valueSet value="http://hl7.org/fhir/ValueSet/vaccine-code" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.code" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.what[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-5" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".code" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/consumable/manfacturedProduct/manufacturedMaterial/realmCode/code" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.id"> + <path value="Immunization.vaccineCode.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:snomed"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode.coding" /> + <sliceName value="snomed" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="http://snomed.info/sct" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <strength value="extensible" /> + <description value="SNOMED Vaccine Codes" /> + <valueSet value="https://fhir.kbv.de/ValueSet/KBV_VS_MIO_Vaccination_Vaccine_List" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:snomed.id"> + <path value="Immunization.vaccineCode.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:snomed.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:snomed.system"> + <path value="Immunization.vaccineCode.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:snomed.version"> + <path value="Immunization.vaccineCode.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:snomed.code"> + <path value="Immunization.vaccineCode.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:snomed.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Immunization.vaccineCode.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:snomed.userSelected"> + <path value="Immunization.vaccineCode.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:atc"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode.coding" /> + <sliceName value="atc" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="http://fhir.de/CodeSystem/dimdi/atc" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <strength value="extensible" /> + <description value="ATC Vaccine Codes" /> + <valueSet value="https://fhir.kbv.de/ValueSet/KBV_VS_MIO_Vaccination_Vaccine_List_ATC" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:atc.id"> + <path value="Immunization.vaccineCode.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:atc.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:atc.system"> + <path value="Immunization.vaccineCode.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:atc.version"> + <path value="Immunization.vaccineCode.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:atc.code"> + <path value="Immunization.vaccineCode.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:atc.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Immunization.vaccineCode.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:atc.userSelected"> + <path value="Immunization.vaccineCode.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:pzn"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode.coding" /> + <sliceName value="pzn" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="http://fhir.de/CodeSystem/ifa/pzn" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <valueSet value="http://fhir.de/ValueSet/ifa/pzn" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:pzn.id"> + <path value="Immunization.vaccineCode.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:pzn.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:pzn.system"> + <path value="Immunization.vaccineCode.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:pzn.version"> + <path value="Immunization.vaccineCode.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:pzn.code"> + <path value="Immunization.vaccineCode.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:pzn.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Immunization.vaccineCode.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:pzn.userSelected"> + <path value="Immunization.vaccineCode.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode.coding" /> + <sliceName value="absentOrUnknownImmunization" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <valueSet value="http://hl7.org/fhir/uv/ips/ValueSet/absent-or-unknown-immunizations-uv-ips" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization.id"> + <path value="Immunization.vaccineCode.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization.system"> + <path value="Immunization.vaccineCode.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization.version"> + <path value="Immunization.vaccineCode.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization.code"> + <path value="Immunization.vaccineCode.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Immunization.vaccineCode.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization.userSelected"> + <path value="Immunization.vaccineCode.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Immunization.vaccineCode.text" /> + <short value="Plain text representation of the concept" /> + <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="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 value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element id="Immunization.patient"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.patient" /> + <short value="Who was immunized" /> + <definition value="The patient who either received or did not receive the immunization." /> + <comment value="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 value="1" /> + <max value="1" /> + <base> + <path value="Immunization.patient" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.subject" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.subject[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".partipication[ttypeCode=].role" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.subject" /> + </mapping> + </element> + <element id="Immunization.encounter"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.encounter" /> + <short value="Encounter immunization was part of" /> + <definition value="The visit or admission or other contact between patient and health care provider the immunization was performed as part of." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Immunization.encounter" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.context" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.context" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1-19" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="component->EncounterEvent" /> + </mapping> + </element> + <element id="Immunization.occurrence[x]"> + <path value="Immunization.occurrence[x]" /> + <slicing> + <discriminator> + <type value="type" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Vaccine administration date" /> + <definition value="Date vaccine administered or was to be administered." /> + <comment value="When immunizations are given a specific date and time should always be known. When immunizations are patient reported, a specific date might not be known. Although partial dates are allowed, an adult patient might not be able to recall the year a childhood immunization was given. An exact date is always preferable, but the use of the String data type is acceptable when an exact date is not known. A small number of vaccines (e.g. live oral typhoid vaccine) are given as a series of patient self-administered dose over a span of time. In cases like this, often, only the first dose (typically a provider supervised dose) is recorded with the occurrence indicating the date/time of the first dose." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Immunization.occurrence[x]" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.occurrence[x]" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.done[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".effectiveTime" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/effectiveTime/value" /> + </mapping> + </element> + <element id="Immunization.occurrence[x]:occurrenceDateTime"> + <path value="Immunization.occurrence[x]" /> + <sliceName value="occurrenceDateTime" /> + <short value="Vaccine administration date" /> + <definition value="Date vaccine administered or was to be administered." /> + <comment value="When immunizations are given a specific date and time should always be known. When immunizations are patient reported, a specific date might not be known. Although partial dates are allowed, an adult patient might not be able to recall the year a childhood immunization was given. An exact date is always preferable, but the use of the String data type is acceptable when an exact date is not known. A small number of vaccines (e.g. live oral typhoid vaccine) are given as a series of patient self-administered dose over a span of time. In cases like this, often, only the first dose (typically a provider supervised dose) is recorded with the occurrence indicating the date/time of the first dose." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.occurrence[x]" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.occurrence[x]" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.done[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".effectiveTime" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/effectiveTime/value" /> + </mapping> + </element> + <element id="Immunization.recorded"> + <path value="Immunization.recorded" /> + <short value="When the immunization was first captured in the subject's record" /> + <definition value="The date the occurrence of the immunization was first captured in the record - potentially significantly after the occurrence of the event." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.recorded" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="false" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.recorded" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation[typeCode=AUT].time" /> + </mapping> + </element> + <element id="Immunization.primarySource"> + <path value="Immunization.primarySource" /> + <short value="Indicates context the data was recorded in" /> + <definition value="An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded." /> + <comment value="Reflects the “reliability” of the content." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.primarySource" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.source" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-9" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="immunization.uncertaintycode (if primary source=false, uncertainty=U)" /> + </mapping> + </element> + <element id="Immunization.reportOrigin"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.reportOrigin" /> + <short value="Indicates the source of a secondarily reported record" /> + <definition value="The source of the data when the report of the immunization event is not based on information from the person who administered the vaccine." /> + <comment value="Should not be populated if primarySource = True, not required even if primarySource = False." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.reportOrigin" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ImmunizationReportOrigin" /> + </extension> + <strength value="example" /> + <description value="The source of the data for a record which is not from a primary source." /> + <valueSet value="http://hl7.org/fhir/ValueSet/immunization-origin" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.source" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-9" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation[typeCode=INF].role[classCode=PAT] (this syntax for self-reported) .participation[typeCode=INF].role[classCode=LIC] (this syntax for health care professional) .participation[typeCode=INF].role[classCode=PRS] (this syntax for family member)" /> + </mapping> + </element> + <element id="Immunization.location"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.location" /> + <short value="Where immunization occurred" /> + <definition value="The service delivery location where the vaccine administration occurred." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Immunization.location" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.location" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.where[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-27 (or RXA-11, deprecated as of v2.7)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation[typeCode=LOC].COCT_MT240000UV" /> + </mapping> + </element> + <element id="Immunization.manufacturer"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.manufacturer" /> + <short value="Vaccine manufacturer" /> + <definition value="Name of vaccine manufacturer." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Immunization.manufacturer" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-17" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation[typeCode=CSM].role[classCode=INST].scopedRole.scoper[classCode=ORG]" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/consumable/manfacturedProduct/manufacuturerOrganization/name" /> + </mapping> + </element> + <element id="Immunization.lotNumber"> + <path value="Immunization.lotNumber" /> + <short value="Vaccine lot number" /> + <definition value="Lot number of the vaccine product." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.lotNumber" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-15" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation[typeCode=CSM].role[classCode=INST].scopedRole.scoper[classCode=MMAT].id" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/consumable/manfacturedProduct/manufacturedMaterial/lotNumberText" /> + </mapping> + </element> + <element id="Immunization.expirationDate"> + <path value="Immunization.expirationDate" /> + <short value="Vaccine expiration date" /> + <definition value="Date vaccine batch expires." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.expirationDate" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="date" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-16" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation[typeCode=CSM].role[classCode=INST].scopedRole.scoper[classCode=MMAT].expirationTime" /> + </mapping> + </element> + <element id="Immunization.site"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.site" /> + <short value="Body site vaccine was administered" /> + <definition value="Body site where vaccine was administered." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Immunization.site" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ImmunizationSite" /> + </extension> + <strength value="example" /> + <description value="The site at which the vaccine was administered." /> + <valueSet value="http://hl7.org/fhir/ValueSet/immunization-site" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXR-2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="observation.targetSiteCode" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/approachSiteCode/code" /> + </mapping> + </element> + <element id="Immunization.route"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.route" /> + <short value="How vaccine entered body" /> + <definition value="The path by which the vaccine product is taken into the body." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Immunization.route" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ImmunizationRoute" /> + </extension> + <strength value="example" /> + <description value="The route by which the vaccine was administered." /> + <valueSet value="http://hl7.org/fhir/ValueSet/immunization-route" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXR-1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".routeCode" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/routeCode/code" /> + </mapping> + </element> + <element id="Immunization.doseQuantity"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.doseQuantity" /> + <short value="Amount of vaccine administered" /> + <definition value="The quantity of vaccine product that was administered." /> + <comment value="The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.doseQuantity" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Quantity" /> + <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <constraint> + <key value="sqty-1" /> + <severity value="error" /> + <human value="The comparator is not used on a SimpleQuantity" /> + <expression value="comparator.empty()" /> + <xpath value="not(exists(f:comparator))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <isModifier value="false" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-6 / RXA-7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".doseQuantity" /> + </mapping> + </element> + <element id="Immunization.performer"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.performer" /> + <short value="Who performed event" /> + <definition value="Indicates who performed the immunization event." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Immunization.performer" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.performer" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="ORC-12 / RXA-10" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation[typeCode=PRF].role[scoper.determinerCode=INSTANCE]" /> + </mapping> + </element> + <element id="Immunization.performer.id"> + <path value="Immunization.performer.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.performer.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.performer.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.performer.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.performer.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.performer.function"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.performer.function" /> + <short value="What type of performance was done" /> + <definition value="Describes the type of performance (e.g. ordering provider, administering provider, etc.)." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Immunization.performer.function" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ImmunizationFunction" /> + </extension> + <strength value="extensible" /> + <description value="The role a practitioner or organization plays in the immunization event." /> + <valueSet value="http://hl7.org/fhir/ValueSet/immunization-function" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.performer.function" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation.functionCode" /> + </mapping> + </element> + <element id="Immunization.performer.actor"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.performer.actor" /> + <short value="Individual or organization who was performing" /> + <definition value="The practitioner or organization who performed the action." /> + <comment value="When the individual practitioner who performed the action is known, it is best to send." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Immunization.performer.actor" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.performer.actor" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.actor" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".player" /> + </mapping> + </element> + <element id="Immunization.note"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.note" /> + <short value="Additional immunization notes" /> + <definition value="Extra information about the immunization that is not conveyed by the other attributes." /> + <comment value="For systems that do not have structured annotations, they can simply communicate a single annotation with no author or time. This element may need to be included in narrative because of the potential for modifying information. *Annotations SHOULD NOT* be used to communicate "modifying" information that could be computable. (This is a SHOULD because enforcing user behavior is nearly impossible)." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Immunization.note" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Annotation" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Act" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.note" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-5 : OBX-3 = 48767-8" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="note" /> + </mapping> + </element> + <element id="Immunization.reasonCode"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.reasonCode" /> + <short value="Why immunization occurred" /> + <definition value="Reasons why the vaccine was administered." /> + <comment value="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 value="0" /> + <max value="*" /> + <base> + <path value="Immunization.reasonCode" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ImmunizationReason" /> + </extension> + <strength value="example" /> + <description value="The reason why a vaccine was administered." /> + <valueSet value="http://hl7.org/fhir/ValueSet/immunization-reason" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.reasonCode" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="[actionNegationInd=false].reasonCode" /> + </mapping> + </element> + <element id="Immunization.reasonReference"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.reasonReference" /> + <short value="Why immunization occurred" /> + <definition value="Condition, Observation or DiagnosticReport that supports why the immunization was administered." /> + <comment value="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 value="0" /> + <max value="*" /> + <base> + <path value="Immunization.reasonReference" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Condition" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.reasonReference" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.isSubpotent"> + <path value="Immunization.isSubpotent" /> + <short value="Dose potency" /> + <definition value="Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent." /> + <comment value="Typically, the recognition of the dose being sub-potent is retrospective, after the administration (ex. notification of a manufacturer recall after administration). However, in the case of a partial administration (the patient moves unexpectedly and only some of the dose is actually administered), subpotency may be recognized immediately, but it is still important to record the event." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.isSubpotent" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <meaningWhenMissing value="By default, a dose should be considered to be potent." /> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="This element is labeled as a modifier because an immunization event with a subpotent vaccine doesn't protect the patient the same way as a potent dose." /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-20 = PA (partial administration)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.subpotentReason"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.subpotentReason" /> + <short value="Reason for being subpotent" /> + <definition value="Reason why a dose is considered to be subpotent." /> + <comment value="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 value="0" /> + <max value="*" /> + <base> + <path value="Immunization.subpotentReason" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="SubpotentReason" /> + </extension> + <strength value="example" /> + <description value="The reason why a dose is considered to be subpotent." /> + <valueSet value="http://hl7.org/fhir/ValueSet/immunization-subpotent-reason" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.education"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.education" /> + <short value="Educational material presented to patient" /> + <definition value="Educational material presented to the patient (or guardian) at the time of vaccine administration." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Immunization.education" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="imm-1" /> + <severity value="error" /> + <human value="One of documentType or reference SHALL be present" /> + <expression value="documentType.exists() or reference.exists()" /> + <xpath value="exists(f:documentType) or exists(f:reference)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.education.id"> + <path value="Immunization.education.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.education.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.education.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.education.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.education.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.education.documentType"> + <path value="Immunization.education.documentType" /> + <short value="Educational material document identifier" /> + <definition value="Identifier of the material presented to the patient." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.education.documentType" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-5 : OBX-3 = 69764-9" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.education.reference"> + <path value="Immunization.education.reference" /> + <short value="Educational material reference pointer" /> + <definition value="Reference pointer to the educational material given to the patient if the information was on line." /> + <comment value="see http://en.wikipedia.org/wiki/Uniform_resource_identifier" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.education.reference" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.education.publicationDate"> + <path value="Immunization.education.publicationDate" /> + <short value="Educational material publication date" /> + <definition value="Date the educational material was published." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.education.publicationDate" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-5 : OBX-3 = 29768-9" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.education.presentationDate"> + <path value="Immunization.education.presentationDate" /> + <short value="Educational material presentation date" /> + <definition value="Date the educational material was given to the patient." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.education.presentationDate" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-5 : OBX-3 = 29769-7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.programEligibility"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.programEligibility" /> + <short value="Patient eligibility for a vaccination program" /> + <definition value="Indicates a patient's eligibility for a funding program." /> + <comment value="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 value="0" /> + <max value="*" /> + <base> + <path value="Immunization.programEligibility" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ProgramEligibility" /> + </extension> + <strength value="example" /> + <description value="The patient's eligibility for a vaccation program." /> + <valueSet value="http://hl7.org/fhir/ValueSet/immunization-program-eligibility" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-5 : OBX-3 = 64994-7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.fundingSource"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.fundingSource" /> + <short value="Funding source for the vaccine" /> + <definition value="Indicates the source of the vaccine actually administered. This may be different than the patient eligibility (e.g. the patient may be eligible for a publically purchased vaccine but due to inventory issues, vaccine purchased with private funds was actually administered)." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Immunization.fundingSource" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="FundingSource" /> + </extension> + <strength value="example" /> + <description value="The source of funding used to purchase the vaccine administered." /> + <valueSet value="http://hl7.org/fhir/ValueSet/immunization-funding-source" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.reaction"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.reaction" /> + <short value="Details of a reaction that follows immunization" /> + <definition value="Categorical data indicating that an adverse event is associated in time to an immunization." /> + <comment value="A reaction may be an indication of an allergy or intolerance and, if this is determined to be the case, it should be recorded as a new AllergyIntolerance resource instance as most systems will not query against past Immunization.reaction elements." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Immunization.reaction" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Observation[classCode=obs].code" /> + </mapping> + </element> + <element id="Immunization.reaction.id"> + <path value="Immunization.reaction.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.reaction.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.reaction.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.reaction.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.reaction.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.reaction.date"> + <path value="Immunization.reaction.date" /> + <short value="When reaction started" /> + <definition value="Date of reaction to the immunization." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.reaction.date" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-14 (ideally this would be reported in an IAM segment, but IAM is not part of the HL7 v2 VXU message - most likely would appear in OBX segments if at all)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".effectiveTime" /> + </mapping> + </element> + <element id="Immunization.reaction.detail"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.reaction.detail" /> + <short value="Additional information on reaction" /> + <definition value="Details of the reaction." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Immunization.reaction.detail" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-5" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".value" /> + </mapping> + </element> + <element id="Immunization.reaction.reported"> + <path value="Immunization.reaction.reported" /> + <short value="Indicates self-reported reaction" /> + <definition value="Self-reported indicator." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.reaction.reported" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="(HL7 v2 doesn't seem to provide for this)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation[typeCode=INF].role[classCode=PAT] (this syntax for self-reported=true)" /> + </mapping> + </element> + <element id="Immunization.protocolApplied"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.protocolApplied" /> + <short value="Protocol followed by the provider" /> + <definition value="The protocol (set of recommendations) being followed by the provider who administered the dose." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Immunization.protocolApplied" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.id"> + <path value="Immunization.protocolApplied.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.protocolApplied.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.protocolApplied.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.series"> + <path value="Immunization.protocolApplied.series" /> + <short value="Name of vaccine series" /> + <definition value="One possible path to achieve presumed immunity against a disease - within the context of an authority." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.protocolApplied.series" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.authority"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.protocolApplied.authority" /> + <short value="Who is responsible for publishing the recommendations" /> + <definition value="Indicates the authority who published the protocol (e.g. ACIP) that is being followed." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Immunization.protocolApplied.authority" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.protocolApplied.targetDisease" /> + <short value="Vaccine preventatable disease being targetted" /> + <definition value="The vaccine preventable disease the dose is being administered against." /> + <comment value="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 value="1" /> + <max value="*" /> + <base> + <path value="Immunization.protocolApplied.targetDisease" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <binding> + <strength value="extensible" /> + <description value="The vaccine preventable disease the dose is being administered for." /> + <valueSet value="https://fhir.kbv.de/ValueSet/KBV_VS_MIO_Vaccination_TargetDisease" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.id"> + <path value="Immunization.protocolApplied.targetDisease.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.protocolApplied.targetDisease.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.protocolApplied.targetDisease.coding" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding.id"> + <path value="Immunization.protocolApplied.targetDisease.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.protocolApplied.targetDisease.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding.system"> + <path value="Immunization.protocolApplied.targetDisease.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding.version"> + <path value="Immunization.protocolApplied.targetDisease.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding.code"> + <path value="Immunization.protocolApplied.targetDisease.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Immunization.protocolApplied.targetDisease.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding.userSelected"> + <path value="Immunization.protocolApplied.targetDisease.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Immunization.protocolApplied.targetDisease.text" /> + <short value="Plain text representation of the concept" /> + <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="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 value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.doseNumber[x]"> + <path value="Immunization.protocolApplied.doseNumber[x]" /> + <short value="Dose number within series" /> + <definition value="Nominal position in a series." /> + <comment value="The use of an integer is preferred if known. A string should only be used in cases where an integer is not available (such as when documenting a recurring booster dose)." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Immunization.protocolApplied.doseNumber[x]" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="positiveInt" /> + </type> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.seriesDoses[x]"> + <path value="Immunization.protocolApplied.seriesDoses[x]" /> + <short value="Recommended number of doses for immunity" /> + <definition value="The recommended number of doses to achieve immunity." /> + <comment value="The use of an integer is preferred if known. A string should only be used in cases where an integer is not available (such as when documenting a recurring booster dose)." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.protocolApplied.seriesDoses[x]" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="positiveInt" /> + </type> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + </snapshot> + <differential> + <element id="Immunization.extension"> + <path value="Immunization.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <rules value="open" /> + </slicing> + </element> + <element id="Immunization.extension:dataAbsentReason"> + <path value="Immunization.extension" /> + <sliceName value="dataAbsentReason" /> + <short value="occurrence[x] absence reason" /> + <type> + <code value="Extension" /> + <profile value="http://hl7.org/fhir/StructureDefinition/data-absent-reason" /> + </type> + </element> + <element id="Immunization.vaccineCode"> + <path value="Immunization.vaccineCode" /> + <mustSupport value="true" /> + </element> + <element id="Immunization.vaccineCode.coding"> + <path value="Immunization.vaccineCode.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + </element> + <element id="Immunization.vaccineCode.coding:snomed"> + <path value="Immunization.vaccineCode.coding" /> + <sliceName value="snomed" /> + <max value="1" /> + <patternCoding> + <system value="http://snomed.info/sct" /> + </patternCoding> + <mustSupport value="true" /> + <binding> + <strength value="extensible" /> + <description value="SNOMED Vaccine Codes" /> + <valueSet value="https://fhir.kbv.de/ValueSet/KBV_VS_MIO_Vaccination_Vaccine_List" /> + </binding> + </element> + <element id="Immunization.vaccineCode.coding:snomed.system"> + <path value="Immunization.vaccineCode.coding.system" /> + <min value="1" /> + </element> + <element id="Immunization.vaccineCode.coding:snomed.code"> + <path value="Immunization.vaccineCode.coding.code" /> + <min value="1" /> + </element> + <element id="Immunization.vaccineCode.coding:atc"> + <path value="Immunization.vaccineCode.coding" /> + <sliceName value="atc" /> + <max value="1" /> + <patternCoding> + <system value="http://fhir.de/CodeSystem/dimdi/atc" /> + </patternCoding> + <mustSupport value="true" /> + <binding> + <strength value="extensible" /> + <description value="ATC Vaccine Codes" /> + <valueSet value="https://fhir.kbv.de/ValueSet/KBV_VS_MIO_Vaccination_Vaccine_List_ATC" /> + </binding> + </element> + <element id="Immunization.vaccineCode.coding:atc.system"> + <path value="Immunization.vaccineCode.coding.system" /> + <min value="1" /> + </element> + <element id="Immunization.vaccineCode.coding:atc.code"> + <path value="Immunization.vaccineCode.coding.code" /> + <min value="1" /> + </element> + <element id="Immunization.vaccineCode.coding:pzn"> + <path value="Immunization.vaccineCode.coding" /> + <sliceName value="pzn" /> + <max value="1" /> + <patternCoding> + <system value="http://fhir.de/CodeSystem/ifa/pzn" /> + </patternCoding> + <mustSupport value="true" /> + <binding> + <strength value="required" /> + <valueSet value="http://fhir.de/ValueSet/ifa/pzn" /> + </binding> + </element> + <element id="Immunization.vaccineCode.coding:pzn.system"> + <path value="Immunization.vaccineCode.coding.system" /> + <min value="1" /> + </element> + <element id="Immunization.vaccineCode.coding:pzn.code"> + <path value="Immunization.vaccineCode.coding.code" /> + <min value="1" /> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization"> + <path value="Immunization.vaccineCode.coding" /> + <sliceName value="absentOrUnknownImmunization" /> + <max value="1" /> + <patternCoding> + <system value="http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips" /> + </patternCoding> + <mustSupport value="true" /> + <binding> + <strength value="required" /> + <valueSet value="http://hl7.org/fhir/uv/ips/ValueSet/absent-or-unknown-immunizations-uv-ips" /> + </binding> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization.system"> + <path value="Immunization.vaccineCode.coding.system" /> + <min value="1" /> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization.code"> + <path value="Immunization.vaccineCode.coding.code" /> + <min value="1" /> + </element> + <element id="Immunization.patient"> + <path value="Immunization.patient" /> + <mustSupport value="true" /> + </element> + <element id="Immunization.occurrence[x]"> + <path value="Immunization.occurrence[x]" /> + <slicing> + <discriminator> + <type value="type" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <mustSupport value="true" /> + </element> + <element id="Immunization.occurrence[x]:occurrenceDateTime"> + <path value="Immunization.occurrence[x]" /> + <sliceName value="occurrenceDateTime" /> + <type> + <code value="dateTime" /> + </type> + <mustSupport value="true" /> + </element> + <element id="Immunization.protocolApplied"> + <path value="Immunization.protocolApplied" /> + <mustSupport value="true" /> + </element> + <element id="Immunization.protocolApplied.targetDisease"> + <path value="Immunization.protocolApplied.targetDisease" /> + <min value="1" /> + <mustSupport value="true" /> + <binding> + <strength value="extensible" /> + <valueSet value="https://fhir.kbv.de/ValueSet/KBV_VS_MIO_Vaccination_TargetDisease" /> + </binding> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding"> + <path value="Immunization.protocolApplied.targetDisease.coding" /> + <min value="1" /> + <max value="1" /> + <mustSupport value="true" /> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding.system"> + <path value="Immunization.protocolApplied.targetDisease.coding.system" /> + <min value="1" /> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding.code"> + <path value="Immunization.protocolApplied.targetDisease.coding.code" /> + <min value="1" /> + </element> + </differential> +</StructureDefinition> \ No newline at end of file From e9e50cb67e4cb1c1f5b89a0fcc1e84189b861f6b Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Thu, 29 Apr 2021 17:09:59 +0200 Subject: [PATCH 010/141] added routes --- .../CreateImmunizationComponent.java | 19 ++++ .../FindImmunizationComponent.java | 33 +++++++ .../camel/route/ImmunizationRoutes.java | 37 ++++++++ .../config/ConversionConfiguration.java | 4 + ...ekannterImpfstatusEvaluationConverter.java | 9 +- .../fhirbridge/fhir/common/Profile.java | 3 + .../common/audit/FhirBridgeEventType.java | 6 +- .../CreateImmunizationAuditStrategy.java | 37 ++++++++ .../CreateImmunizationProvider.java | 43 +++++++++ .../CreateImmunizationTransaction.java | 42 +++++++++ .../FindImmunizationAuditStrategy.java | 45 +++++++++ .../FindImmunizationProvider.java | 94 +++++++++++++++++++ .../FindImmunizationTransaction.java | 42 +++++++++ .../camel/component/immunization-create | 1 + .../apache/camel/component/immunization-find | 1 + 15 files changed, 414 insertions(+), 2 deletions(-) create mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/CreateImmunizationComponent.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/FindImmunizationComponent.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/route/ImmunizationRoutes.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationAuditStrategy.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationProvider.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationTransaction.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationAuditStrategy.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationProvider.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationTransaction.java create mode 100644 src/main/resources/META-INF/services/org/apache/camel/component/immunization-create create mode 100644 src/main/resources/META-INF/services/org/apache/camel/component/immunization-find diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/CreateImmunizationComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/CreateImmunizationComponent.java new file mode 100644 index 000000000..78c908915 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/CreateImmunizationComponent.java @@ -0,0 +1,19 @@ +package org.ehrbase.fhirbridge.camel.component.fhir.immunization; + +import org.ehrbase.fhirbridge.fhir.immunization.CreateImmunizationTransaction; +import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; +import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; + +@SuppressWarnings({"java:S110"}) +/** + * Camel {@link org.apache.camel.Component Component} that handles 'Create Diagnostic Report' transaction. + * + * @since 1.0.0 + */ + +public class CreateImmunizationComponent extends CustomFhirComponent<GenericFhirAuditDataset> { + public CreateImmunizationComponent() { + super(new CreateImmunizationTransaction()); + } +} + diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/FindImmunizationComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/FindImmunizationComponent.java new file mode 100644 index 000000000..6114b268f --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/FindImmunizationComponent.java @@ -0,0 +1,33 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.camel.component.fhir.immunization; + +import org.ehrbase.fhirbridge.fhir.diagnosticreport.FindDiagnosticReportTransaction; +import org.openehealth.ipf.commons.ihe.fhir.audit.FhirQueryAuditDataset; +import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; + +/** + * Camel {@link org.apache.camel.Component Component} that handles 'Find Diagnostic Report' transaction. + * + * @since 1.0.0 + */ +@SuppressWarnings({"java:S110"}) +public class FindImmunizationComponent extends CustomFhirComponent<FhirQueryAuditDataset> { + public FindImmunizationComponent() { + super(new FindDiagnosticReportTransaction()); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ImmunizationRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ImmunizationRoutes.java new file mode 100644 index 000000000..a6784e2d9 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ImmunizationRoutes.java @@ -0,0 +1,37 @@ +package org.ehrbase.fhirbridge.camel.route; + +import org.ehrbase.fhirbridge.camel.FhirBridgeConstants; + +public class ImmunizationRoutes extends AbstractRouteBuilder { + + @Override + public void configure() throws Exception { + // @formatter:off + super.configure(); + + // 'Create Diagnostic Report' route definition + from("immunization-create:consumer?fhirContext=#fhirContext") + .onCompletion() + .process("auditCreateResourceProcessor") + .end() + .process("resourceProfileValidator") + .to("direct:process-immunization"); + + // 'Find Diagnostic Report' route definition + from("immunization-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") + .choice() + .when(isSearchOperation()) + .to("bean:immunizationDao?method=search(${body}, ${headers.FhirRequestDetails})") + .process("bundleProviderResponseProcessor") + .otherwise() + .to("bean:immunizationDao?method=read(${body}, ${headers.FhirRequestDetails})"); + + // Internal routes definition + from("direct:process-immunization") + .setHeader(FhirBridgeConstants.METHOD_OUTCOME, method("immunizationDao", "create(${body}, ${headers.FhirRequestDetails})")) + .process("ehrIdLookupProcessor") + .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") + .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") + .process("resourceResponseProcessor"); + } +} \ No newline at end of file diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java index 331da288d..23558b640 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java @@ -73,6 +73,10 @@ private void registerConditionConverters(ConversionService conversionService) { conversionService.registerConverter(Profile.DIAGNOSE_DEPENDENCE_ON_VENTILATOR, diagnoseCommonConverter); } + private void registerImmunizationConverters(ConversionService conversionService) { + conversionService.registerConverter(Profile.DO_NOT_RESUSCITATE_ORDER, null); // TODO: @ErikTute, add your converter + } + private void registerConsentConverters(ConversionService conversionService) { conversionService.registerConverter(Profile.DO_NOT_RESUSCITATE_ORDER, null); // TODO: @ErikTute, add your converter } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/UnbekannterImpfstatusEvaluationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/UnbekannterImpfstatusEvaluationConverter.java index e5a7ff28e..8876cf232 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/UnbekannterImpfstatusEvaluationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/UnbekannterImpfstatusEvaluationConverter.java @@ -1,5 +1,6 @@ package org.ehrbase.fhirbridge.ehr.converter.specific.impfstatus; +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.ehrbase.fhirbridge.ehr.converter.generic.EntryEntityConverter; import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.AussageUeberAbwesenheitDefiningCode; import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.UnbekannterImpfstatusEvaluation; @@ -15,6 +16,12 @@ protected UnbekannterImpfstatusEvaluation convertInternal(Immunization resource) } private AussageUeberAbwesenheitDefiningCode mapAussageUeberAbwesenheitCode(Immunization resource) { - + if(resource.getVaccineCode().getCoding().get(0).getCode().equals(AussageUeberAbwesenheitDefiningCode.NO_KNOWN_IMMUNIZATIONS.getCode())){ + return AussageUeberAbwesenheitDefiningCode.NO_KNOWN_IMMUNIZATIONS; + }else if(resource.getVaccineCode().getCoding().get(0).getCode().equals(AussageUeberAbwesenheitDefiningCode.NO_INFORMATION_ABOUT_IMMUNIZATIONS.getCode())){ + return AussageUeberAbwesenheitDefiningCode.NO_INFORMATION_ABOUT_IMMUNIZATIONS; + }else{ + throw new UnprocessableEntityException("The code "+resource.getVaccineCode().getCoding().get(0).getCode()+" is not supported by the fhir bridge "); + } } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java index 7809790e4..43d812729 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java @@ -116,6 +116,9 @@ public enum Profile { DEFAULT_QUESTIONNAIRE_RESPONSE(QuestionnaireResponse.class, null); + //Immunization + + private final Class<? extends Resource> resourceType; private final String uri; diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java b/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java index 9ef976adb..8ed6f5e09 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java @@ -34,7 +34,11 @@ public enum FhirBridgeEventType implements EventType, EnumeratedCodedValue<Event CreateQuestionnaireResponse("questionnaire-response-create", "Create Questionnaire Response"), - FindQuestionnaireResponse("questionnaire-response-find", "Find Questionnaire Response"); + FindQuestionnaireResponse("questionnaire-response-find", "Find Questionnaire Response"), + + CreateImmunization("immunization-create", "Create Immunization"), + + FindImmunization("immunization-find", "Find Immunization"); private final EventType value; diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationAuditStrategy.java new file mode 100644 index 000000000..498620091 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationAuditStrategy.java @@ -0,0 +1,37 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.immunization; + +import org.hl7.fhir.r4.model.DiagnosticReport; +import org.hl7.fhir.r4.model.Immunization; +import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditStrategy; +import org.openehealth.ipf.commons.ihe.fhir.support.OperationOutcomeOperations; + +import java.util.Optional; + +/** + * Implementation of {@link org.openehealth.ipf.commons.ihe.core.atna.AuditStrategy AuditStrategy} + * for 'Create Diagnostic Report' transaction. + * + * @since 1.0.0 + */ +public class CreateImmunizationAuditStrategy extends GenericFhirAuditStrategy<Immunization> { + + public CreateImmunizationAuditStrategy() { + super(true, OperationOutcomeOperations.INSTANCE, immunization -> Optional.of(immunization.getPatient())); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationProvider.java new file mode 100644 index 000000000..bd95f9a6f --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationProvider.java @@ -0,0 +1,43 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.immunization; + +import ca.uhn.fhir.rest.annotation.Create; +import ca.uhn.fhir.rest.annotation.ResourceParam; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import org.hl7.fhir.r4.model.Immunization; +import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Implementation of {@link org.openehealth.ipf.commons.ihe.fhir.FhirProvider FhirProvider} that provides REST support + * for 'Create Diagnostic Report' transaction. + * + * @since 1.0.0 + */ +public class CreateImmunizationProvider extends AbstractPlainProvider { + + @Create + @SuppressWarnings("unused") + public MethodOutcome createImmunization(@ResourceParam Immunization immunization, RequestDetails requestDetails, + HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) { + return requestAction(immunization, null, httpServletRequest, httpServletResponse, requestDetails); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationTransaction.java new file mode 100644 index 000000000..3ca19ac45 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationTransaction.java @@ -0,0 +1,42 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.immunization; + +import ca.uhn.fhir.context.FhirVersionEnum; +import org.openehealth.ipf.commons.ihe.fhir.FhirTransactionConfiguration; +import org.openehealth.ipf.commons.ihe.fhir.FhirTransactionValidator; +import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; + +/** + * Configuration for 'Create Observation' transaction. + * + * @since 1.0.0 + */ +public class CreateImmunizationTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { + + public CreateImmunizationTransaction() { + super("immunization-report-create", + "Create Immunization", + false, + null, + new CreateImmunizationAuditStrategy(), + FhirVersionEnum.R4, + new CreateImmunizationProvider(), + null, + FhirTransactionValidator.NO_VALIDATION); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationAuditStrategy.java new file mode 100644 index 000000000..46698b257 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationAuditStrategy.java @@ -0,0 +1,45 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.immunization; + +import org.ehrbase.fhirbridge.fhir.common.audit.FhirBridgeEventType; +import org.openehealth.ipf.commons.audit.AuditContext; +import org.openehealth.ipf.commons.audit.model.AuditMessage; +import org.openehealth.ipf.commons.ihe.core.atna.event.QueryInformationBuilder; +import org.openehealth.ipf.commons.ihe.fhir.audit.FhirQueryAuditDataset; +import org.openehealth.ipf.commons.ihe.fhir.audit.FhirQueryAuditStrategy; +import org.openehealth.ipf.commons.ihe.fhir.support.OperationOutcomeOperations; + +/** + * Implementation of {@link org.openehealth.ipf.commons.ihe.core.atna.AuditStrategy AuditStrategy} + * for 'Find Diagnostic Report' transaction. + * + * @since 1.0.0 + */ +public class FindImmunizationAuditStrategy extends FhirQueryAuditStrategy { + + public FindImmunizationAuditStrategy() { + super(true, OperationOutcomeOperations.INSTANCE); + } + + @Override + public AuditMessage[] makeAuditMessage(AuditContext auditContext, FhirQueryAuditDataset auditDataset) { + return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FindImmunization) + .addPatients(auditDataset.getPatientIds()) + .getMessages(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationProvider.java new file mode 100644 index 000000000..06d5561e2 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationProvider.java @@ -0,0 +1,94 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.immunization; + +import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.rest.annotation.*; +import ca.uhn.fhir.rest.api.Constants; +import ca.uhn.fhir.rest.api.SortSpec; +import ca.uhn.fhir.rest.api.server.IBundleProvider; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import ca.uhn.fhir.rest.param.*; +import org.hl7.fhir.instance.model.api.IAnyResource; +import org.hl7.fhir.r4.model.Immunization; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.ResourceType; +import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Implementation of {@link org.openehealth.ipf.commons.ihe.fhir.FhirProvider FhirProvider} that provides REST support + * for 'Find Diagnostic Report' transaction. + * + * @since 1.0.0 + */ +@SuppressWarnings({"unused", "java:S107", "DuplicatedCode"}) +public class FindImmunizationProvider extends AbstractPlainProvider { + + @Search(type = Immunization.class) + public IBundleProvider searchImmunization(@OptionalParam(name = IAnyResource.SP_RES_ID) TokenAndListParam id, //TODO renaud + @OptionalParam(name = IAnyResource.SP_RES_LANGUAGE) StringAndListParam language, + @OptionalParam(name = Constants.PARAM_LASTUPDATED) DateRangeParam lastUpdated, + @OptionalParam(name = Constants.PARAM_PROFILE) UriAndListParam profile, + @OptionalParam(name = Constants.PARAM_SOURCE) UriAndListParam source, + @OptionalParam(name = Constants.PARAM_SECURITY) TokenAndListParam security, + @OptionalParam(name = Constants.PARAM_TAG) TokenAndListParam tag, + @OptionalParam(name = Constants.PARAM_CONTENT) StringAndListParam content, + @OptionalParam(name = Constants.PARAM_TEXT) StringAndListParam text, + @OptionalParam(name = Constants.PARAM_FILTER) StringAndListParam filter, + @OptionalParam(name = Immunization.SP_DATE) DateRangeParam date, + @OptionalParam(name = Immunization.SP_IDENTIFIER) TokenAndListParam identifier, + @OptionalParam(name = Immunization.SP_PATIENT) ReferenceAndListParam patient, + @OptionalParam(name = Immunization.SP_PERFORMER) ReferenceAndListParam performer, + @OptionalParam(name = Immunization.SP_STATUS) TokenAndListParam status, + @Count Integer count, @Offset Integer offset, @Sort SortSpec sort, + RequestDetails requestDetails, HttpServletRequest request, HttpServletResponse response) { + + SearchParameterMap searchParams = new SearchParameterMap(); + searchParams.add(IAnyResource.SP_RES_ID, id); + searchParams.add(IAnyResource.SP_RES_LANGUAGE, language); + + searchParams.add(Constants.PARAM_PROFILE, profile); + searchParams.add(Constants.PARAM_SOURCE, source); + searchParams.add(Constants.PARAM_SECURITY, security); + searchParams.add(Constants.PARAM_TAG, tag); + searchParams.add(Constants.PARAM_CONTENT, content); + searchParams.add(Constants.PARAM_TEXT, text); + searchParams.add(Constants.PARAM_FILTER, filter); + + searchParams.add(Immunization.SP_DATE, date); + searchParams.add(Immunization.SP_IDENTIFIER, identifier); + searchParams.add(Immunization.SP_PERFORMER, performer); + searchParams.add(Immunization.SP_PATIENT, patient); + searchParams.add(Immunization.SP_STATUS, status); + + searchParams.setLastUpdated(lastUpdated); + searchParams.setCount(count); + searchParams.setOffset(offset); + searchParams.setSort(sort); + + return requestBundleProvider(searchParams, null, ResourceType.Immunization.name(), request, response, requestDetails); + } + + @Read(version = true) + public Immunization readImmunization(@IdParam IdType id, RequestDetails requestDetails, + HttpServletRequest request, HttpServletResponse response) { + return requestResource(id, null, Immunization.class, request, response, requestDetails); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationTransaction.java new file mode 100644 index 000000000..aba659e7b --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationTransaction.java @@ -0,0 +1,42 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.immunization; + +import ca.uhn.fhir.context.FhirVersionEnum; +import org.openehealth.ipf.commons.ihe.fhir.FhirTransactionConfiguration; +import org.openehealth.ipf.commons.ihe.fhir.FhirTransactionValidator; +import org.openehealth.ipf.commons.ihe.fhir.audit.FhirQueryAuditDataset; + +/** + * Configuration for 'Find Diagnostic Report' transaction. + * + * @since 1.0.0 + */ +public class FindImmunizationTransaction extends FhirTransactionConfiguration<FhirQueryAuditDataset> { + + public FindImmunizationTransaction() { + super("diagnostic-report-find", + "Find Diagnostic Report", + true, + null, + new FindImmunizationAuditStrategy(), + FhirVersionEnum.R4, + new FindImmunizationProvider(), + null, + FhirTransactionValidator.NO_VALIDATION); + } +} diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/immunization-create b/src/main/resources/META-INF/services/org/apache/camel/component/immunization-create new file mode 100644 index 000000000..79360c9ea --- /dev/null +++ b/src/main/resources/META-INF/services/org/apache/camel/component/immunization-create @@ -0,0 +1 @@ +class=org.ehrbase.fhirbridge.camel.component.fhir.immunization.CreateImmunizationComponent \ No newline at end of file diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/immunization-find b/src/main/resources/META-INF/services/org/apache/camel/component/immunization-find new file mode 100644 index 000000000..3461d29bc --- /dev/null +++ b/src/main/resources/META-INF/services/org/apache/camel/component/immunization-find @@ -0,0 +1 @@ +class=org.ehrbase.fhirbridge.camel.component.fhir.immunization.FindImmunizationComponent \ No newline at end of file From 2873ff96bb66dd42b0e3095d55b7be9212a72ecd Mon Sep 17 00:00:00 2001 From: MDSchulze <mareike.schulze@plri.de> Date: Thu, 29 Apr 2021 18:05:47 +0200 Subject: [PATCH 011/141] BugFix PatientDischargeCompositionConverter --- .../patientdischarge/PatientDischargeCompositionConverter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeCompositionConverter.java index 8e8f96369..cb6989dc6 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeCompositionConverter.java @@ -18,7 +18,7 @@ public GECCOEntlassungsdatenComposition convertInternal(@NonNull Observation res mapStatus(composition, resource); - composition.setEntlassungsart(new PatientDischargeAdminEntryConverter().convertInternal(resource)); + composition.setEntlassungsart(new PatientDischargeAdminEntryConverter().convert(resource)); return composition; } From a2024ef991b66e501d2ccc314a3f651234471e8a Mon Sep 17 00:00:00 2001 From: MDSchulze <mareike.schulze@plri.de> Date: Thu, 29 Apr 2021 18:22:37 +0200 Subject: [PATCH 012/141] import fixes --- .../patientdischarge/PatientDischargeCompositionConverter.java | 2 -- .../definition/ArtDerEntlassungDefiningCode.java | 1 - .../definition/EntlassungsartAdminEntry.java | 1 - .../ehrbase/fhirbridge/fhir/observation/PatientDischargeIT.java | 2 -- 4 files changed, 6 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeCompositionConverter.java index cb6989dc6..c750a30bd 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeCompositionConverter.java @@ -7,8 +7,6 @@ import org.hl7.fhir.r4.model.Observation; import org.springframework.lang.NonNull; -import static org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem.SNOMED; - public class PatientDischargeCompositionConverter extends ObservationToCompositionConverter<GECCOEntlassungsdatenComposition> { @Override diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/ArtDerEntlassungDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/ArtDerEntlassungDefiningCode.java index 3c4198f7c..f74df76e7 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/ArtDerEntlassungDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/ArtDerEntlassungDefiningCode.java @@ -5,7 +5,6 @@ import com.nedap.archie.rm.datatypes.CodePhrase; import com.nedap.archie.rm.datavalues.DvCodedText; import com.nedap.archie.rm.support.identification.TerminologyId; -//import org.ehrbase.validation.terminology.validator.DvCodedText; public enum ArtDerEntlassungDefiningCode implements EnumValueSet { UNKNOWN_QUALIFIER_VALUE("Unknown (qualifier value)", "", "SNOMED Clinical Terms", "261665006"), diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/EntlassungsartAdminEntry.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/EntlassungsartAdminEntry.java index 2826b4cd8..c26ccfcbe 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/EntlassungsartAdminEntry.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/EntlassungsartAdminEntry.java @@ -12,7 +12,6 @@ import org.ehrbase.client.classgenerator.interfaces.EntryEntity; import org.ehrbase.client.classgenerator.shareddefinition.Language; import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; -//import org.ehrbase.validation.terminology.validator.DvCodedText; @Entity @Archetype("openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0") diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/PatientDischargeIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/PatientDischargeIT.java index 0394e1e44..ece1affd7 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/PatientDischargeIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/PatientDischargeIT.java @@ -2,8 +2,6 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.ehrbase.fhirbridge.comparators.CustomTemporalAcessorComparator; -import org.ehrbase.fhirbridge.ehr.converter.ConversionException; -import org.ehrbase.fhirbridge.ehr.converter.specific.historyoftravel.HistoryOfTravelConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.patientdischarge.PatientDischargeCompositionConverter; import org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.GECCOEntlassungsdatenComposition; import org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.definition.EntlassungsartAdminEntry; From 68afa39d83e52fbb41dce041924e9164594f5363 Mon Sep 17 00:00:00 2001 From: MDSchulze <mareike.schulze@plri.de> Date: Thu, 29 Apr 2021 18:38:55 +0200 Subject: [PATCH 013/141] SNOMED-CT instead of SNOMED Clinical Terms --- .../definition/ArtDerEntlassungDefiningCode.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/ArtDerEntlassungDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/ArtDerEntlassungDefiningCode.java index f74df76e7..9863edd9b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/ArtDerEntlassungDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/ArtDerEntlassungDefiningCode.java @@ -7,12 +7,12 @@ import com.nedap.archie.rm.support.identification.TerminologyId; public enum ArtDerEntlassungDefiningCode implements EnumValueSet { - UNKNOWN_QUALIFIER_VALUE("Unknown (qualifier value)", "", "SNOMED Clinical Terms", "261665006"), - HOSPITAL_ADMISSION_PROCEDURE("Hospital admission (procedure)","","SNOMED Clinical Terms","32485007"), - DEAD_FINDING("Dead (finding)","", "SNOMED Clinical Terms", "419099009"), - PATIENT_DISCHARGED_ALIVE_FINDING("Patient discharged alive (finding)", "", "SNOMED Clinical Terms", "371827001"), - PATIENT_REFERRAL_PROCEDURE("Patient referral (procedure)", "", "SNOMED Clinical Terms", "3457005"), - REFERRAL_TO_PALLIATIVE_CARE_SERVICE_PROCEDURE("Referral to palliative care service (procedure)", "", "SNOMED Clinical Terms", "306237005"); + UNKNOWN_QUALIFIER_VALUE("Unknown (qualifier value)", "", "SNOMED-CT", "261665006"), + HOSPITAL_ADMISSION_PROCEDURE("Hospital admission (procedure)","","SNOMED-CT","32485007"), + DEAD_FINDING("Dead (finding)","", "SNOMED-CT", "419099009"), + PATIENT_DISCHARGED_ALIVE_FINDING("Patient discharged alive (finding)", "", "SNOMED-CT", "371827001"), + PATIENT_REFERRAL_PROCEDURE("Patient referral (procedure)", "", "SNOMED-CT", "3457005"), + REFERRAL_TO_PALLIATIVE_CARE_SERVICE_PROCEDURE("Referral to palliative care service (procedure)", "", "SNOMED-CT", "306237005"); private String value; From 67ff813c1b06bca2667538e8f0b1f5188505ab8a Mon Sep 17 00:00:00 2001 From: MDSchulze <mareike.schulze@plri.de> Date: Thu, 29 Apr 2021 19:18:55 +0200 Subject: [PATCH 014/141] paragon fixes --- src/main/resources/application.yml | 3 ++- .../PatientDischarge/paragon-patient-discharge-alive.json | 2 +- .../PatientDischarge/paragon-patient-discharge-dead.json | 2 +- .../PatientDischarge/paragon-patient-discharge-hospital.json | 2 +- .../PatientDischarge/paragon-patient-discharge-palliative.json | 2 +- .../PatientDischarge/paragon-patient-discharge-referral.json | 2 +- .../PatientDischarge/paragon-patient-discharge-unknown.json | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 26d0fbc67..735898982 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -13,7 +13,8 @@ fhir-bridge: # Debug Properties debug: enabled: true - mapping-output-directory: ${java.io.tmpdir}/mappings + #mapping-output-directory: ${java.io.tmpdir}/mappings/ + mapping-output-directory: /src/main/resources/mappings/ # EHRbase Properties ehrbase: base-url: http://localhost:8080/ehrbase/rest/openehr/v1/ diff --git a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-alive.json b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-alive.json index 99ebb330a..baf888c3c 100644 --- a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-alive.json +++ b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-alive.json @@ -136,7 +136,7 @@ "_type" : "CODE_PHRASE", "terminology_id" : { "_type" : "TERMINOLOGY_ID", - "value" : "SNOMED Clinical Terms" + "value" : "SNOMED-CT" }, "code_string" : "371827001" } diff --git a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-dead.json b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-dead.json index c2665a71b..bdf475858 100644 --- a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-dead.json +++ b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-dead.json @@ -136,7 +136,7 @@ "_type" : "CODE_PHRASE", "terminology_id" : { "_type" : "TERMINOLOGY_ID", - "value" : "SNOMED Clinical Terms" + "value" : "SNOMED-CT" }, "code_string" : "419099009" } diff --git a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-hospital.json b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-hospital.json index e9a01afb4..f172c27b2 100644 --- a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-hospital.json +++ b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-hospital.json @@ -136,7 +136,7 @@ "_type" : "CODE_PHRASE", "terminology_id" : { "_type" : "TERMINOLOGY_ID", - "value" : "SNOMED Clinical Terms" + "value" : "SNOMED-CT" }, "code_string" : "32485007" } diff --git a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-palliative.json b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-palliative.json index c5d6b07bb..ad4cdef1b 100644 --- a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-palliative.json +++ b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-palliative.json @@ -136,7 +136,7 @@ "_type" : "CODE_PHRASE", "terminology_id" : { "_type" : "TERMINOLOGY_ID", - "value" : "SNOMED Clinical Terms" + "value" : "SNOMED-CT" }, "code_string" : "306237005" } diff --git a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-referral.json b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-referral.json index ebc44a4dd..a9a2d4a75 100644 --- a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-referral.json +++ b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-referral.json @@ -136,7 +136,7 @@ "_type" : "CODE_PHRASE", "terminology_id" : { "_type" : "TERMINOLOGY_ID", - "value" : "SNOMED Clinical Terms" + "value" : "SNOMED-CT" }, "code_string" : "3457005" } diff --git a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-unknown.json b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-unknown.json index 5df115936..807250355 100644 --- a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-unknown.json +++ b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-unknown.json @@ -136,7 +136,7 @@ "_type" : "CODE_PHRASE", "terminology_id" : { "_type" : "TERMINOLOGY_ID", - "value" : "SNOMED Clinical Terms" + "value" : "SNOMED-CT" }, "code_string" : "261665006" } From e16d8816e55a35fc3e0c4b8190c3f52e577c29d1 Mon Sep 17 00:00:00 2001 From: MDSchulze <mareike.schulze@plri.de> Date: Thu, 29 Apr 2021 19:49:24 +0200 Subject: [PATCH 015/141] all paragon files updated --- .../PatientDischargeCompositionConverter.java | 1 + src/main/resources/application.yml | 2 +- .../paragon-patient-discharge-alive.json | 162 ++++++++++++++++++ .../paragon-patient-discharge-dead.json | 162 ++++++++++++++++++ .../paragon-patient-discharge-hospital.json | 162 ++++++++++++++++++ .../paragon-patient-discharge-palliative.json | 162 ++++++++++++++++++ .../paragon-patient-discharge-referral.json | 162 ++++++++++++++++++ .../paragon-patient-discharge-unknown.json | 162 ++++++++++++++++++ .../paragon-patient-discharge-alive.json | 13 +- .../paragon-patient-discharge-dead.json | 11 ++ .../paragon-patient-discharge-hospital.json | 13 +- .../paragon-patient-discharge-palliative.json | 13 +- .../paragon-patient-discharge-referral.json | 13 +- .../paragon-patient-discharge-unknown.json | 13 +- 14 files changed, 1045 insertions(+), 6 deletions(-) create mode 100644 src/main/resources/mappings/paragon-patient-discharge-alive.json create mode 100644 src/main/resources/mappings/paragon-patient-discharge-dead.json create mode 100644 src/main/resources/mappings/paragon-patient-discharge-hospital.json create mode 100644 src/main/resources/mappings/paragon-patient-discharge-palliative.json create mode 100644 src/main/resources/mappings/paragon-patient-discharge-referral.json create mode 100644 src/main/resources/mappings/paragon-patient-discharge-unknown.json diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeCompositionConverter.java index c750a30bd..c9a6b3c8a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeCompositionConverter.java @@ -1,5 +1,6 @@ package org.ehrbase.fhirbridge.ehr.converter.specific.patientdischarge; +import org.ehrbase.client.classgenerator.shareddefinition.Language; import org.ehrbase.fhirbridge.ehr.converter.ConversionException; import org.ehrbase.fhirbridge.ehr.converter.generic.ObservationToCompositionConverter; import org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.GECCOEntlassungsdatenComposition; diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 735898982..ee25ded85 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -14,7 +14,7 @@ fhir-bridge: debug: enabled: true #mapping-output-directory: ${java.io.tmpdir}/mappings/ - mapping-output-directory: /src/main/resources/mappings/ + mapping-output-directory: D:/2_Entwicklung/fhir-bridge_114_temp/fhir-bridge/src/main/resources/mappings # EHRbase Properties ehrbase: base-url: http://localhost:8080/ehrbase/rest/openehr/v1/ diff --git a/src/main/resources/mappings/paragon-patient-discharge-alive.json b/src/main/resources/mappings/paragon-patient-discharge-alive.json new file mode 100644 index 000000000..0c6214761 --- /dev/null +++ b/src/main/resources/mappings/paragon-patient-discharge-alive.json @@ -0,0 +1,162 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsdaten" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Entlassungsdaten" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/1/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "ADMIN_ENTRY", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsart" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Art der Entlassung" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Patient discharged alive (finding)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED-CT" + }, + "code_string" : "371827001" + } + }, + "archetype_node_id" : "at0040" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/main/resources/mappings/paragon-patient-discharge-dead.json b/src/main/resources/mappings/paragon-patient-discharge-dead.json new file mode 100644 index 000000000..bd1e55a3d --- /dev/null +++ b/src/main/resources/mappings/paragon-patient-discharge-dead.json @@ -0,0 +1,162 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsdaten" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Entlassungsdaten" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/7/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "ADMIN_ENTRY", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsart" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Art der Entlassung" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Dead (finding)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED-CT" + }, + "code_string" : "419099009" + } + }, + "archetype_node_id" : "at0040" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/main/resources/mappings/paragon-patient-discharge-hospital.json b/src/main/resources/mappings/paragon-patient-discharge-hospital.json new file mode 100644 index 000000000..37a0cd5c0 --- /dev/null +++ b/src/main/resources/mappings/paragon-patient-discharge-hospital.json @@ -0,0 +1,162 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsdaten" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Entlassungsdaten" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/1/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "ADMIN_ENTRY", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsart" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Art der Entlassung" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Hospital admission (procedure)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED-CT" + }, + "code_string" : "32485007" + } + }, + "archetype_node_id" : "at0040" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/main/resources/mappings/paragon-patient-discharge-palliative.json b/src/main/resources/mappings/paragon-patient-discharge-palliative.json new file mode 100644 index 000000000..593b1ae2a --- /dev/null +++ b/src/main/resources/mappings/paragon-patient-discharge-palliative.json @@ -0,0 +1,162 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsdaten" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Entlassungsdaten" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/1/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "ADMIN_ENTRY", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsart" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Art der Entlassung" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Referral to palliative care service (procedure)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED-CT" + }, + "code_string" : "306237005" + } + }, + "archetype_node_id" : "at0040" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/main/resources/mappings/paragon-patient-discharge-referral.json b/src/main/resources/mappings/paragon-patient-discharge-referral.json new file mode 100644 index 000000000..d3e79b82d --- /dev/null +++ b/src/main/resources/mappings/paragon-patient-discharge-referral.json @@ -0,0 +1,162 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsdaten" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Entlassungsdaten" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/7/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "ADMIN_ENTRY", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsart" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Art der Entlassung" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Patient referral (procedure)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED-CT" + }, + "code_string" : "3457005" + } + }, + "archetype_node_id" : "at0040" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/main/resources/mappings/paragon-patient-discharge-unknown.json b/src/main/resources/mappings/paragon-patient-discharge-unknown.json new file mode 100644 index 000000000..b9c676f46 --- /dev/null +++ b/src/main/resources/mappings/paragon-patient-discharge-unknown.json @@ -0,0 +1,162 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsdaten" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Entlassungsdaten" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/9/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "ADMIN_ENTRY", + "name" : { + "_type" : "DV_TEXT", + "value" : "Entlassungsart" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Art der Entlassung" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Unknown (qualifier value)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED-CT" + }, + "code_string" : "261665006" + } + }, + "archetype_node_id" : "at0040" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-alive.json b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-alive.json index baf888c3c..0c6214761 100644 --- a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-alive.json +++ b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-alive.json @@ -17,7 +17,7 @@ "_type" : "FEEDER_AUDIT", "originating_system_item_ids" : [ { "_type" : "DV_IDENTIFIER", - "id" : "Observation/3/_history/1", + "id" : "Observation/1/_history/1", "type" : "fhir_logical_id" } ], "originating_system_audit" : { @@ -109,6 +109,14 @@ "_type" : "DV_TEXT", "value" : "Entlassungsart" }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, "encoding" : { "_type" : "CODE_PHRASE", "terminology_id" : { @@ -117,6 +125,9 @@ }, "code_string" : "UTF-8" }, + "subject" : { + "_type" : "PARTY_SELF" + }, "data" : { "_type" : "ITEM_TREE", "name" : { diff --git a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-dead.json b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-dead.json index bdf475858..bd1e55a3d 100644 --- a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-dead.json +++ b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-dead.json @@ -109,6 +109,14 @@ "_type" : "DV_TEXT", "value" : "Entlassungsart" }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, "encoding" : { "_type" : "CODE_PHRASE", "terminology_id" : { @@ -117,6 +125,9 @@ }, "code_string" : "UTF-8" }, + "subject" : { + "_type" : "PARTY_SELF" + }, "data" : { "_type" : "ITEM_TREE", "name" : { diff --git a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-hospital.json b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-hospital.json index f172c27b2..37a0cd5c0 100644 --- a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-hospital.json +++ b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-hospital.json @@ -17,7 +17,7 @@ "_type" : "FEEDER_AUDIT", "originating_system_item_ids" : [ { "_type" : "DV_IDENTIFIER", - "id" : "Observation/9/_history/1", + "id" : "Observation/1/_history/1", "type" : "fhir_logical_id" } ], "originating_system_audit" : { @@ -109,6 +109,14 @@ "_type" : "DV_TEXT", "value" : "Entlassungsart" }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, "encoding" : { "_type" : "CODE_PHRASE", "terminology_id" : { @@ -117,6 +125,9 @@ }, "code_string" : "UTF-8" }, + "subject" : { + "_type" : "PARTY_SELF" + }, "data" : { "_type" : "ITEM_TREE", "name" : { diff --git a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-palliative.json b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-palliative.json index ad4cdef1b..593b1ae2a 100644 --- a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-palliative.json +++ b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-palliative.json @@ -17,7 +17,7 @@ "_type" : "FEEDER_AUDIT", "originating_system_item_ids" : [ { "_type" : "DV_IDENTIFIER", - "id" : "Observation/11/_history/1", + "id" : "Observation/1/_history/1", "type" : "fhir_logical_id" } ], "originating_system_audit" : { @@ -109,6 +109,14 @@ "_type" : "DV_TEXT", "value" : "Entlassungsart" }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, "encoding" : { "_type" : "CODE_PHRASE", "terminology_id" : { @@ -117,6 +125,9 @@ }, "code_string" : "UTF-8" }, + "subject" : { + "_type" : "PARTY_SELF" + }, "data" : { "_type" : "ITEM_TREE", "name" : { diff --git a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-referral.json b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-referral.json index a9a2d4a75..d3e79b82d 100644 --- a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-referral.json +++ b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-referral.json @@ -17,7 +17,7 @@ "_type" : "FEEDER_AUDIT", "originating_system_item_ids" : [ { "_type" : "DV_IDENTIFIER", - "id" : "Observation/13/_history/1", + "id" : "Observation/7/_history/1", "type" : "fhir_logical_id" } ], "originating_system_audit" : { @@ -109,6 +109,14 @@ "_type" : "DV_TEXT", "value" : "Entlassungsart" }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, "encoding" : { "_type" : "CODE_PHRASE", "terminology_id" : { @@ -117,6 +125,9 @@ }, "code_string" : "UTF-8" }, + "subject" : { + "_type" : "PARTY_SELF" + }, "data" : { "_type" : "ITEM_TREE", "name" : { diff --git a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-unknown.json b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-unknown.json index 807250355..b9c676f46 100644 --- a/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-unknown.json +++ b/src/test/resources/Observation/PatientDischarge/paragon-patient-discharge-unknown.json @@ -17,7 +17,7 @@ "_type" : "FEEDER_AUDIT", "originating_system_item_ids" : [ { "_type" : "DV_IDENTIFIER", - "id" : "Observation/15/_history/1", + "id" : "Observation/9/_history/1", "type" : "fhir_logical_id" } ], "originating_system_audit" : { @@ -109,6 +109,14 @@ "_type" : "DV_TEXT", "value" : "Entlassungsart" }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, "encoding" : { "_type" : "CODE_PHRASE", "terminology_id" : { @@ -117,6 +125,9 @@ }, "code_string" : "UTF-8" }, + "subject" : { + "_type" : "PARTY_SELF" + }, "data" : { "_type" : "ITEM_TREE", "name" : { From efadadc5f0c3b036b788cf98b0a40f8ffe36c07f Mon Sep 17 00:00:00 2001 From: MDSchulze <mareike.schulze@plri.de> Date: Thu, 29 Apr 2021 20:47:49 +0200 Subject: [PATCH 016/141] codesmell fixes --- .../PatientDischargeAdminEntryConverter.java | 1 - .../PatientDischargeCompositionConverter.java | 1 - src/main/resources/application.yml | 5 ++--- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeAdminEntryConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeAdminEntryConverter.java index 12e222f95..149e478a9 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeAdminEntryConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeAdminEntryConverter.java @@ -18,7 +18,6 @@ protected EntlassungsartAdminEntry convertInternal(Observation resource) { String code = getSnomedCodeObservation(resource); - //switch (resource.getValueCodeableConcept().getCoding().get(0).getCode()) { switch(code) { case "261665006": adminEntry.setArtDerEntlassung(ArtDerEntlassungDefiningCode.UNKNOWN_QUALIFIER_VALUE.toDvCodedText()); diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeCompositionConverter.java index c9a6b3c8a..c750a30bd 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeCompositionConverter.java @@ -1,6 +1,5 @@ package org.ehrbase.fhirbridge.ehr.converter.specific.patientdischarge; -import org.ehrbase.client.classgenerator.shareddefinition.Language; import org.ehrbase.fhirbridge.ehr.converter.ConversionException; import org.ehrbase.fhirbridge.ehr.converter.generic.ObservationToCompositionConverter; import org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.GECCOEntlassungsdatenComposition; diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index ee25ded85..6cb8f6ad0 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -12,9 +12,8 @@ fhir-bridge: allowed-origins: '*' # Debug Properties debug: - enabled: true - #mapping-output-directory: ${java.io.tmpdir}/mappings/ - mapping-output-directory: D:/2_Entwicklung/fhir-bridge_114_temp/fhir-bridge/src/main/resources/mappings + enabled: false + mapping-output-directory: ${java.io.tmpdir}/mappings/ # EHRbase Properties ehrbase: base-url: http://localhost:8080/ehrbase/rest/openehr/v1/ From 1477c33ab7e5bdec65fd8e2eb92303b433f3fa2f Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 30 Apr 2021 11:45:35 +0200 Subject: [PATCH 017/141] Fix robot tests FI02 --- tests/robot/OBSERVATION/05_create_fi02.robot | 30 ++++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/robot/OBSERVATION/05_create_fi02.robot b/tests/robot/OBSERVATION/05_create_fi02.robot index e6c31f9c9..9a9cabfbc 100644 --- a/tests/robot/OBSERVATION/05_create_fi02.robot +++ b/tests/robot/OBSERVATION/05_create_fi02.robot @@ -55,15 +55,15 @@ ${profile url} https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefi $.subject.identifier.value ${{ {} }} 422 This property must be an simple value, not an object Observation.subject.identifier.value $.subject.identifier.value ${123} 422 Error parsing JSON: the primitive value must be a string Observation.subject.identifier.value $.subject.identifier missing 422 Object must have some content Observation.subject - $.subject.identifier ${EMPTY} 422 This property must be an Object, not a primitive property Observation.subject.identifier - $.subject.identifier ${{ [] }} 422 This property must be an Object, not an array Observation.subject.identifier + $.subject.identifier ${EMPTY} 422 The property identifier must be an Object, not a primitive property Observation.subject.identifier + $.subject.identifier ${{ [] }} 422 The property identifier must be an Object, not an array Observation.subject.identifier $.subject.identifier ${{ {} }} 422 Object must have some content Observation.subject.identifier - $.subject.identifier ${123} 422 This property must be an Object, not a primitive property Observation.subject.identifier + $.subject.identifier ${123} 422 The property identifier must be an Object, not a primitive property Observation.subject.identifier $.subject missing 422 Observation.subject: minimum required = 1, but only found 0 .from ${profile url} - $.subject ${EMPTY} 422 This property must be an Object, not a primitive property Observation.subject - $.subject ${{ [] }} 422 This property must be an Object, not an array Observation.subject + $.subject ${EMPTY} 422 The property subject must be an Object, not a primitive property Observation.subject + $.subject ${{ [] }} 422 The property subject must be an Object, not an array Observation.subject $.subject ${{ {} }} 422 Object must have some content Observation.subject - $.subject ${123} 422 This property must be an Object, not a primitive property Observation.subject + $.subject ${123} 422 The property subject must be an Object, not a primitive property Observation.subject # comment: random uuid regex for uuid $.subject.identifier.value ${{str(uuid.uuid4())}} 422 EhrId not found for subject '([0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})' @@ -127,12 +127,12 @@ ${profile url} https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefi $.identifier ${{ [{}] }} 422 Observation.identifier:analyseBefundCode: minimum required = 1, but only found 0 .from ${profile url} $.identifier ${None} 422 This property must be an Array, not a Null $.identifier[0].type missing 422 Observation.identifier:analyseBefundCode: minimum required = 1, but only found 0 .from ${profile url} - $.identifier[0].type ${EMPTY} 422 This property must be an Object, not a primitive property - $.identifier[0].type ${123} 422 This property must be an Object, not a primitive property + $.identifier[0].type ${EMPTY} 422 The property type must be an Object, not a primitive property + $.identifier[0].type ${123} 422 The property type must be an Object, not a primitive property $.identifier[0].type foobar 422 This property must be an Object, not a primitive property - $.identifier[0].type ${{ [] }} 422 This property must be an Object, not an array + $.identifier[0].type ${{ [] }} 422 The property type must be an Object, not an array $.identifier[0].type ${{ {} }} 422 Object must have some content - $.identifier[0].type ${None} 422 This property must be an Object, not null + $.identifier[0].type ${None} 422 The property type must be an Object, not null $.identifier[0].type.coding missing 422 Object must have some content $.identifier[0].type.coding[0].system missing 422 A code with no system has no defined meaning. A system should be provided @@ -166,16 +166,16 @@ ${profile url} https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefi $.meta missing 422 Default profile is not supported for Observation. One of the following profiles is expected: .https://.* $.meta.profile missing 422 Object must have some content $.meta.profile ${{ ["invalid_url"] }} 422 Canonical URLs must be absolute URLs if they are not fragment references .invalid_url. - $.meta.profile ${{ ["http://wrong.url"] }} 422 Profile reference 'http://wrong.url' could not be resolved, so has not been checked - $.meta.profile ${EMPTY} 422 This property must be an Array, not a a primitive property - $.meta.profile ${123} 422 This property must be an Array, not a a primitive property - $.meta.profile ${None} 422 This property must be an Array, not a null + $.meta.profile ${{ ["http://wrong.url"] }} 422 The resource does not contain any supported profile + $.meta.profile ${EMPTY} 422 This property must be an Array, not a primitive property + $.meta.profile ${123} 422 This property must be an Array, not a primitive property + $.meta.profile ${None} 422 This property must be an Array, not null # comment: the next one sets the value to an empty list/array [] $.meta.profile ${{ [] }} 422 Default profile is not supported for Observation. One of the following profiles is expected: .https://.* # comment: the next one sets value to an empty object {} - $.meta.profile ${{ {} }} 422 This property must be an Array, not a an object + $.meta.profile ${{ {} }} 422 This property must be an Array, not an object 005 Create FiO2 (Invalid/Missing 'meta') - BUG TRACE TEST From 2eeb46e78b7f86a01ef0f3184f9e194999f56a10 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 30 Apr 2021 12:01:23 +0200 Subject: [PATCH 018/141] Fix robot tests Create Blood Pressure --- .../OBSERVATION/03_create_blood_pressure.robot | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/robot/OBSERVATION/03_create_blood_pressure.robot b/tests/robot/OBSERVATION/03_create_blood_pressure.robot index aea10efcf..83291d857 100644 --- a/tests/robot/OBSERVATION/03_create_blood_pressure.robot +++ b/tests/robot/OBSERVATION/03_create_blood_pressure.robot @@ -54,12 +54,12 @@ ${profile url} https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefi $.subject.identifier.value ${{ {} }} 0 422 This property must be an simple value, not an object Observation.subject.identifier.value $.subject.identifier.value ${123} 0 422 Error parsing JSON: the primitive value must be a string Observation.subject.identifier.value $.subject.identifier missing 0 422 Object must have some content Observation.subject - $.subject.identifier ${EMPTY} 0 422 This property must be an Object, not a primitive property Observation.subject.identifier - $.subject.identifier ${{ [] }} 0 422 This property must be an Object, not an array Observation.subject.identifier + $.subject.identifier ${EMPTY} 0 422 The property identifier must be an Object, not a primitive property (at Observation.subject.identifier) Observation.subject.identifier + $.subject.identifier ${{ [] }} 0 422 The property identifier must be an Object, not an array (at Observation.subject.identifier) Observation.subject.identifier $.subject.identifier ${{ {} }} 0 422 Object must have some content Observation.subject.identifier $.subject.identifier ${123} 0 422 This property must be an Object, not a primitive property Observation.subject.identifier $.subject missing 0 422 Observation.subject: minimum required = 1, but only found 0 .from ${profile url} - $.subject ${EMPTY} 0 422 This property must be an Object, not a primitive property Observation.subject + $.subject ${EMPTY} 0 422 The property subject must be an Object, not a primitive property (at Observation.subject) Observation.subject $.subject ${{ [] }} 0 422 This property must be an Object, not an array Observation.subject $.subject ${{ {} }} 0 422 Object must have some content Observation.subject $.subject ${123} 0 422 This property must be an Object, not a primitive property Observation.subject @@ -205,10 +205,10 @@ ${profile url} https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefi $.component[0].code.coding[0].code foobar 1 422 Observation.component.SystolicBP: minimum required = 1, but only found 0 .from ${profile url} - $.component[0].valueQuantity missing 0 422 vs-3: If there is no a value a data absent reason must be present .value.exists.. or dataAbsentReason.exists... + $.component[0].valueQuantity missing 0 422 vs-3: 'If there is no a value a data absent reason must be present' failed ... Observation.component[0] - $.component[0].valueQuantity ${EMPTY} 0 422 This property must be an Object, not a primitive property + $.component[0].valueQuantity ${EMPTY} 0 422 The property valueQuantity must be an Object, not a primitive property (at Observation.component[0].value[x]) ... Observation.component[0].value[x] $.component[0].valueQuantity ${{ {} }} 0 422 Object must have some content @@ -303,10 +303,10 @@ ${profile url} https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefi $.component[1].code.coding[0].code foobar 1 422 Observation.component.DiastolicBP: minimum required = 1, but only found 0 .from ${profile url} - $.component[1].valueQuantity missing 1 422 vs-3: If there is no a value a data absent reason must be present .value.exists.. or dataAbsentReason.exists... + $.component[1].valueQuantity missing 1 422 vs-3: 'If there is no a value a data absent reason must be present' failed ... Observation.component[1] - $.component[1].valueQuantity ${EMPTY} 0 422 This property must be an Object, not a primitive property + $.component[1].valueQuantity ${EMPTY} 0 422 The property valueQuantity must be an Object, not a primitive property (at Observation.component[1].value[x]) ... Observation.component[1].value[x] $.component[1].valueQuantity ${{{}}} 0 422 Object must have some content From 82260a24baa6e206a954e82b3318a502fe898dc2 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 30 Apr 2021 12:07:23 +0200 Subject: [PATCH 019/141] Fix robot tests Create Body Weight --- .../OBSERVATION/07_create_body_weight.robot | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/robot/OBSERVATION/07_create_body_weight.robot b/tests/robot/OBSERVATION/07_create_body_weight.robot index d05373c66..f4a5bdf54 100644 --- a/tests/robot/OBSERVATION/07_create_body_weight.robot +++ b/tests/robot/OBSERVATION/07_create_body_weight.robot @@ -54,15 +54,15 @@ ${body_weight_url} https://www.netzwerk-universitaetsmedizin.de/fhir/Structure $.subject.identifier.value ${{ {} }} 422 This property must be an simple value, not an object Observation.subject.identifier.value $.subject.identifier.value ${123} 422 Error parsing JSON: the primitive value must be a string Observation.subject.identifier.value $.subject.identifier missing 422 Object must have some content Observation.subject - $.subject.identifier ${EMPTY} 422 This property must be an Object, not a primitive property Observation.subject.identifier - $.subject.identifier ${{ [] }} 422 This property must be an Object, not an array Observation.subject.identifier + $.subject.identifier ${EMPTY} 422 The property identifier must be an Object, not a primitive property Observation.subject.identifier + $.subject.identifier ${{ [] }} 422 The property identifier must be an Object, not an array Observation.subject.identifier $.subject.identifier ${{ {} }} 422 Object must have some content Observation.subject.identifier - $.subject.identifier ${123} 422 This property must be an Object, not a primitive property Observation.subject.identifier + $.subject.identifier ${123} 422 The property identifier must be an Object, not a primitive property Observation.subject.identifier $.subject missing 422 Observation.subject: minimum required = 1, but only found 0 .from ${body_weight_url} - $.subject ${EMPTY} 422 This property must be an Object, not a primitive property Observation.subject - $.subject ${{ [] }} 422 This property must be an Object, not an array Observation.subject + $.subject ${EMPTY} 422 The property subject must be an Object, not a primitive property Observation.subject + $.subject ${{ [] }} 422 The property subject must be an Object, not an array Observation.subject $.subject ${{ {} }} 422 Object must have some content Observation.subject - $.subject ${123} 422 This property must be an Object, not a primitive property Observation.subject + $.subject ${123} 422 The property subject must be an Object, not a primitive property Observation.subject 002 Create Body Weight (Invalid/Missing 'resourceType') @@ -127,12 +127,12 @@ ${body_weight_url} https://www.netzwerk-universitaetsmedizin.de/fhir/Structure $.identifier ${{ [{}] }} 422 Object must have some content $.identifier ${None} 422 This property must be an Array, not a Null #$.identifier[0].type missing 422 Observation.identifier:analyseBefundCode: minimum required = 1, but only found 0 .from ${body_weight_url} - $.identifier[0].type ${EMPTY} 422 This property must be an Object, not a primitive property - $.identifier[0].type ${123} 422 This property must be an Object, not a primitive property - $.identifier[0].type foobar 422 This property must be an Object, not a primitive property - $.identifier[0].type ${{ [] }} 422 This property must be an Object, not an array + $.identifier[0].type ${EMPTY} 422 The property type must be an Object, not a primitive property + $.identifier[0].type ${123} 422 The property type must be an Object, not a primitive property + $.identifier[0].type foobar 422 The property type must be an Object, not a primitive property + $.identifier[0].type ${{ [] }} 422 The property type must be an Object, not an array $.identifier[0].type ${{ {} }} 422 Object must have some content - $.identifier[0].type ${None} 422 This property must be an Object, not null + $.identifier[0].type ${None} 422 The property type must be an Object, not null $.identifier[0].type.coding missing 422 Object must have some content #$.identifier[0].type.coding[0].system missing 422 A code with no system has no defined meaning. A system should be provided @@ -166,16 +166,16 @@ ${body_weight_url} https://www.netzwerk-universitaetsmedizin.de/fhir/Structure $.meta missing 422 Default profile is not supported for Observation. One of the following profiles is expected: .https://.* $.meta.profile missing 422 Object must have some content $.meta.profile ${{ ["invalid_url"] }} 422 Canonical URLs must be absolute URLs if they are not fragment references .invalid_url. - $.meta.profile ${{ ["http://wrong.url"] }} 422 Profile reference 'http://wrong.url' could not be resolved, so has not been checked - $.meta.profile ${EMPTY} 422 This property must be an Array, not a a primitive property - $.meta.profile ${123} 422 This property must be an Array, not a a primitive property - $.meta.profile ${None} 422 This property must be an Array, not a null + $.meta.profile ${{ ["http://wrong.url"] }} 422 The resource does not contain any supported profile. + $.meta.profile ${EMPTY} 422 This property must be an Array, not a primitive property + $.meta.profile ${123} 422 This property must be an Array, not a primitive property + $.meta.profile ${None} 422 This property must be an Array, not null # comment: the next one sets the value to an empty list/array [] $.meta.profile ${{ [] }} 422 Default profile is not supported for Observation. One of the following profiles is expected: .https://.* # comment: the next one sets value to an empty object {} - $.meta.profile ${{ {} }} 422 This property must be an Array, not a an object + $.meta.profile ${{ {} }} 422 This property must be an Array, not an object 006 Create Body Weight (Invalid/Missing 'code') From 1e3377321ce8dbe52622a80f5e5c250010f3f458 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 30 Apr 2021 12:17:13 +0200 Subject: [PATCH 020/141] Fix robot tests Create Smoking Status --- .../08_create_smoking_status.robot | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/robot/OBSERVATION/08_create_smoking_status.robot b/tests/robot/OBSERVATION/08_create_smoking_status.robot index 992222fa6..337742ba5 100644 --- a/tests/robot/OBSERVATION/08_create_smoking_status.robot +++ b/tests/robot/OBSERVATION/08_create_smoking_status.robot @@ -67,17 +67,17 @@ ${randinteger} ${12345} # invalid cases for identifier $.subject.identifier missing 422 Object must have some content Observation.subject - $.subject.identifier ${EMPTY} 422 This property must be an Object, not a primitive property Observation.subject.identifier - $.subject.identifier ${{ [] }} 422 This property must be an Object, not an array Observation.subject.identifier + $.subject.identifier ${EMPTY} 422 The property identifier must be an Object, not a primitive property Observation.subject.identifier + $.subject.identifier ${{ [] }} 422 The property identifier must be an Object, not an array Observation.subject.identifier $.subject.identifier ${{ {} }} 422 Object must have some content Observation.subject.identifier - $.subject.identifier ${123} 422 This property must be an Object, not a primitive property Observation.subject.identifier + $.subject.identifier ${123} 422 The property identifier must be an Object, not a primitive property Observation.subject.identifier # invalid cases for subject $.subject missing 422 Observation.subject: minimum required = 1, but only found 0 .from ${smoking_status-url} - $.subject ${EMPTY} 422 This property must be an Object, not a primitive property Observation.subject - $.subject ${{ [] }} 422 This property must be an Object, not an array Observation.subject + $.subject ${EMPTY} 422 The property subject must be an Object, not a primitive property Observation.subject + $.subject ${{ [] }} 422 The property subject must be an Object, not an array Observation.subject $.subject ${{ {} }} 422 Object must have some content Observation.subject - $.subject ${123} 422 This property must be an Object, not a primitive property Observation.subject + $.subject ${123} 422 The property subject must be an Object, not a primitive property Observation.subject # comment: random uuid regex for uuid $.subject.identifier.value ${{str(uuid.uuid4())}} 422 EhrId not found for subject @@ -137,14 +137,14 @@ ${randinteger} ${12345} $.meta.profile[0] ${randinteger} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randinteger}. Observation.meta.profile.0. $.meta.profile[0] ${randstring} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randstring}. Observation.meta.profile.0. $.meta.profile ${{ ["invalid_url"] }} 422 Canonical URLs must be absolute URLs if they are not fragment references .invalid_url. Observation.meta.profile.0. - $.meta.profile ${{ ["http://wrong.url"] }} 422 Profile reference 'http://wrong.url' could not be resolved, so has not been checked Observation.meta.profile.0. - $.meta.profile ${EMPTY} 422 This property must be an Array, not a a primitive property Observation.meta.profile + $.meta.profile ${{ ["http://wrong.url"] }} 422 The resource does not contain any supported profile Observation.meta.profile.0. + $.meta.profile ${EMPTY} 422 This property must be an Array, not a primitive property Observation.meta.profile # comment: the next one sets the value to an empty list/array [] $.meta.profile ${{ [] }} 422 Default profile is not supported for Observation. One of the following profiles is expected: .https://.* # comment: the next one sets value to an empty object {} - $.meta.profile ${{ {} }} 422 This property must be an Array, not a an object + $.meta.profile ${{ {} }} 422 This property must be an Array, not an object 005 Create Smoking Status (Invalid/Missing 'Status') @@ -219,7 +219,7 @@ ${randinteger} ${12345} $.code missing 422 Observation.code: minimum required = 1, but only found 0 .from ${smoking_status-url} Observation $.code ${{ [] }} 422 Observation.code: minimum required = 1, but only found 0 .from ${smoking_status-url} Observation $.code ${{ {} }} 422 Object must have some content Observation.code - $.code ${{ [{}] }} 422 This property must be an Object, not an array Observation.code + $.code ${{ [{}] }} 422 The property code must be an Object, not an array Observation.code # invalid coding $.code.coding missing 422 Object must have some content Observation.code @@ -304,12 +304,12 @@ ${randinteger} ${12345} # missing valueCodeableConcept $.valueCodeableConcept missing 422 Index 0 out of bounds for length 0 - $.valueCodeableConcept ${EMPTY} 422 This property must be an Object, not a primitive property Observation.value.x. + $.valueCodeableConcept ${EMPTY} 422 The property valueCodeableConcept must be an Object, not a primitive property Observation.value.x. # wrong format - $.valueCodeableConcept ${{ [] }} 422 This property must be an Object, not an array Observation.value.x. + $.valueCodeableConcept ${{ [] }} 422 The property valueCodeableConcept must be an Object, not an array Observation.value.x. $.valueCodeableConcept ${{ {} }} 422 Object must have some content Observation.value.x. - $.valueCodeableConcept ${{ [{}] }} 422 This property must be an Object, not an array Observation.value.x. + $.valueCodeableConcept ${{ [{}] }} 422 The property valueCodeableConcept must be an Object, not an array Observation.value.x. # missing coding $.valueCodeableConcept.coding missing 422 Index 0 out of bounds for length 0 @@ -347,7 +347,7 @@ ${randinteger} ${12345} ehr.create new ehr 000_ehr_status.json create with DataAbsentReason DataAbsentReason create-smoking-status.json - observation.validate response - 422 (with error message) 422 obs-6: dataAbsentReason SHALL only be present if Observation.value.x. is not present .dataAbsentReason.empty.. or value.empty... Observation + observation.validate response - 422 (with error message) 422 obs-6: 'dataAbsentReason SHALL only be present if Observation.value[x] is not present Observation @@ -368,12 +368,12 @@ ${randinteger} ${12345} # missing valueCodeableConcept $.dataAbsentReason missing 422 Index 0 out of bounds for length 0 - $.dataAbsentReason ${EMPTY} 422 This property must be an Object, not a primitive property Observation.dataAbsentReason + $.dataAbsentReason ${EMPTY} 422 The property dataAbsentReason must be an Object, not a primitive property Observation.dataAbsentReason # wrong format - $.dataAbsentReason ${{ [] }} 422 This property must be an Object, not an array Observation.dataAbsentReason + $.dataAbsentReason ${{ [] }} 422 The property dataAbsentReason must be an Object, not an array Observation.dataAbsentReason $.dataAbsentReason ${{ {} }} 422 Object must have some content Observation.dataAbsentReason - $.dataAbsentReason ${{ [{}] }} 422 This property must be an Object, not an array + $.dataAbsentReason ${{ [{}] }} 422 The property dataAbsentReason must be an Object, not an array # missing coding $.dataAbsentReason.coding missing 422 Index 0 out of bounds for length 0 @@ -415,7 +415,7 @@ ${randinteger} ${12345} # all attributes invalid for valueCodeableConcept Observation smoking-status true ${smoking_status-url} final true true http://terminology.hl7.org/CodeSystem/observation-category social-history true true http://loinc.org 72166-2 Tobacco smoking status true valid 2020-02-25 true true ${EMPTY} ${EMPTY} ${EMPTY} 422 @value cannot be empty Observation.value.ofType.CodeableConcept..coding.0..display Observation smoking-status true ${smoking_status-url} final true true http://terminology.hl7.org/CodeSystem/observation-category social-history true true http://loinc.org 72166-2 Tobacco smoking status true valid 2020-02-25 true true ${1234} test ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.value.x..coding.0..display - Observation smoking-status true ${smoking_status-url} final true true http://terminology.hl7.org/CodeSystem/observation-category social-history true true http://loinc.org 72166-2 Tobacco smoking status true valid 2020-02-25 true true ${EMPTY} http://google.com test 422 ele-1: All FHIR elements must have a @value or children Observation.value.ofType.CodeableConcept..coding.0..system + Observation smoking-status true ${smoking_status-url} final true true http://terminology.hl7.org/CodeSystem/observation-category social-history true true http://loinc.org 72166-2 Tobacco smoking status true valid 2020-02-25 true true ${EMPTY} http://google.com test 422 ele-1: 'All FHIR elements must have a @value or children' Observation.value.ofType.CodeableConcept..coding.0..system Observation smoking-status true ${smoking_status-url} final true true http://terminology.hl7.org/CodeSystem/observation-category social-history true true http://loinc.org 72166-2 Tobacco smoking status true valid 2020-02-25 true true missing ${EMPTY} missing 422 @value cannot be empty Observation.value.ofType.CodeableConcept..coding.0..code Observation smoking-status true ${smoking_status-url} final true true http://terminology.hl7.org/CodeSystem/observation-category social-history true true http://loinc.org 72166-2 Tobacco smoking status true valid 2020-02-25 true true ${1234} missing test 422 Error parsing JSON: the primitive value must be a string Observation.value.x..coding.0..system From 99e247fc0347d9ca55ee9692df9d8f93926f89f1 Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Fri, 30 Apr 2021 12:53:38 +0200 Subject: [PATCH 021/141] added immunization --- .../CreateImmunizationComponent.java | 2 +- .../immunization/FindImmunizationComponent.java | 2 +- .../config/ConversionConfiguration.java | 10 ++++++---- .../ehr/converter/generic/TimeConverter.java | 8 ++++++-- .../ehrbase/fhirbridge/fhir/common/Profile.java | 6 ++++-- .../CreateImmunizationAuditStrategy.java | 2 +- .../immunization/CreateImmunizationProvider.java | 2 +- .../CreateImmunizationTransaction.java | 2 +- .../FindImmunizationAuditStrategy.java | 2 +- .../immunization/FindImmunizationProvider.java | 16 +++++++++++++--- .../FindImmunizationTransaction.java | 6 +++--- 11 files changed, 38 insertions(+), 20 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/CreateImmunizationComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/CreateImmunizationComponent.java index 78c908915..4febcd595 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/CreateImmunizationComponent.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/CreateImmunizationComponent.java @@ -6,7 +6,7 @@ @SuppressWarnings({"java:S110"}) /** - * Camel {@link org.apache.camel.Component Component} that handles 'Create Diagnostic Report' transaction. + * Camel {@link org.apache.camel.Component Component} that handles 'Create Immunization' transaction. * * @since 1.0.0 */ diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/FindImmunizationComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/FindImmunizationComponent.java index 6114b268f..d2b012702 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/FindImmunizationComponent.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/FindImmunizationComponent.java @@ -21,7 +21,7 @@ import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; /** - * Camel {@link org.apache.camel.Component Component} that handles 'Find Diagnostic Report' transaction. + * Camel {@link org.apache.camel.Component Component} that handles 'Find Immunization' transaction. * * @since 1.0.0 */ diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java index 23558b640..e499ac0df 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java @@ -16,6 +16,7 @@ import org.ehrbase.fhirbridge.ehr.converter.specific.geccoDiagnose.GECCODiagnoseCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.heartrate.HeartRateCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.historyoftravel.HistoryOfTravelCompositionConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.impfstatus.ImpfstatusCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.knownexposure.SarsCov2KnownExposureCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.observationlab.ObservationLabCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.patient.PatientCompositionConverter; @@ -49,6 +50,7 @@ public ConversionService conversionService() { registerPatientConverters(conversionService); registerProcedureConverters(conversionService); registerQuestionnaireResponseConverter(conversionService); + registerImmunizationConverter(conversionService); return conversionService; } @@ -73,10 +75,6 @@ private void registerConditionConverters(ConversionService conversionService) { conversionService.registerConverter(Profile.DIAGNOSE_DEPENDENCE_ON_VENTILATOR, diagnoseCommonConverter); } - private void registerImmunizationConverters(ConversionService conversionService) { - conversionService.registerConverter(Profile.DO_NOT_RESUSCITATE_ORDER, null); // TODO: @ErikTute, add your converter - } - private void registerConsentConverters(ConversionService conversionService) { conversionService.registerConverter(Profile.DO_NOT_RESUSCITATE_ORDER, null); // TODO: @ErikTute, add your converter } @@ -129,4 +127,8 @@ private void registerProcedureConverters(ConversionService conversionService) { private void registerQuestionnaireResponseConverter(ConversionService conversionService) { conversionService.registerConverter(Profile.DEFAULT_QUESTIONNAIRE_RESPONSE, new D4lQuestionnaireCompositionConverter()); } + + private void registerImmunizationConverter(ConversionService conversionService) { + conversionService.registerConverter(Profile.VACCINATION, new ImpfstatusCompositionConverter()); + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java index 7098bc696..3bf5a4fa0 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java @@ -1,7 +1,11 @@ package org.ehrbase.fhirbridge.ehr.converter.generic; -import org.ehrbase.fhirbridge.ehr.converter.specific.diagnosticreportlab.DiagnosticReportLabCompositionConverter; -import org.hl7.fhir.r4.model.*; +import org.hl7.fhir.r4.model.Condition; +import org.hl7.fhir.r4.model.DiagnosticReport; +import org.hl7.fhir.r4.model.Immunization; +import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.r4.model.Procedure; +import org.hl7.fhir.r4.model.QuestionnaireResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java index 43d812729..cf87ab16b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java @@ -3,6 +3,7 @@ import org.hl7.fhir.r4.model.Condition; import org.hl7.fhir.r4.model.Consent; import org.hl7.fhir.r4.model.DiagnosticReport; +import org.hl7.fhir.r4.model.Immunization; import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.r4.model.Procedure; @@ -114,10 +115,11 @@ public enum Profile { // QuestionnaireResponse Profiles - DEFAULT_QUESTIONNAIRE_RESPONSE(QuestionnaireResponse.class, null); + DEFAULT_QUESTIONNAIRE_RESPONSE(QuestionnaireResponse.class, null), //Immunization - + + VACCINATION(Immunization.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization"); private final Class<? extends Resource> resourceType; diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationAuditStrategy.java index 498620091..f7bbeab1e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationAuditStrategy.java @@ -25,7 +25,7 @@ /** * Implementation of {@link org.openehealth.ipf.commons.ihe.core.atna.AuditStrategy AuditStrategy} - * for 'Create Diagnostic Report' transaction. + * for 'Create Immunization' transaction. * * @since 1.0.0 */ diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationProvider.java index bd95f9a6f..8b479d999 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationProvider.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationProvider.java @@ -28,7 +28,7 @@ /** * Implementation of {@link org.openehealth.ipf.commons.ihe.fhir.FhirProvider FhirProvider} that provides REST support - * for 'Create Diagnostic Report' transaction. + * for 'Create Immunization' transaction. * * @since 1.0.0 */ diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationTransaction.java index 3ca19ac45..7fc0ee131 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationTransaction.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationTransaction.java @@ -22,7 +22,7 @@ import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; /** - * Configuration for 'Create Observation' transaction. + * Configuration for 'Create Immunization' transaction. * * @since 1.0.0 */ diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationAuditStrategy.java index 46698b257..113082fd3 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationAuditStrategy.java @@ -26,7 +26,7 @@ /** * Implementation of {@link org.openehealth.ipf.commons.ihe.core.atna.AuditStrategy AuditStrategy} - * for 'Find Diagnostic Report' transaction. + * for 'Find Immunization' transaction. * * @since 1.0.0 */ diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationProvider.java index 06d5561e2..fa7da887f 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationProvider.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationProvider.java @@ -17,12 +17,22 @@ package org.ehrbase.fhirbridge.fhir.immunization; import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; -import ca.uhn.fhir.rest.annotation.*; +import ca.uhn.fhir.rest.annotation.Count; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.annotation.Offset; +import ca.uhn.fhir.rest.annotation.OptionalParam; +import ca.uhn.fhir.rest.annotation.Read; +import ca.uhn.fhir.rest.annotation.Search; +import ca.uhn.fhir.rest.annotation.Sort; import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.rest.api.SortSpec; import ca.uhn.fhir.rest.api.server.IBundleProvider; import ca.uhn.fhir.rest.api.server.RequestDetails; -import ca.uhn.fhir.rest.param.*; +import ca.uhn.fhir.rest.param.DateRangeParam; +import ca.uhn.fhir.rest.param.ReferenceAndListParam; +import ca.uhn.fhir.rest.param.StringAndListParam; +import ca.uhn.fhir.rest.param.TokenAndListParam; +import ca.uhn.fhir.rest.param.UriAndListParam; import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.r4.model.Immunization; import org.hl7.fhir.r4.model.IdType; @@ -34,7 +44,7 @@ /** * Implementation of {@link org.openehealth.ipf.commons.ihe.fhir.FhirProvider FhirProvider} that provides REST support - * for 'Find Diagnostic Report' transaction. + * for 'Find Immunization' transaction. * * @since 1.0.0 */ diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationTransaction.java index aba659e7b..8d564ae7b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationTransaction.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationTransaction.java @@ -22,15 +22,15 @@ import org.openehealth.ipf.commons.ihe.fhir.audit.FhirQueryAuditDataset; /** - * Configuration for 'Find Diagnostic Report' transaction. + * Configuration for 'Find Immunization' transaction. * * @since 1.0.0 */ public class FindImmunizationTransaction extends FhirTransactionConfiguration<FhirQueryAuditDataset> { public FindImmunizationTransaction() { - super("diagnostic-report-find", - "Find Diagnostic Report", + super("immunization-find", + "Find Immunization", true, null, new FindImmunizationAuditStrategy(), From 1efdc1501c89268d1a73551a466525faf31c4156 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 30 Apr 2021 14:05:06 +0200 Subject: [PATCH 022/141] Fix robot tests Create Blood Pressure --- tests/robot/OBSERVATION/03_create_blood_pressure.robot | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/robot/OBSERVATION/03_create_blood_pressure.robot b/tests/robot/OBSERVATION/03_create_blood_pressure.robot index 83291d857..e6622048c 100644 --- a/tests/robot/OBSERVATION/03_create_blood_pressure.robot +++ b/tests/robot/OBSERVATION/03_create_blood_pressure.robot @@ -54,12 +54,12 @@ ${profile url} https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefi $.subject.identifier.value ${{ {} }} 0 422 This property must be an simple value, not an object Observation.subject.identifier.value $.subject.identifier.value ${123} 0 422 Error parsing JSON: the primitive value must be a string Observation.subject.identifier.value $.subject.identifier missing 0 422 Object must have some content Observation.subject - $.subject.identifier ${EMPTY} 0 422 The property identifier must be an Object, not a primitive property (at Observation.subject.identifier) Observation.subject.identifier - $.subject.identifier ${{ [] }} 0 422 The property identifier must be an Object, not an array (at Observation.subject.identifier) Observation.subject.identifier + $.subject.identifier ${EMPTY} 0 422 The property identifier must be an Object, not a primitive property Observation.subject.identifier + $.subject.identifier ${{ [] }} 0 422 The property identifier must be an Object, not an array Observation.subject.identifier $.subject.identifier ${{ {} }} 0 422 Object must have some content Observation.subject.identifier $.subject.identifier ${123} 0 422 This property must be an Object, not a primitive property Observation.subject.identifier $.subject missing 0 422 Observation.subject: minimum required = 1, but only found 0 .from ${profile url} - $.subject ${EMPTY} 0 422 The property subject must be an Object, not a primitive property (at Observation.subject) Observation.subject + $.subject ${EMPTY} 0 422 The property subject must be an Object, not a primitive property Observation.subject $.subject ${{ [] }} 0 422 This property must be an Object, not an array Observation.subject $.subject ${{ {} }} 0 422 Object must have some content Observation.subject $.subject ${123} 0 422 This property must be an Object, not a primitive property Observation.subject @@ -208,7 +208,7 @@ ${profile url} https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefi $.component[0].valueQuantity missing 0 422 vs-3: 'If there is no a value a data absent reason must be present' failed ... Observation.component[0] - $.component[0].valueQuantity ${EMPTY} 0 422 The property valueQuantity must be an Object, not a primitive property (at Observation.component[0].value[x]) + $.component[0].valueQuantity ${EMPTY} 0 422 The property valueQuantity must be an Object, not a primitive property ... Observation.component[0].value[x] $.component[0].valueQuantity ${{ {} }} 0 422 Object must have some content @@ -306,7 +306,7 @@ ${profile url} https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefi $.component[1].valueQuantity missing 1 422 vs-3: 'If there is no a value a data absent reason must be present' failed ... Observation.component[1] - $.component[1].valueQuantity ${EMPTY} 0 422 The property valueQuantity must be an Object, not a primitive property (at Observation.component[1].value[x]) + $.component[1].valueQuantity ${EMPTY} 0 422 The property valueQuantity must be an Object, not a primitive property ... Observation.component[1].value[x] $.component[1].valueQuantity ${{{}}} 0 422 Object must have some content From 5feb232c54c08be8356f7d3c519197dbcc85714c Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 30 Apr 2021 14:12:21 +0200 Subject: [PATCH 023/141] Fix robot tests --- tests/robot/OBSERVATION/04_create_heart_rate.robot | 2 +- tests/robot/OBSERVATION/05_create_fi02.robot | 2 +- tests/robot/OBSERVATION/08_create_smoking_status.robot | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/robot/OBSERVATION/04_create_heart_rate.robot b/tests/robot/OBSERVATION/04_create_heart_rate.robot index f7ff6f5ba..952063101 100644 --- a/tests/robot/OBSERVATION/04_create_heart_rate.robot +++ b/tests/robot/OBSERVATION/04_create_heart_rate.robot @@ -372,7 +372,7 @@ Force Tags observation_create heart-rate create ${1234} heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 0 This does not appear to be a FHIR resource Dies scheint keine FHIR-Ressource zu sein Observation ${1234} true http://hl7.org/fhir/StructureDefinition/heartrate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 31 Value is '1234' but must be '/min' Wert ist Observation heart-rate false http://hl7.org/fhir/StructureDefinition/heartrate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 23 The value 'test' is not a valid decimal ist kein gültiger Dezimalwert. - Observation heart-rate true ${1234} final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 26 Profile reference '1234' could not be resolved, so has not been checked konnte nicht aufgelöst werden, wurde also nicht überprüft + Observation heart-rate true ${1234} final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 26 Profile reference '1234' has not been checked because it is unknown konnte nicht aufgelöst werden, wurde also nicht überprüft Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate ${1234} true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 31 Value is '1234' but must be '/min' Wert ist Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final false test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 24 Value is '1234' but must be '/min' Wert ist Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true test ${1234} ${1234} ${1234} false ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 29 Value is '1234' but must be '/min' Wert ist diff --git a/tests/robot/OBSERVATION/05_create_fi02.robot b/tests/robot/OBSERVATION/05_create_fi02.robot index 9a9cabfbc..71af54076 100644 --- a/tests/robot/OBSERVATION/05_create_fi02.robot +++ b/tests/robot/OBSERVATION/05_create_fi02.robot @@ -129,7 +129,7 @@ ${profile url} https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefi $.identifier[0].type missing 422 Observation.identifier:analyseBefundCode: minimum required = 1, but only found 0 .from ${profile url} $.identifier[0].type ${EMPTY} 422 The property type must be an Object, not a primitive property $.identifier[0].type ${123} 422 The property type must be an Object, not a primitive property - $.identifier[0].type foobar 422 This property must be an Object, not a primitive property + $.identifier[0].type foobar 422 The property type must be an Object, not a primitive property $.identifier[0].type ${{ [] }} 422 The property type must be an Object, not an array $.identifier[0].type ${{ {} }} 422 Object must have some content $.identifier[0].type ${None} 422 The property type must be an Object, not null diff --git a/tests/robot/OBSERVATION/08_create_smoking_status.robot b/tests/robot/OBSERVATION/08_create_smoking_status.robot index 337742ba5..3d99b3c1a 100644 --- a/tests/robot/OBSERVATION/08_create_smoking_status.robot +++ b/tests/robot/OBSERVATION/08_create_smoking_status.robot @@ -132,7 +132,7 @@ ${randinteger} ${12345} # FIELD/PATH VALUE HTTP ERROR MESSAGE Location # CODE - $.meta missing 422 Default profile is not supported for Observation. One of the following profiles is expected: .https://.* + $.meta missing 422 Default profile is not supported for Observation. One of the following profiles is expected: .https://.* Observation.meta $.meta.profile missing 422 Object must have some content Observation.meta $.meta.profile[0] ${randinteger} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randinteger}. Observation.meta.profile.0. $.meta.profile[0] ${randstring} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randstring}. Observation.meta.profile.0. @@ -347,7 +347,7 @@ ${randinteger} ${12345} ehr.create new ehr 000_ehr_status.json create with DataAbsentReason DataAbsentReason create-smoking-status.json - observation.validate response - 422 (with error message) 422 obs-6: 'dataAbsentReason SHALL only be present if Observation.value[x] is not present Observation + observation.validate response - 422 (with error message) 422 obs-6: 'dataAbsentReason SHALL only be present if Observation.value[x] is not present' failed Observation From 8e348686cd78061e6046fe2b4d3d712370f11824 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 30 Apr 2021 14:21:02 +0200 Subject: [PATCH 024/141] Fix Create Pregnancy Status robot tests --- .../09_create_pregnancy_status.robot | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/robot/OBSERVATION/09_create_pregnancy_status.robot b/tests/robot/OBSERVATION/09_create_pregnancy_status.robot index 9596f0c8d..65580b6f2 100644 --- a/tests/robot/OBSERVATION/09_create_pregnancy_status.robot +++ b/tests/robot/OBSERVATION/09_create_pregnancy_status.robot @@ -69,17 +69,17 @@ ${identifiervalue} urn:uuid:187e0c12-8dd2-67e2-1234-bf273c878281 # invalid cases for identifier $.subject.identifier missing 422 Object must have some content Observation.subject - $.subject.identifier ${EMPTY} 422 This property must be an Object, not a primitive property Observation.subject.identifier - $.subject.identifier ${{ [] }} 422 This property must be an Object, not an array Observation.subject.identifier + $.subject.identifier ${EMPTY} 422 The property identifier must be an Object, not a primitive property Observation.subject.identifier + $.subject.identifier ${{ [] }} 422 The property identifier must be an Object, not an array Observation.subject.identifier $.subject.identifier ${{ {} }} 422 Object must have some content Observation.subject.identifier - $.subject.identifier ${123} 422 This property must be an Object, not a primitive property Observation.subject.identifier + $.subject.identifier ${123} 422 The property identifier must be an Object, not a primitive property Observation.subject.identifier # invalid cases for subject $.subject missing 422 Observation.subject: minimum required = 1, but only found 0 .from ${pregnancy_status-url} - $.subject ${EMPTY} 422 This property must be an Object, not a primitive property Observation.subject - $.subject ${{ [] }} 422 This property must be an Object, not an array Observation.subject + $.subject ${EMPTY} 422 The property subject must be an Object, not a primitive property Observation.subject + $.subject ${{ [] }} 422 The property subject must be an Object, not an array Observation.subject $.subject ${{ {} }} 422 Object must have some content Observation.subject - $.subject ${123} 422 This property must be an Object, not a primitive property Observation.subject + $.subject ${123} 422 The property subject must be an Object, not a primitive property Observation.subject # comment: random uuid regex for uuid $.subject.identifier.value ${{str(uuid.uuid4())}} 422 EhrId not found for subject @@ -139,14 +139,14 @@ ${identifiervalue} urn:uuid:187e0c12-8dd2-67e2-1234-bf273c878281 $.meta.profile[0] ${randinteger} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randinteger}. Observation.meta.profile.0. $.meta.profile[0] ${randstring} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randstring}. Observation.meta.profile.0. $.meta.profile ${{ ["invalid_url"] }} 422 Canonical URLs must be absolute URLs if they are not fragment references .invalid_url. Observation.meta.profile.0. - $.meta.profile ${{ ["http://wrong.url"] }} 422 Profile reference 'http://wrong.url' could not be resolved, so has not been checked Observation.meta.profile.0. - $.meta.profile ${EMPTY} 422 This property must be an Array, not a a primitive property Observation.meta.profile + $.meta.profile ${{ ["http://wrong.url"] }} 422 The resource does not contain any supported profile Observation.meta.profile.0. + $.meta.profile ${EMPTY} 422 This property must be an Array, not a primitive property Observation.meta.profile # comment: the next one sets the value to an empty list/array [] $.meta.profile ${{ [] }} 422 Default profile is not supported for Observation. One of the following profiles is expected: .https://.* # comment: the next one sets value to an empty object {} - $.meta.profile ${{ {} }} 422 This property must be an Array, not a an object + $.meta.profile ${{ {} }} 422 This property must be an Array, not an object 005 Create Pregnancy Status (Invalid/Missing 'identifier') @@ -248,7 +248,7 @@ ${identifiervalue} urn:uuid:187e0c12-8dd2-67e2-1234-bf273c878281 $.code missing 422 Observation.code: minimum required = 1, but only found 0 .from ${pregnancy_status-url} Observation $.code ${{ [] }} 422 Observation.code: minimum required = 1, but only found 0 .from ${pregnancy_status-url} Observation $.code ${{ {} }} 422 Object must have some content Observation.code - $.code ${{ [{}] }} 422 This property must be an Object, not an array Observation.code + $.code ${{ [{}] }} 422 The property code must be an Object, not an array Observation.code # invalid coding $.code.coding missing 422 Observation.code.coding: minimum required = 1, but only found 0 Observation.code @@ -333,12 +333,12 @@ ${identifiervalue} urn:uuid:187e0c12-8dd2-67e2-1234-bf273c878281 # missing valueCodeableConcept # $.valueCodeableConcept missing 422 Index 0 out of bounds for length 0 - $.valueCodeableConcept ${EMPTY} 422 This property must be an Object, not a primitive property Observation.value.x. + $.valueCodeableConcept ${EMPTY} 422 The property valueCodeableConcept must be an Object, not a primitive property Observation.value.x. # wrong format - $.valueCodeableConcept ${{ [] }} 422 This property must be an Object, not an array Observation.value.x. + $.valueCodeableConcept ${{ [] }} 422 The property valueCodeableConcept must be an Object, not an array Observation.value.x. $.valueCodeableConcept ${{ {} }} 422 Object must have some content Observation.value.x. - $.valueCodeableConcept ${{ [{}] }} 422 This property must be an Object, not an array Observation.value.x. + $.valueCodeableConcept ${{ [{}] }} 422 The property valueCodeableConcept must be an Object, not an array Observation.value.x. # missing coding # $.valueCodeableConcept.coding missing 422 Index 0 out of bounds for length 0 @@ -376,7 +376,7 @@ ${identifiervalue} urn:uuid:187e0c12-8dd2-67e2-1234-bf273c878281 ehr.create new ehr 000_ehr_status.json create with DataAbsentReason DataAbsentReason create-pregnancy-status.json - observation.validate response - 422 (with error message) 422 obs-6: dataAbsentReason SHALL only be present if Observation.value.x. is not present .dataAbsentReason.empty.. or value.empty... Observation + observation.validate response - 422 (with error message) 422 obs-6: 'dataAbsentReason SHALL only be present if Observation.value[x] is not present' failed Observation @@ -397,12 +397,12 @@ ${identifiervalue} urn:uuid:187e0c12-8dd2-67e2-1234-bf273c878281 # missing valueCodeableConcept # $.dataAbsentReason missing 422 Index 0 out of bounds for length 0 - $.dataAbsentReason ${EMPTY} 422 This property must be an Object, not a primitive property Observation.dataAbsentReason + $.dataAbsentReason ${EMPTY} 422 The property dataAbsentReason must be an Object, not a primitive property Observation.dataAbsentReason # wrong format - $.dataAbsentReason ${{ [] }} 422 This property must be an Object, not an array Observation.dataAbsentReason + $.dataAbsentReason ${{ [] }} 422 The property dataAbsentReason must be an Object, not an array Observation.dataAbsentReason $.dataAbsentReason ${{ {} }} 422 Object must have some content Observation.dataAbsentReason - $.dataAbsentReason ${{ [{}] }} 422 This property must be an Object, not an array + $.dataAbsentReason ${{ [{}] }} 422 The property dataAbsentReason must be an Object, not an array # missing coding # $.dataAbsentReason.coding missing 422 Index 0 out of bounds for length 0 @@ -440,7 +440,7 @@ ${identifiervalue} urn:uuid:187e0c12-8dd2-67e2-1234-bf273c878281 # all attributes invalid for valueCodeableConcept Observation pregnancy-status true ${pregnancy_status-url} true ${identifiersystem} ${identifiervalue} final true true http://terminology.hl7.org/CodeSystem/observation-category social-history true true http://loinc.org 82810-3 Pregnancy status true valid 2020-02-25 true true ${EMPTY} ${EMPTY} ${EMPTY} 422 @value cannot be empty Observation.value.ofType.CodeableConcept..coding.0..display Observation pregnancy-status true ${pregnancy_status-url} true ${identifiersystem} ${identifiervalue} final true true http://terminology.hl7.org/CodeSystem/observation-category social-history true true http://loinc.org 82810-3 Pregnancy status true valid 2020-02-25 true true ${1234} test ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.value.x..coding.0..display - Observation pregnancy-status true ${pregnancy_status-url} true ${identifiersystem} ${identifiervalue} final true true http://terminology.hl7.org/CodeSystem/observation-category social-history true true http://loinc.org 82810-3 Pregnancy status true valid 2020-02-25 true true ${EMPTY} http://google.com test 422 ele-1: All FHIR elements must have a @value or children Observation.value.ofType.CodeableConcept..coding.0..system + Observation pregnancy-status true ${pregnancy_status-url} true ${identifiersystem} ${identifiervalue} final true true http://terminology.hl7.org/CodeSystem/observation-category social-history true true http://loinc.org 82810-3 Pregnancy status true valid 2020-02-25 true true ${EMPTY} http://google.com test 422 ele-1: 'All FHIR elements must have a @value or children' failed Observation.value.ofType.CodeableConcept..coding.0..system Observation pregnancy-status true ${pregnancy_status-url} true ${identifiersystem} ${identifiervalue} final true true http://terminology.hl7.org/CodeSystem/observation-category social-history true true http://loinc.org 82810-3 Pregnancy status true valid 2020-02-25 true true missing ${EMPTY} missing 422 @value cannot be empty Observation.value.ofType.CodeableConcept..coding.0..code Observation pregnancy-status true ${pregnancy_status-url} true ${identifiersystem} ${identifiervalue} final true true http://terminology.hl7.org/CodeSystem/observation-category social-history true true http://loinc.org 82810-3 Pregnancy status true valid 2020-02-25 true true ${1234} missing test 422 Error parsing JSON: the primitive value must be a string Observation.value.x..coding.0..system @@ -462,7 +462,7 @@ ${identifiervalue} urn:uuid:187e0c12-8dd2-67e2-1234-bf273c878281 ${1234} pregnancy-status true ${pregnancy_status-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 This does not appear to be a FHIR resource .unknown name '1234'. 1234 Observation ${1234} true ${pregnancy_status-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.id Observation pregnancy-status false ${pregnancy_status-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Coding.system must be an absolute reference, not a local reference Observation.value.ofType.CodeableConcept..coding.0. - Observation pregnancy-status true ${1234} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Profile reference '1234' could not be resolved, so has not been checked Observation.meta.profile.0. + Observation pregnancy-status true ${1234} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Profile reference '1234' has not been checked because it is unknown Observation.meta.profile.0. Observation pregnancy-status true ${pregnancy_status-url} false ${randinteger} ${randinteger} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.category.0..coding.0..system Observation pregnancy-status true ${pregnancy_status-url} true ${randinteger} ${randinteger} ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.status Observation pregnancy-status true ${pregnancy_status-url} true ${randinteger} ${randinteger} final false true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.code.coding.0..system From 16544c914a6222db07e728b0387df5dd0fa0c980 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 30 Apr 2021 14:35:34 +0200 Subject: [PATCH 025/141] Fix Create-Clinical-Frailty-Scale-Score robot tests --- ..._create-clinical-frailty-scale-score.robot | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/tests/robot/OBSERVATION/11_create-clinical-frailty-scale-score.robot b/tests/robot/OBSERVATION/11_create-clinical-frailty-scale-score.robot index b7b5f1d52..49a9b125c 100644 --- a/tests/robot/OBSERVATION/11_create-clinical-frailty-scale-score.robot +++ b/tests/robot/OBSERVATION/11_create-clinical-frailty-scale-score.robot @@ -73,17 +73,17 @@ ${vCC_URL} https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/frailty # invalid cases for identifier $.subject.identifier missing 422 Object must have some content Observation.subject - $.subject.identifier ${EMPTY} 422 This property must be an Object, not a primitive property Observation.subject.identifier - $.subject.identifier ${{ [] }} 422 This property must be an Object, not an array Observation.subject.identifier + $.subject.identifier ${EMPTY} 422 The property identifier must be an Object, not a primitive property Observation.subject.identifier + $.subject.identifier ${{ [] }} 422 The property identifier must be an Object, not an array Observation.subject.identifier $.subject.identifier ${{ {} }} 422 Object must have some content Observation.subject.identifier - $.subject.identifier ${123} 422 This property must be an Object, not a primitive property Observation.subject.identifier + $.subject.identifier ${123} 422 The property identifier must be an Object, not a primitive property Observation.subject.identifier # invalid cases for subject $.subject missing 422 Observation.subject: minimum required = 1, but only found 0 .from ${frailty_score-url} - $.subject ${EMPTY} 422 This property must be an Object, not a primitive property Observation.subject - $.subject ${{ [] }} 422 This property must be an Object, not an array Observation.subject + $.subject ${EMPTY} 422 The property subject must be an Object, not a primitive property Observation.subject + $.subject ${{ [] }} 422 The property subject must be an Object, not an array Observation.subject $.subject ${{ {} }} 422 Object must have some content Observation.subject - $.subject ${123} 422 This property must be an Object, not a primitive property Observation.subject + $.subject ${123} 422 The property subject must be an Object, not a primitive property Observation.subject # comment: random uuid regex for uuid $.subject.identifier.value ${{str(uuid.uuid4())}} 422 EhrId not found for subject '([0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})' @@ -144,13 +144,13 @@ ${vCC_URL} https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/frailty $.meta.profile[0] ${randstring} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randstring}. Observation.meta.profile.0. $.meta.profile ${{ ["invalid_url"] }} 422 Canonical URLs must be absolute URLs if they are not fragment references .invalid_url. Observation.meta.profile.0. $.meta.profile ${{ ["http://wrong.url"] }} 422 Profile reference 'http://wrong.url' could not be resolved, so has not been checked Observation.meta.profile.0. - $.meta.profile ${EMPTY} 422 This property must be an Array, not a a primitive property Observation.meta.profile + $.meta.profile ${EMPTY} 422 This property must be an Array, not a primitive property Observation.meta.profile # comment: the next one sets the value to an empty list/array [] $.meta.profile ${{ [] }} 422 Default profile is not supported for Observation. One of the following profiles is expected: .https://.* # comment: the next one sets value to an empty object {} - $.meta.profile ${{ {} }} 422 This property must be an Array, not a an object + $.meta.profile ${{ {} }} 422 This property must be an Array, not an object 005 Create Clinical Frailty Scale Score (Invalid/Missing 'identifier') @@ -174,10 +174,10 @@ ${vCC_URL} https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/frailty $.identifier ${{ [{}] }} 422 Object must have some content Observation.identifier.0. # invalid type - $.identifier[0].type ${EMPTY} 422 This property must be an Object, not a primitive property Observation.identifier.0..type - $.identifier[0].type ${{ [] }} 422 This property must be an Object, not an array Observation.identifier.0..type + $.identifier[0].type ${EMPTY} 422 The property type must be an Object, not a primitive property Observation.identifier.0..type + $.identifier[0].type ${{ [] }} 422 The property type must be an Object, not an array Observation.identifier.0..type $.identifier[0].type ${{ {} }} 422 Object must have some content Observation.identifier.0..type - $.identifier[0].type ${{ [{}] }} 422 This property must be an Object, not an array Observation.identifier.0..type + $.identifier[0].type ${{ [{}] }} 422 The property type must be an Object, not an array Observation.identifier.0..type # invalid type coding $.identifier[0].type.coding ${EMPTY} 422 This property must be an Array, not a primitive property Observation.identifier.0..type.coding @@ -204,10 +204,10 @@ ${vCC_URL} https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/frailty $.identifier[0].value ${randinteger} 422 Error parsing JSON: the primitive value must be a string Observation.identifier.0..value # invalid assigner - $.identifier[0].assigner ${EMPTY} 422 This property must be an Object, not a primitive property Observation.identifier.0..assigner - $.identifier[0].assigner ${{ [] }} 422 This property must be an Object, not an array Observation.identifier.0..assigner + $.identifier[0].assigner ${EMPTY} 422 The property assigner must be an Object, not a primitive property Observation.identifier.0..assigner + $.identifier[0].assigner ${{ [] }} 422 The property assigner must be an Object, not an array Observation.identifier.0..assigner $.identifier[0].assigner ${{ {} }} 422 Object must have some content Observation.identifier.0..assigner - $.identifier[0].assigner ${{ [{}] }} 422 This property must be an Object, not an array Observation.identifier.0..assigner + $.identifier[0].assigner ${{ [{}] }} 422 The property assigner must be an Object, not an array Observation.identifier.0..assigner # invalid assigner reference $.identifier[0].assigner.reference ${EMPTY} 422 @value cannot be empty Observation.identifier.0..assigner.reference @@ -293,7 +293,7 @@ ${vCC_URL} https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/frailty $.code ${EMPTY} 422 Observation.code: minimum required = 1, but only found 0 .from ${frailty_score-url} Observation $.code ${{ [] }} 422 Observation.code: minimum required = 1, but only found 0 .from ${frailty_score-url} Observation $.code ${{ {} }} 422 Object must have some content Observation.code - $.code ${{ [{}] }} 422 This property must be an Object, not an array Observation.code + $.code ${{ [{}] }} 422 The property code must be an Object, not an array Observation.code # invalid coding $.code.coding missing 422 Observation.code.coding: minimum required = 1, but only found 0 Observation.code @@ -380,12 +380,12 @@ ${vCC_URL} https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/frailty # missing valueCodeableConcept $.valueCodeableConcept missing 422 Index 0 out of bounds for length 0 - $.valueCodeableConcept ${EMPTY} 422 This property must be an Object, not a primitive property Observation.value.x. + $.valueCodeableConcept ${EMPTY} 422 The property valueCodeableConcept must be an Object, not a primitive property Observation.value.x. # wrong format - $.valueCodeableConcept ${{ [] }} 422 This property must be an Object, not an array Observation.value.x. + $.valueCodeableConcept ${{ [] }} 422 The property valueCodeableConcept must be an Object, not an array Observation.value.x. $.valueCodeableConcept ${{ {} }} 422 Object must have some content Observation.value.x. - $.valueCodeableConcept ${{ [{}] }} 422 This property must be an Object, not an array Observation.value.x. + $.valueCodeableConcept ${{ [{}] }} 422 The property valueCodeableConcept must be an Object, not an array Observation.value.x. # missing coding $.valueCodeableConcept.coding missing 422 Object must have some content Observation.value.x. @@ -427,12 +427,12 @@ ${vCC_URL} https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/frailty # CODE # missing method - $.method ${EMPTY} 422 This property must be an Object, not a primitive property Observation.method + $.method ${EMPTY} 422 The property method must be an Object, not a primitive property Observation.method # invalid format - $.method ${{ [] }} 422 This property must be an Object, not an array Observation.method + $.method ${{ [] }} 422 The property method must be an Object, not an array Observation.method $.method ${{ {} }} 422 Object must have some content Observation.method - $.method ${{ [{}] }} 422 This property must be an Object, not an array Observation.method + $.method ${{ [{}] }} 422 The property method must be an Object, not an array Observation.method # missing coding $.method.coding missing 422 Object must have some content Observation.method @@ -469,7 +469,7 @@ ${vCC_URL} https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/frailty ehr.create new ehr 000_ehr_status.json create with DataAbsentReason DataAbsentReason create-clinical-frailty-scale-score.json - observation.validate response - 422 (with error message) 422 obs-6: dataAbsentReason SHALL only be present if Observation.value.x. is not present .dataAbsentReason.empty.. or value.empty... Observation + observation.validate response - 422 (with error message) 422 obs-6: 'dataAbsentReason SHALL only be present if Observation.value[x] is not present' failed Observation @@ -490,12 +490,12 @@ ${vCC_URL} https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/frailty # missing valueCodeableConcept $.dataAbsentReason missing 422 Index 0 out of bounds for length 0 - $.dataAbsentReason ${EMPTY} 422 This property must be an Object, not a primitive property Observation.dataAbsentReason + $.dataAbsentReason ${EMPTY} 422 The property dataAbsentReason must be an Object, not a primitive property Observation.dataAbsentReason # wrong format valueCodeableConcept - $.dataAbsentReason ${{ [] }} 422 This property must be an Object, not an array Observation.dataAbsentReason + $.dataAbsentReason ${{ [] }} 422 The property dataAbsentReason must be an Object, not an array Observation.dataAbsentReason $.dataAbsentReason ${{ {} }} 422 Object must have some content Observation.dataAbsentReason - $.dataAbsentReason ${{ [{}] }} 422 This property must be an Object, not an array + $.dataAbsentReason ${{ [{}] }} 422 The property dataAbsentReason must be an Object, not an array # missing coding $.dataAbsentReason.coding missing 422 Index 0 out of bounds for length 0 @@ -540,7 +540,7 @@ ${vCC_URL} https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/frailty # all attributes invalid for valueCodeableConcept Observation ${ID} true ${frailty_score-url} true ${identifiersystem} ${identifiervalue} final true true ${category_URL} survey true true http://snomed.info/sct 763264000 ${code_display} true valid 2020-02-25 true true ${EMPTY} ${EMPTY} ${EMPTY} 422 @value cannot be empty Observation.value.ofType.CodeableConcept..coding.0..display Observation ${ID} true ${frailty_score-url} true ${identifiersystem} ${identifiervalue} final true true ${category_URL} survey true true http://snomed.info/sct 763264000 ${code_display} true valid 2020-02-25 true true ${1234} test ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.value.x..coding.0..display - Observation ${ID} true ${frailty_score-url} true ${identifiersystem} ${identifiervalue} final true true ${category_URL} survey true true http://snomed.info/sct 763264000 ${code_display} true valid 2020-02-25 true true ${EMPTY} http://google.com test 422 ele-1: All FHIR elements must have a @value or children Observation.value.ofType.CodeableConcept..coding.0..system + Observation ${ID} true ${frailty_score-url} true ${identifiersystem} ${identifiervalue} final true true ${category_URL} survey true true http://snomed.info/sct 763264000 ${code_display} true valid 2020-02-25 true true ${EMPTY} http://google.com test 422 ele-1: 'All FHIR elements must have a @value or children' failed Observation.value.ofType.CodeableConcept..coding.0..system Observation ${ID} true ${frailty_score-url} true ${identifiersystem} ${identifiervalue} final true true ${category_URL} survey true true http://snomed.info/sct 763264000 ${code_display} true valid 2020-02-25 true true missing ${EMPTY} missing 422 @value cannot be empty Observation.value.ofType.CodeableConcept..coding.0..code Observation ${ID} true ${frailty_score-url} true ${identifiersystem} ${identifiervalue} final true true ${category_URL} survey true true http://snomed.info/sct 763264000 ${code_display} true valid 2020-02-25 true true ${1234} missing test 422 Error parsing JSON: the primitive value must be a string Observation.value.x..coding.0..system @@ -563,7 +563,7 @@ ${vCC_URL} https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/frailty ${1234} ${ID} true ${frailty_score-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 This does not appear to be a FHIR resource .unknown name '1234'. 1234 Observation ${1234} true ${frailty_score-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.id Observation ${ID} false ${frailty_score-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Coding.system must be an absolute reference, not a local reference Observation.value.ofType.CodeableConcept..coding.0. - Observation ${ID} true ${1234} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Profile reference '1234' could not be resolved, so has not been checked Observation.meta.profile.0. + Observation ${ID} true ${1234} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Profile reference '1234' has not been checked because it is unknown Observation.meta.profile.0. Observation ${ID} true ${frailty_score-url} false ${randinteger} ${randinteger} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.category.0..coding.0..system Observation ${ID} true ${frailty_score-url} true ${randinteger} ${randinteger} ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.status Observation ${ID} true ${frailty_score-url} true ${randinteger} ${randinteger} final false true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.code.coding.0..system From 640d59442474f9d27aa54ad2fb1399011f64aeda Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 30 Apr 2021 17:52:45 +0200 Subject: [PATCH 026/141] Fix create body height --- .../OBSERVATION/12_create_body_height.robot | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/robot/OBSERVATION/12_create_body_height.robot b/tests/robot/OBSERVATION/12_create_body_height.robot index 5c944b369..4f627c19a 100644 --- a/tests/robot/OBSERVATION/12_create_body_height.robot +++ b/tests/robot/OBSERVATION/12_create_body_height.robot @@ -66,17 +66,17 @@ ${vQSystem} http://unitsofmeasure.org # invalid cases for identifier $.subject.identifier missing 422 Object must have some content Observation.subject - $.subject.identifier ${EMPTY} 422 This property must be an Object, not a primitive property Observation.subject.identifier - $.subject.identifier ${{ [] }} 422 This property must be an Object, not an array Observation.subject.identifier + $.subject.identifier ${EMPTY} 422 The property identifier must be an Object, not a primitive property Observation.subject.identifier + $.subject.identifier ${{ [] }} 422 The property identifier must be an Object, not an array Observation.subject.identifier $.subject.identifier ${{ {} }} 422 Object must have some content Observation.subject.identifier - $.subject.identifier ${123} 422 This property must be an Object, not a primitive property Observation.subject.identifier + $.subject.identifier ${123} 422 The property identifier must be an Object, not a primitive property Observation.subject.identifier # invalid cases for subject $.subject missing 422 Observation.subject: minimum required = 1, but only found 0 .from ${body_height-url} - $.subject ${EMPTY} 422 This property must be an Object, not a primitive property Observation.subject - $.subject ${{ [] }} 422 This property must be an Object, not an array Observation.subject + $.subject ${EMPTY} 422 The property subject must be an Object, not a primitive property Observation.subject + $.subject ${{ [] }} 422 The property subject must be an Object, not an array Observation.subject $.subject ${{ {} }} 422 Object must have some content Observation.subject - $.subject ${123} 422 This property must be an Object, not a primitive property Observation.subject + $.subject ${123} 422 The property subject must be an Object, not a primitive property Observation.subject # comment: random uuid regex for uuid $.subject.identifier.value ${{str(uuid.uuid4())}} 422 EhrId not found for subject @@ -137,13 +137,13 @@ ${vQSystem} http://unitsofmeasure.org $.meta.profile[0] ${randstring} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randstring}. Observation.meta.profile.0. $.meta.profile ${{ ["invalid_url"] }} 422 Canonical URLs must be absolute URLs if they are not fragment references .invalid_url. Observation.meta.profile.0. $.meta.profile ${{ ["http://wrong.url"] }} 422 Profile reference 'http://wrong.url' could not be resolved, so has not been checked Observation.meta.profile.0. - $.meta.profile ${EMPTY} 422 This property must be an Array, not a a primitive property Observation.meta.profile + $.meta.profile ${EMPTY} 422 This property must be an Array, not a primitive property Observation.meta.profile # comment: the next one sets the value to an empty list/array [] $.meta.profile ${{ [] }} 422 Default profile is not supported for Observation. One of the following profiles is expected: .https://.* # comment: the next one sets value to an empty object {} - $.meta.profile ${{ {} }} 422 This property must be an Array, not a an object + $.meta.profile ${{ {} }} 422 This property must be an Array, not an object 005 Create Body Height (Invalid/Missing 'identifier') @@ -250,7 +250,7 @@ ${vQSystem} http://unitsofmeasure.org $.code missing 422 Observation.code: minimum required = 1, but only found 0 .from ${body_height-url} Observation $.code ${{ [] }} 422 Observation.code: minimum required = 1, but only found 0 .from ${body_height-url} Observation $.code ${{ {} }} 422 Object must have some content Observation.code - $.code ${{ [{}] }} 422 This property must be an Object, not an array Observation.code + $.code ${{ [{}] }} 422 The property code must be an Object, not an array Observation.code # invalid coding $.code.coding missing 422 Observation.code.coding:BodyHeightCode: minimum required = 1, but only found 0 .from ${body_height-url} Observation.code @@ -330,7 +330,7 @@ ${vQSystem} http://unitsofmeasure.org ehr.create new ehr 000_ehr_status.json create with DataAbsentReason DataAbsentReason BodyHeight/create-body-height-normal.json - observation.validate response - 422 (with error message) 422 obs-6: dataAbsentReason SHALL only be present if Observation.value.x. is not present .dataAbsentReason.empty.. or value.empty... Observation + observation.validate response - 422 (with error message) 422 obs-6: dataAbsentReason SHALL only be present if Observation.value[x] is not present failed Observation @@ -351,12 +351,12 @@ ${vQSystem} http://unitsofmeasure.org # missing valueCodeableConcept #$.dataAbsentReason missing 422 Index 0 out of bounds for length 0 - $.dataAbsentReason ${EMPTY} 422 This property must be an Object, not a primitive property Observation.dataAbsentReason + $.dataAbsentReason ${EMPTY} 422 The property dataAbsentReason must be an Object, not a primitive property Observation.dataAbsentReason # wrong format - $.dataAbsentReason ${{ [] }} 422 This property must be an Object, not an array Observation.dataAbsentReason + $.dataAbsentReason ${{ [] }} 422 The property dataAbsentReason must be an Object, not an array Observation.dataAbsentReason $.dataAbsentReason ${{ {} }} 422 Object must have some content Observation.dataAbsentReason - $.dataAbsentReason ${{ [{}] }} 422 This property must be an Object, not an array + $.dataAbsentReason ${{ [{}] }} 422 The property dataAbsentReason must be an Object, not an array # missing coding $.dataAbsentReason.coding missing 422 .*dataAbsentReason SHALL only be present if Observation.value.x. is not present @@ -413,7 +413,7 @@ ${vQSystem} http://unitsofmeasure.org # invalid value $.valueQuantity.value ${EMPTY} 422 Error parsing JSON: the primitive value must be a number - $.valueQuantity.value ${None} 422 This property must be an simple value, not null + $.valueQuantity.value ${None} 422 The property valueQuantity must be an Object, not null $.valueQuantity.value 113 422 Error parsing JSON: the primitive value must be a number $.valueQuantity.value ${1001} 422 .*value is not within interval, expected:0.0 <= 1001.0 <= 1000.0.*Bad Request.* $.valueQuantity.value ${1000.09} 422 .*value is not within interval, expected:0.0 <= 1000.09 <= 1000.0.*Bad Request.* @@ -474,7 +474,7 @@ ${vQSystem} http://unitsofmeasure.org ${1234} 23499ea6-d046-4e91-b7ab-d9cf040add72 true ${body_height-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true ${randstring} ${1234} ${1234} ${1234} 422 This does not appear to be a FHIR resource .unknown name '1234'. 1234 Observation ${1234} true ${body_height-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true ${randstring} ${1234} ${1234} ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.id Observation 23499ea6-d046-4e91-b7ab-d9cf040add72 false ${body_height-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true ${randstring} ${1234} ${1234} ${1234} 422 Coding.system must be an absolute reference, not a local reference Observation.identifier.0. - Observation 23499ea6-d046-4e91-b7ab-d9cf040add72 true ${1234} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true ${randstring} ${1234} ${1234} ${1234} 422 Profile reference '1234' could not be resolved, so has not been checked Observation.meta.profile.0. + Observation 23499ea6-d046-4e91-b7ab-d9cf040add72 true ${1234} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true ${randstring} ${1234} ${1234} ${1234} 422 Profile reference '1234' has not been checked because it is unknown Observation.meta.profile.0. Observation 23499ea6-d046-4e91-b7ab-d9cf040add72 true ${body_height-url} false ${randinteger} ${randinteger} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true ${randstring} ${1234} ${1234} ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.category.0..coding.0..system Observation 23499ea6-d046-4e91-b7ab-d9cf040add72 true ${body_height-url} true ${randinteger} ${randinteger} ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true ${randstring} ${1234} ${1234} ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.status Observation 23499ea6-d046-4e91-b7ab-d9cf040add72 true ${body_height-url} true ${randinteger} ${randinteger} final false true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true ${randstring} ${1234} ${1234} ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.code.coding.0..system @@ -484,7 +484,7 @@ ${vQSystem} http://unitsofmeasure.org Observation 23499ea6-d046-4e91-b7ab-d9cf040add72 true ${body_height-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} false valid 2020-02-25 true ${randstring} ${1234} ${1234} ${1234} 422 Observation.subject: minimum required = 1, but only found 0 .from ${body_height-url}. Observation Observation 23499ea6-d046-4e91-b7ab-d9cf040add72 true ${body_height-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true false ${1234} ${1234} ${1234} true test 2020-02-25 true ${randstring} ${1234} ${1234} ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.code Observation 23499ea6-d046-4e91-b7ab-d9cf040add72 true ${body_height-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true false ${1234} ${1234} ${1234} true valid ${12345} true ${randstring} ${1234} ${1234} ${1234} 422 Not a valid date/time .12345. Observation.effective.ofType.dateTime. - Observation 23499ea6-d046-4e91-b7ab-d9cf040add72 true ${body_height-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true false ${1234} ${1234} ${1234} true valid 2020-02-25 false ${randstring} ${1234} ${1234} ${1234} 422 vs-2: If there is no component or hasMember element then either a value.x. or a data absent reason must be present.* Observation + Observation 23499ea6-d046-4e91-b7ab-d9cf040add72 true ${body_height-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true false ${1234} ${1234} ${1234} true valid 2020-02-25 false ${randstring} ${1234} ${1234} ${1234} 422 vs-2: If there is no component or hasMember element then either a value[x] or a data absent reason must be present.* Observation From f86b281884c2e429ff0b448209f7229692d44809 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 30 Apr 2021 17:55:07 +0200 Subject: [PATCH 027/141] Fix robot tests Create Smoking Status --- tests/robot/OBSERVATION/08_create_smoking_status.robot | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/robot/OBSERVATION/08_create_smoking_status.robot b/tests/robot/OBSERVATION/08_create_smoking_status.robot index 3d99b3c1a..74a3c2e73 100644 --- a/tests/robot/OBSERVATION/08_create_smoking_status.robot +++ b/tests/robot/OBSERVATION/08_create_smoking_status.robot @@ -347,7 +347,7 @@ ${randinteger} ${12345} ehr.create new ehr 000_ehr_status.json create with DataAbsentReason DataAbsentReason create-smoking-status.json - observation.validate response - 422 (with error message) 422 obs-6: 'dataAbsentReason SHALL only be present if Observation.value[x] is not present' failed Observation + observation.validate response - 422 (with error message) 422 obs-6: dataAbsentReason SHALL only be present if Observation.value[x] is not present failed Observation @@ -415,7 +415,7 @@ ${randinteger} ${12345} # all attributes invalid for valueCodeableConcept Observation smoking-status true ${smoking_status-url} final true true http://terminology.hl7.org/CodeSystem/observation-category social-history true true http://loinc.org 72166-2 Tobacco smoking status true valid 2020-02-25 true true ${EMPTY} ${EMPTY} ${EMPTY} 422 @value cannot be empty Observation.value.ofType.CodeableConcept..coding.0..display Observation smoking-status true ${smoking_status-url} final true true http://terminology.hl7.org/CodeSystem/observation-category social-history true true http://loinc.org 72166-2 Tobacco smoking status true valid 2020-02-25 true true ${1234} test ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.value.x..coding.0..display - Observation smoking-status true ${smoking_status-url} final true true http://terminology.hl7.org/CodeSystem/observation-category social-history true true http://loinc.org 72166-2 Tobacco smoking status true valid 2020-02-25 true true ${EMPTY} http://google.com test 422 ele-1: 'All FHIR elements must have a @value or children' Observation.value.ofType.CodeableConcept..coding.0..system + Observation smoking-status true ${smoking_status-url} final true true http://terminology.hl7.org/CodeSystem/observation-category social-history true true http://loinc.org 72166-2 Tobacco smoking status true valid 2020-02-25 true true ${EMPTY} http://google.com test 422 ele-1: 'All FHIR elements must have a @value or children' Observation.value.ofType.CodeableConcept..coding.0..system Observation smoking-status true ${smoking_status-url} final true true http://terminology.hl7.org/CodeSystem/observation-category social-history true true http://loinc.org 72166-2 Tobacco smoking status true valid 2020-02-25 true true missing ${EMPTY} missing 422 @value cannot be empty Observation.value.ofType.CodeableConcept..coding.0..code Observation smoking-status true ${smoking_status-url} final true true http://terminology.hl7.org/CodeSystem/observation-category social-history true true http://loinc.org 72166-2 Tobacco smoking status true valid 2020-02-25 true true ${1234} missing test 422 Error parsing JSON: the primitive value must be a string Observation.value.x..coding.0..system @@ -427,7 +427,7 @@ ${randinteger} ${12345} Observation smoking-status true ${smoking_status-url} final true true http://terminology.hl7.org/CodeSystem/observation-category social-history true true missing test test1234 true valid 2020-02-25 true true http://loinc.org LA18978-9 Never smoker 422 A code with no system has no defined meaning. A system should be provided Observation.code.coding.0. # all attributes invalid for category -# Observation smoking-status true ${smoking_status-url} final true true http://google.com test true true http://loinc.org 72166-2 Tobacco smoking status true valid 2020-02-25 true true http://loinc.org LA18978-9 Never smoker 422 This element does not match any known slice defined in the profile ${smoking_status-url} Observation.category +# Observation smoking-status true ${smoking_status-url} final true true http://google.com test true true http://loinc.org 72166-2 Tobacco smoking status true valid 2020-02-25 true true http://loinc.org LA18978-9 Never smoker 422 This element does not match any known slice defined in the profile ${smoking_status-url} Observation.category Observation smoking-status true ${smoking_status-url} final true true missing ${EMPTY} true true http://loinc.org 72166-2 Tobacco smoking status true valid 2020-02-25 true true http://loinc.org LA18978-9 Never smoker 422 @value cannot be empty Observation.category.0..coding.0..code Observation smoking-status true ${smoking_status-url} final true true ${EMPTY} ${12345} true true http://loinc.org 72166-2 Tobacco smoking status true valid 2020-02-25 true true http://loinc.org LA18978-9 Never smoker 422 @value cannot be empty Observation.category.0..coding.0..system Observation smoking-status true ${smoking_status-url} final true true ${12345} missing true true http://loinc.org 72166-2 Tobacco smoking status true valid 2020-02-25 true true http://loinc.org LA18978-9 Never smoker 422 Error parsing JSON: the primitive value must be a string Observation.category.0..coding.0..system @@ -438,7 +438,7 @@ ${randinteger} ${12345} ${1234} smoking-status true ${smoking_status-url} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 This does not appear to be a FHIR resource .unknown name '1234'. 1234 Observation ${1234} true ${smoking_status-url} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.id Observation smoking-status false ${smoking_status-url} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Coding.system must be an absolute reference, not a local reference Observation.value.ofType.CodeableConcept..coding.0. - Observation smoking-status true ${1234} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Profile reference '1234' could not be resolved, so has not been checked Observation.meta.profile.0. + Observation smoking-status true ${1234} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Profile reference '1234' has not been checked because it is unknown Observation.meta.profile.0. Observation smoking-status true ${smoking_status-url} ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.status Observation smoking-status true ${smoking_status-url} final false true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.code.coding.0..system Observation smoking-status true ${smoking_status-url} final true false ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Object must have some content Observation.category.0. From feb435db4bec152648dabaabd32294ecd2aa9d09 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 30 Apr 2021 18:02:20 +0200 Subject: [PATCH 028/141] Fix robot tests --- .../13_create_patient_in_ICU.robot | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/robot/OBSERVATION/13_create_patient_in_ICU.robot b/tests/robot/OBSERVATION/13_create_patient_in_ICU.robot index 6a998cff8..a0b0b635b 100644 --- a/tests/robot/OBSERVATION/13_create_patient_in_ICU.robot +++ b/tests/robot/OBSERVATION/13_create_patient_in_ICU.robot @@ -72,17 +72,17 @@ ${vCC_URL} http://snomed.info/sct # invalid cases for identifier $.subject.identifier missing 422 Object must have some content Observation.subject - $.subject.identifier ${EMPTY} 422 This property must be an Object, not a primitive property Observation.subject.identifier - $.subject.identifier ${{ [] }} 422 This property must be an Object, not an array Observation.subject.identifier + $.subject.identifier ${EMPTY} 422 The property identifier must be an Object, not a primitive property Observation.subject.identifier + $.subject.identifier ${{ [] }} 422 The property identifier must be an Object, not an array Observation.subject.identifier $.subject.identifier ${{ {} }} 422 Object must have some content Observation.subject.identifier - $.subject.identifier ${123} 422 This property must be an Object, not a primitive property Observation.subject.identifier + $.subject.identifier ${123} 422 The property identifier must be an Object, not a primitive property Observation.subject.identifier # invalid cases for subject $.subject missing 422 Observation.subject: minimum required = 1, but only found 0 .from ${patient-ICU-url} - $.subject ${EMPTY} 422 This property must be an Object, not a primitive property Observation.subject - $.subject ${{ [] }} 422 This property must be an Object, not an array Observation.subject + $.subject ${EMPTY} 422 The property subject must be an Object, not a primitive property Observation.subject + $.subject ${{ [] }} 422 The property subject must be an Object, not an array Observation.subject $.subject ${{ {} }} 422 Object must have some content Observation.subject - $.subject ${123} 422 This property must be an Object, not a primitive property Observation.subject + $.subject ${123} 422 The property subject must be an Object, not a primitive property Observation.subject # comment: random uuid regex for uuid $.subject.identifier.value ${{str(uuid.uuid4())}} 422 EhrId not found for subject '([0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})' @@ -147,18 +147,18 @@ ${vCC_URL} http://snomed.info/sct #invalid profil $.meta.profile missing 422 Object must have some content Observation.meta - $.meta.profile ${EMPTY} 422 This property must be an Array, not a a primitive property Observation.meta.profile + $.meta.profile ${EMPTY} 422 This property must be an Array, not a primitive property Observation.meta.profile $.meta.profile[0] ${randinteger} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randinteger}. Observation.meta.profile.0. $.meta.profile[0] ${randstring} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randstring}. Observation.meta.profile.0. $.meta.profile ${{ ["invalid_url"] }} 422 Canonical URLs must be absolute URLs if they are not fragment references .invalid_url. Observation.meta.profile.0. - $.meta.profile ${{ ["http://wrong.url"] }} 422 Profile reference 'http://wrong.url' could not be resolved, so has not been checked Observation.meta.profile.0. + $.meta.profile ${{ ["http://wrong.url"] }} 422 The resource does not contain any supported profile Observation.meta.profile.0. $.meta.profile[0] ${EMPTY} 422 @value cannot be empty Observation.meta.profile.0. # comment: the next one sets the value to an empty list/array [] $.meta.profile ${{ [] }} 422 Default profile is not supported for Observation. One of the following profiles is expected: .https://.* # comment: the next one sets value to an empty object {} - $.meta.profile ${{ {} }} 422 This property must be an Array, not a an object + $.meta.profile ${{ {} }} 422 This property must be an Array, not an object 005 Create Patient in ICU (Invalid/Missing 'Status') @@ -247,7 +247,7 @@ ${vCC_URL} http://snomed.info/sct $.code ${EMPTY} 422 Observation.code: minimum required = 1, but only found 0 .from ${patient-ICU-url} Observation $.code ${{ [] }} 422 Observation.code: minimum required = 1, but only found 0 .from ${patient-ICU-url} Observation $.code ${{ {} }} 422 Object must have some content Observation.code - $.code ${{ [{}] }} 422 This property must be an Object, not an array Observation.code + $.code ${{ [{}] }} 422 The property code must be an Object, not an array Observation.code # invalid coding $.code.coding missing 422 Observation.code.coding: minimum required = 1, but only found 0 Observation.code @@ -342,12 +342,12 @@ ${vCC_URL} http://snomed.info/sct # CODE # missing valueCodeableConcept - $.valueCodeableConcept ${EMPTY} 422 This property must be an Object, not a primitive property Observation.value.x. + $.valueCodeableConcept ${EMPTY} 422 The property valueCodeableConcept must be an Object, not a primitive property Observation.value.x. # wrong format - $.valueCodeableConcept ${{ [] }} 422 This property must be an Object, not an array Observation.value.x. + $.valueCodeableConcept ${{ [] }} 422 The property valueCodeableConcept must be an Object, not an array Observation.value.x. $.valueCodeableConcept ${{ {} }} 422 Object must have some content Observation.value.x. - $.valueCodeableConcept ${{ [{}] }} 422 This property must be an Object, not an array Observation.value.x. + $.valueCodeableConcept ${{ [{}] }} 422 The property valueCodeableConcept must be an Object, not an array Observation.value.x. # missing coding $.valueCodeableConcept.coding missing 422 Object must have some content Observation.value.x. @@ -395,7 +395,7 @@ ${vCC_URL} http://snomed.info/sct ehr.create new ehr 000_ehr_status.json create with DataAbsentReason DataAbsentReason create-patient-in-icu.json - observation.validate response - 422 (with error message) 422 obs-6: dataAbsentReason SHALL only be present if Observation.value.x. is not present .dataAbsentReason.empty.. or value.empty... Observation + observation.validate response - 422 (with error message) 422 obs-6: dataAbsentReason SHALL only be present if Observation.value[x] is not present Observation @@ -416,12 +416,12 @@ ${vCC_URL} http://snomed.info/sct # missing valueCodeableConcept # $.dataAbsentReason missing 422 Index 0 out of bounds for length 0 - $.dataAbsentReason ${EMPTY} 422 This property must be an Object, not a primitive property Observation.dataAbsentReason + $.dataAbsentReason ${EMPTY} 422 The property dataAbsentReason must be an Object, not a primitive property Observation.dataAbsentReason # wrong format valueCodeableConcept - $.dataAbsentReason ${{ [] }} 422 This property must be an Object, not an array Observation.dataAbsentReason + $.dataAbsentReason ${{ [] }} 422 The property dataAbsentReason must be an Object, not an array Observation.dataAbsentReason $.dataAbsentReason ${{ {} }} 422 Object must have some content Observation.dataAbsentReason - $.dataAbsentReason ${{ [{}] }} 422 This property must be an Object, not an array Observation.dataAbsentReason + $.dataAbsentReason ${{ [{}] }} 422 The property dataAbsentReason must be an Object, not an array Observation.dataAbsentReason # missing coding $.dataAbsentReason.coding ${EMPTY} 422 This property must be an Array, not a primitive property Observation.dataAbsentReason.coding @@ -472,7 +472,7 @@ ${vCC_URL} http://snomed.info/sct # all attributes invalid for valueCodeableConcept Observation ${ID} true ${patient-ICU-url} final true true ${category_URL} survey true true ${code_URL} 01 ${code_display} true valid 2020-02-25 true true ${EMPTY} ${EMPTY} ${EMPTY} 422 @value cannot be empty Observation.value.ofType.CodeableConcept..coding.0..display Observation ${ID} true ${patient-ICU-url} final true true ${category_URL} survey true true ${code_URL} 01 ${code_display} true valid 2020-02-25 true true ${1234} test ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.value.x..coding.0..display - Observation ${ID} true ${patient-ICU-url} final true true ${category_URL} survey true true ${code_URL} 01 ${code_display} true valid 2020-02-25 true true ${EMPTY} http://google.com test 422 ele-1: All FHIR elements must have a @value or children Observation.value.ofType.CodeableConcept..coding.0..system + Observation ${ID} true ${patient-ICU-url} final true true ${category_URL} survey true true ${code_URL} 01 ${code_display} true valid 2020-02-25 true true ${EMPTY} http://google.com test 422 ele-1: 'All FHIR elements must have a @value or children' Observation.value.ofType.CodeableConcept..coding.0..system Observation ${ID} true ${patient-ICU-url} final true true ${category_URL} survey true true ${code_URL} 01 ${code_display} true valid 2020-02-25 true true missing ${EMPTY} missing 422 @value cannot be empty Observation.value.ofType.CodeableConcept..coding.0..code Observation ${ID} true ${patient-ICU-url} final true true ${category_URL} survey true true ${code_URL} 01 ${code_display} true valid 2020-02-25 true true ${1234} missing test 422 Error parsing JSON: the primitive value must be a string Observation.value.x..coding.0..system @@ -495,7 +495,7 @@ ${vCC_URL} http://snomed.info/sct ${1234} ${ID} true ${patient-ICU-url} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 This does not appear to be a FHIR resource .unknown name '1234'. 1234 Observation ${1234} true ${patient-ICU-url} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.id Observation ${ID} false ${patient-ICU-url} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Coding.system must be an absolute reference, not a local reference Observation.value.ofType.CodeableConcept..coding.0. - Observation ${ID} true ${1234} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Profile reference '1234' could not be resolved, so has not been checked Observation.meta.profile.0. + Observation ${ID} true ${1234} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Profile reference '1234' has not been checked because it is unknown Observation.meta.profile.0. Observation ${ID} true ${patient-ICU-url} ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.status Observation ${ID} true ${patient-ICU-url} final false true ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.code.coding.0..system Observation ${ID} true ${patient-ICU-url} final true false ${1234} ${1234} true true ${1234} ${1234} ${1234} true valid 2020-02-25 true true ${1234} ${1234} ${1234} 422 Object must have some content Observation.category.0. From 2886cc0438f6e17f1b5333a35ffd82a46bd99f5c Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 4 May 2021 07:57:54 +0200 Subject: [PATCH 029/141] Fix robot tests --- tests/robot/OBSERVATION/03_create_blood_pressure.robot | 10 +++++----- .../robot/OBSERVATION/06_create_body_temperature.robot | 4 ++-- tests/robot/OBSERVATION/12_create_body_height.robot | 4 ++-- tests/robot/OBSERVATION/13_create_patient_in_ICU.robot | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/robot/OBSERVATION/03_create_blood_pressure.robot b/tests/robot/OBSERVATION/03_create_blood_pressure.robot index e6622048c..c8e360203 100644 --- a/tests/robot/OBSERVATION/03_create_blood_pressure.robot +++ b/tests/robot/OBSERVATION/03_create_blood_pressure.robot @@ -57,12 +57,12 @@ ${profile url} https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefi $.subject.identifier ${EMPTY} 0 422 The property identifier must be an Object, not a primitive property Observation.subject.identifier $.subject.identifier ${{ [] }} 0 422 The property identifier must be an Object, not an array Observation.subject.identifier $.subject.identifier ${{ {} }} 0 422 Object must have some content Observation.subject.identifier - $.subject.identifier ${123} 0 422 This property must be an Object, not a primitive property Observation.subject.identifier + $.subject.identifier ${123} 0 422 The property identifier must be an Object, not a primitive property Observation.subject.identifier $.subject missing 0 422 Observation.subject: minimum required = 1, but only found 0 .from ${profile url} $.subject ${EMPTY} 0 422 The property subject must be an Object, not a primitive property Observation.subject - $.subject ${{ [] }} 0 422 This property must be an Object, not an array Observation.subject + $.subject ${{ [] }} 0 422 The property subject must be an Object, not an array Observation.subject $.subject ${{ {} }} 0 422 Object must have some content Observation.subject - $.subject ${123} 0 422 This property must be an Object, not a primitive property Observation.subject + $.subject ${123} 0 422 The property subject must be an Object, not a primitive property Observation.subject # comment: random uuid regex for uuid $.subject.identifier.value ${{str(uuid.uuid4())}} 0 422 EhrId not found for subject '[0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}' @@ -103,14 +103,14 @@ ${profile url} https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefi $.meta missing 0 422 Default profile is not supported for Observation. One of the following profiles is expected: .https://.* $.meta.profile missing 0 422 Object must have some content $.meta.profile ${{ ["invalid_url"] }} 0 422 Canonical URLs must be absolute URLs if they are not fragment references .invalid_url. - $.meta.profile ${{ ["http://wrong.url"] }} 0 422 Profile reference 'http://wrong.url' could not be resolved, so has not been checked + $.meta.profile ${{ ["http://wrong.url"] }} 0 422 Profile reference 'http://wrong.url' could not be resolved, so has not been checked $.meta.profile ${EMPTY} 0 422 This property must be an Array, not a a primitive property # comment: the next one sets the value to an empty list/array [] $.meta.profile ${{ [] }} 0 422 Default profile is not supported for Observation. One of the following profiles is expected: .https://.* # comment: the next one sets value to an empty object {} - $.meta.profile ${{ {} }} 0 422 This property must be an Array, not a an object + $.meta.profile ${{ {} }} 0 422 This property must be an Array, not an object diff --git a/tests/robot/OBSERVATION/06_create_body_temperature.robot b/tests/robot/OBSERVATION/06_create_body_temperature.robot index 04198f0a8..07888ab06 100644 --- a/tests/robot/OBSERVATION/06_create_body_temperature.robot +++ b/tests/robot/OBSERVATION/06_create_body_temperature.robot @@ -342,7 +342,7 @@ Force Tags observation_create body-temperature create [Tags] invalid multi [Template] create Observation Body Temperature JSON -#| ressourceType | ID | meta | status | Identifier | category | code | subject | DateTime | valueQuantity | dataabsentreason | R.-Code | ArrayNumber | diagnostics | +#| ressourceType | ID | meta | status | Identifier | category | code | subject | DateTime | valueQuantity | dataabsentreason | R.-Code | ArrayNumber | diagnostics | #| | | available | profile | | available | coding.system | coding.code | system | value | assigner | reference | available | codingavailable | system | code | available | coding available | 0.system | 0.code | 0.display | 1.system | 1.code | 1.display | text | available | Identifier-value | | available | value | unit | system | code | | | | ENG | DE | # all attributes invalid for valueQuantity Observation body-temperature true http://hl7.org/fhir/StructureDefinition/bodytemp final true http://terminology.hl7.org/CodeSystem/v2-0203 OBI https://www.charite.de/fhir/CodeSystem/observation-identifiers 8310-5_BodyTemperature true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8310-5 Body Temperature http://snomed.info/sct 386725007 Body Temperature (observable entity) Body Temperature true valid 2020-02-25 true ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} false 422 2 @value cannot be empty @value kann nicht leer sein @@ -373,7 +373,7 @@ Force Tags observation_create body-temperature create ${1234} body-temperature true http://hl7.org/fhir/StructureDefinition/bodytemp final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 0 This does not appear to be a FHIR resource Dies scheint keine FHIR-Ressource zu sein Observation ${1234} true http://hl7.org/fhir/StructureDefinition/bodytemp final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 30 Value is '1234' but must be Wert ist Observation body-temperature false http://hl7.org/fhir/StructureDefinition/bodytemp final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 23 The value 'test' is not a valid decimal ist kein gültiger Dezimalwert. - Observation body-temperature true ${1234} final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 26 Profile reference '1234' could not be resolved, so has not been checked konnte nicht aufgelöst werden, wurde also nicht überprüft + Observation body-temperature true ${1234} final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 26 Profile reference '1234' has not been checked because it is unknown konnte nicht aufgelöst werden, wurde also nicht überprüft Observation body-temperature true http://hl7.org/fhir/StructureDefinition/bodytemp ${1234} true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 30 Value is '1234' but must be Wert ist Observation body-temperature true http://hl7.org/fhir/StructureDefinition/bodytemp final false test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 23 Value is '1234' but must be Wert ist Observation body-temperature true http://hl7.org/fhir/StructureDefinition/bodytemp final true test ${1234} ${1234} ${1234} false ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 28 Value is '1234' but must be Wert ist diff --git a/tests/robot/OBSERVATION/12_create_body_height.robot b/tests/robot/OBSERVATION/12_create_body_height.robot index 4f627c19a..95b7844db 100644 --- a/tests/robot/OBSERVATION/12_create_body_height.robot +++ b/tests/robot/OBSERVATION/12_create_body_height.robot @@ -399,7 +399,7 @@ ${vQSystem} http://unitsofmeasure.org # invalid/missing valueQuantity $.valueQuantity missing 422 .*If there is no component or hasMember element then either a value.x. or a data absent reason must be present - $.valueQuantity ${None} 422 This property must be an Object, not null + $.valueQuantity ${None} 422 The property valueQuantity must be an Object, not null $.valueQuantity ${{ {} }} 422 Observation.value.x.:valueQuantity.value: minimum required = 1, but only found 0 .from ${body_height-url} $.valueQuantity ${{ {} }} 422 Observation.value.x.:valueQuantity.unit: minimum required = 1, but only found 0 .from ${body_height-url} $.valueQuantity ${{ {} }} 422 Observation.value.x.:valueQuantity.system: minimum required = 1, but only found 0 .from ${body_height-url} @@ -413,7 +413,7 @@ ${vQSystem} http://unitsofmeasure.org # invalid value $.valueQuantity.value ${EMPTY} 422 Error parsing JSON: the primitive value must be a number - $.valueQuantity.value ${None} 422 The property valueQuantity must be an Object, not null + $.valueQuantity.value ${None} 422 This property must be an simple value, not null $.valueQuantity.value 113 422 Error parsing JSON: the primitive value must be a number $.valueQuantity.value ${1001} 422 .*value is not within interval, expected:0.0 <= 1001.0 <= 1000.0.*Bad Request.* $.valueQuantity.value ${1000.09} 422 .*value is not within interval, expected:0.0 <= 1000.09 <= 1000.0.*Bad Request.* diff --git a/tests/robot/OBSERVATION/13_create_patient_in_ICU.robot b/tests/robot/OBSERVATION/13_create_patient_in_ICU.robot index a0b0b635b..0bdaca952 100644 --- a/tests/robot/OBSERVATION/13_create_patient_in_ICU.robot +++ b/tests/robot/OBSERVATION/13_create_patient_in_ICU.robot @@ -395,7 +395,7 @@ ${vCC_URL} http://snomed.info/sct ehr.create new ehr 000_ehr_status.json create with DataAbsentReason DataAbsentReason create-patient-in-icu.json - observation.validate response - 422 (with error message) 422 obs-6: dataAbsentReason SHALL only be present if Observation.value[x] is not present Observation + observation.validate response - 422 (with error message) 422 obs-6: dataAbsentReason SHALL only be present if Observation.value[x] is not present Observation From 1737ffa8754c06e7df7a2ce8113eee425e4d2bc3 Mon Sep 17 00:00:00 2001 From: MDSchulze <mareike.schulze@plri.de> Date: Tue, 4 May 2021 09:47:11 +0200 Subject: [PATCH 030/141] Test --- .../definition/ArtDerEntlassungDefiningCode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/ArtDerEntlassungDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/ArtDerEntlassungDefiningCode.java index 9863edd9b..5b95ae9b7 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/ArtDerEntlassungDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/definition/ArtDerEntlassungDefiningCode.java @@ -56,4 +56,4 @@ public DvCodedText toDvCodedText(){ return dvCodedText; } -} +} \ No newline at end of file From b87f50de197985636bdb7ebd3d4850acb68b10c9 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 4 May 2021 10:05:17 +0200 Subject: [PATCH 031/141] - Resolves #324 Support for Immunization resource --- pom.xml | 2 +- .../CreateImmunizationComponent.java | 34 + .../FindImmunizationComponent.java | 34 + .../FindMedicationStatementComponent.java | 4 +- .../camel/route/ImmunizationRoutes.java | 60 + .../config/ConversionConfiguration.java | 20 +- .../config/FhirJpaConfiguration.java | 9 + .../fhirbridge/fhir/common/Profile.java | 62 +- .../common/audit/FhirBridgeEventType.java | 4 + .../CreateImmunizationAuditStrategy.java | 35 + .../CreateImmunizationProvider.java | 42 + .../CreateImmunizationTransaction.java | 42 + .../FindImmunizationAuditStrategy.java | 44 + .../FindImmunizationProvider.java | 126 + .../FindImmunizationTransaction.java | 42 + .../CreateMedicationStatementProvider.java | 4 +- .../FindMedicationStatementProvider.java | 50 +- .../fhirbridge/fhir/support/Resources.java | 3 + .../camel/component/immunization-create | 1 + .../apache/camel/component/immunization-find | 1 + src/main/resources/profiles/Immunization.xml | 5596 +++++++++++++++++ 21 files changed, 6135 insertions(+), 80 deletions(-) create mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/CreateImmunizationComponent.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/FindImmunizationComponent.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/route/ImmunizationRoutes.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationAuditStrategy.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationProvider.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationTransaction.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationAuditStrategy.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationProvider.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationTransaction.java create mode 100644 src/main/resources/META-INF/services/org/apache/camel/component/immunization-create create mode 100644 src/main/resources/META-INF/services/org/apache/camel/component/immunization-find create mode 100644 src/main/resources/profiles/Immunization.xml diff --git a/pom.xml b/pom.xml index 9f00245db..a8b1985cf 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ <groupId>org.ehrbase.fhirbridge</groupId> <artifactId>fhir-bridge</artifactId> - <version>1.1.0</version> + <version>1.2.0-SNAPSHOT</version> <name>FHIR Bridge</name> diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/CreateImmunizationComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/CreateImmunizationComponent.java new file mode 100644 index 000000000..36c8955e0 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/CreateImmunizationComponent.java @@ -0,0 +1,34 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.camel.component.fhir.immunization; + +import org.ehrbase.fhirbridge.fhir.immunization.CreateImmunizationTransaction; +import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; +import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; + +/** + * {@link CustomFhirComponent} that handles 'Create Immunization' transaction. + * + * @since 1.2.0 + */ +@SuppressWarnings({"java:S110"}) +public class CreateImmunizationComponent extends CustomFhirComponent<GenericFhirAuditDataset> { + + public CreateImmunizationComponent() { + super(new CreateImmunizationTransaction()); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/FindImmunizationComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/FindImmunizationComponent.java new file mode 100644 index 000000000..0184e04a5 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/FindImmunizationComponent.java @@ -0,0 +1,34 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.camel.component.fhir.immunization; + +import org.ehrbase.fhirbridge.fhir.immunization.FindImmunizationTransaction; +import org.openehealth.ipf.commons.ihe.fhir.audit.FhirQueryAuditDataset; +import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; + +/** + * {@link CustomFhirComponent} that handles 'Find Immunization' transaction. + * + * @since 1.2.0 + */ +@SuppressWarnings({"java:S110"}) +public class FindImmunizationComponent extends CustomFhirComponent<FhirQueryAuditDataset> { + + public FindImmunizationComponent() { + super(new FindImmunizationTransaction()); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/medicationstatement/FindMedicationStatementComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/medicationstatement/FindMedicationStatementComponent.java index 7ccb4e67c..861f00ed4 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/medicationstatement/FindMedicationStatementComponent.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/medicationstatement/FindMedicationStatementComponent.java @@ -16,7 +16,7 @@ package org.ehrbase.fhirbridge.camel.component.fhir.medicationstatement; -import org.ehrbase.fhirbridge.fhir.observation.FindObservationTransaction; +import org.ehrbase.fhirbridge.fhir.medicationstatement.FindMedicationStatementTransaction; import org.openehealth.ipf.commons.ihe.fhir.audit.FhirQueryAuditDataset; import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; @@ -29,6 +29,6 @@ public class FindMedicationStatementComponent extends CustomFhirComponent<FhirQueryAuditDataset> { public FindMedicationStatementComponent() { - super(new FindObservationTransaction()); + super(new FindMedicationStatementTransaction()); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ImmunizationRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ImmunizationRoutes.java new file mode 100644 index 000000000..fa1e61201 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ImmunizationRoutes.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package org.ehrbase.fhirbridge.camel.route; + +import org.ehrbase.fhirbridge.camel.FhirBridgeConstants; +import org.springframework.stereotype.Component; + +/** + * Implementation of {@link AbstractRouteBuilder} that provides route definitions + * for transactions linked to {@link org.hl7.fhir.r4.model.Immunization Immunization} resource. + * + * @since 1.2.0 + */ +@Component +public class ImmunizationRoutes extends AbstractRouteBuilder { + + @Override + public void configure() throws Exception { + // @formatter:off + super.configure(); + + // 'Create Immunization' route definition + from("immunization-create:consumer?fhirContext=#fhirContext") + .onCompletion() + .process("auditCreateResourceProcessor") + .end() + .process("resourceProfileValidator") + .setHeader(FhirBridgeConstants.METHOD_OUTCOME, method("immunizationDao", "create(${body}, ${headers.FhirRequestDetails})")) + .process("ehrIdLookupProcessor") + .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") + .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") + .process("resourceResponseProcessor"); + + // 'Find Immunization' route definition + from("immunization-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") + .choice() + .when(isSearchOperation()) + .to("bean:immunizationDao?method=search(${body}, ${headers.FhirRequestDetails})") + .process("bundleProviderResponseProcessor") + .otherwise() + .to("bean:immunizationDao?method=read(${body}, ${headers.FhirRequestDetails})"); + + // @formatter:on + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java index e923c7ae2..036e39652 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java @@ -40,17 +40,18 @@ public class ConversionConfiguration { @Bean(name = "fhirResourceConversionService") public ConversionService conversionService() { - ConversionService conversionService = new ConversionService(); + var conversionService = new ConversionService(); // Register Resource Converters registerConditionConverters(conversionService); registerConsentConverters(conversionService); registerDiagnosticReportConverters(conversionService); + registerImmunizationConverters(conversionService); + registerMedicationStatementConverter(conversionService); registerObservationConverters(conversionService); registerPatientConverters(conversionService); registerProcedureConverters(conversionService); registerQuestionnaireResponseConverter(conversionService); - registerMedicationStatementConverter(conversionService); return conversionService; } @@ -85,10 +86,10 @@ private void registerDiagnosticReportConverters(ConversionService conversionServ } private void registerObservationConverters(ConversionService conversionService) { - conversionService.registerConverter(Profile.BODY_HEIGHT, new BodyHeightCompositionConverter()); - conversionService.registerConverter(Profile.BLOOD_GAS_PANEL, new BloodGasPanelCompositionConverter()); conversionService.registerConverter(Profile.ANTI_BODY_PANEL, new GECCOSerologischerBefundCompositionConverter()); + conversionService.registerConverter(Profile.BLOOD_GAS_PANEL, new BloodGasPanelCompositionConverter()); conversionService.registerConverter(Profile.BLOOD_PRESSURE, new BloodPressureCompositionConverter()); + conversionService.registerConverter(Profile.BODY_HEIGHT, new BodyHeightCompositionConverter()); conversionService.registerConverter(Profile.BODY_TEMP, new BodyTemperatureCompositionConverter()); conversionService.registerConverter(Profile.BODY_WEIGHT, new BodyWeightCompositionConverter()); conversionService.registerConverter(Profile.CLINICAL_FRAILTY_SCALE, new ClinicalFrailtyScaleScoreCompositionConverter()); @@ -100,12 +101,11 @@ private void registerObservationConverters(ConversionService conversionService) conversionService.registerConverter(Profile.PCR, new PCRCompositionConverter()); conversionService.registerConverter(Profile.PREGNANCY_STATUS, new PregnancyStatusCompositionConverter()); conversionService.registerConverter(Profile.OBSERVATION_LAB, new ObservationLabCompositionConverter()); + conversionService.registerConverter(Profile.OXYGEN_SATURATION, new PulseOximetryCompositionConverter()); conversionService.registerConverter(Profile.RESPIRATORY_RATE, new RespiratoryRateCompositionConverter()); conversionService.registerConverter(Profile.SOFA_SCORE, new SofaScoreCompositionConverter()); conversionService.registerConverter(Profile.SMOKING_STATUS, new SmokingStatusCompositionConverter()); - conversionService.registerConverter(Profile.TRAVEL_HISTORY, new HistoryOfTravelCompositionConverter()); - conversionService.registerConverter(Profile.OXYGEN_SATURATION, new PulseOximetryCompositionConverter()); } private void registerPatientConverters(ConversionService conversionService) { @@ -115,7 +115,7 @@ private void registerPatientConverters(ConversionService conversionService) { private void registerProcedureConverters(ConversionService conversionService) { conversionService.registerConverter(Profile.PROCEDURE, new ProcedureCompositionConverter()); - TherapyCompositionConverter therapyCompositionConverter = new TherapyCompositionConverter(); + var therapyCompositionConverter = new TherapyCompositionConverter(); conversionService.registerConverter(Profile.APHERESIS_PROCEDURE, therapyCompositionConverter); conversionService.registerConverter(Profile.DIALYSIS_PROCEDURE, therapyCompositionConverter); conversionService.registerConverter(Profile.EXTRACORPOREAL_MEMBRANE_OXYGENATION_PROCEDURE, therapyCompositionConverter); @@ -129,10 +129,14 @@ private void registerQuestionnaireResponseConverter(ConversionService conversion } private void registerMedicationStatementConverter(ConversionService conversionService) { - GECCOMedikationCompositionConverter converter = new GECCOMedikationCompositionConverter(); + var converter = new GECCOMedikationCompositionConverter(); conversionService.registerConverter(Profile.PHARMACOLOGICAL_THERAPY, converter); conversionService.registerConverter(Profile.PHARMACOLOGICAL_THERAPY_ACE_INHIBITORS, converter); conversionService.registerConverter(Profile.PHARMACOLOGICAL_THERAPY_ANTICOAGULANTS, converter); conversionService.registerConverter(Profile.PHARMACOLOGICAL_THERAPY_IMMUNOGLOBULINS, converter); } + + private void registerImmunizationConverters(ConversionService conversionService) { + conversionService.registerConverter(Profile.HISTORY_OF_VACCINATION, null); // TODO: @SevKohler + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/config/FhirJpaConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/FhirJpaConfiguration.java index 24069c307..f80871024 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/FhirJpaConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/FhirJpaConfiguration.java @@ -40,6 +40,7 @@ import org.hl7.fhir.r4.model.Device; import org.hl7.fhir.r4.model.DiagnosticReport; import org.hl7.fhir.r4.model.Group; +import org.hl7.fhir.r4.model.Immunization; import org.hl7.fhir.r4.model.Location; import org.hl7.fhir.r4.model.MedicationStatement; import org.hl7.fhir.r4.model.Observation; @@ -173,6 +174,14 @@ public IFhirResourceDao<Group> groupDao() { return resourceDao; } + @Bean + public IFhirResourceDao<Immunization> immunizationDao() { + JpaResourceDao<Immunization> resourceDao = new JpaResourceDao<>(); + resourceDao.setResourceType(Immunization.class); + resourceDao.setContext(fhirContext()); + return resourceDao; + } + @Bean public IFhirResourceDao<Location> locationDao() { JpaResourceDao<Location> resourceDao = new JpaResourceDao<>(); diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java index b834e74e6..e715d5d20 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java @@ -3,6 +3,7 @@ import org.hl7.fhir.r4.model.Condition; import org.hl7.fhir.r4.model.Consent; import org.hl7.fhir.r4.model.DiagnosticReport; +import org.hl7.fhir.r4.model.Immunization; import org.hl7.fhir.r4.model.MedicationStatement; import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Patient; @@ -21,23 +22,21 @@ public enum Profile { // Condition Profiles DEFAULT_CONDITION(Condition.class, null), - - SYMPTOMS_COVID_19(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/symptoms-covid-19"), - - DIAGNOSE_LIVER_DISEASE(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/chronic-liver-diseases"), - DIAGNOSE_LUNG_DISEASE(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/chronic-lung-diseases"), - DIAGNOSE_DIABETES_MELLITUS(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/diabetes-mellitus"), - DIAGNOSE_COVID_19(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/diagnosis-covid-19"), - DIAGNOSE_MALIGNANT_NEOPLASTIC_DISEASE(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/malignant-neoplastic-disease"), - DIAGNOSE_RHEUMATOLOGICAL_IMMUNOLOGICAL_DISEASE(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/rheumatological-immunological-diseases"), DIAGNOSE_CARDIOVASCULAR_DISEASE(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/cardiovascular-diseases"), DIAGNOSE_CHRONIC_KIDNEY_DISEASE(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/chronic-kidney-diseases"), DIAGNOSE_CHRONIC_NEUROLOGICAL_MENTAL_DISEASE(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/chronic-neurological-mental-diseases"), + DIAGNOSE_COMPLICATIONS_COVID_19(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/complications-covid-19"), + DIAGNOSE_COVID_19(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/diagnosis-covid-19"), + DIAGNOSE_DEPENDENCE_ON_VENTILATOR(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/dependence-on-ventilator"), + DIAGNOSE_DIABETES_MELLITUS(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/diabetes-mellitus"), DIAGNOSE_GASTROINTESTINAL_ULCERS(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/gastrointestinal-ulcers"), DIAGNOSE_HIV(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/human-immunodeficiency-virus-infection"), + DIAGNOSE_LIVER_DISEASE(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/chronic-liver-diseases"), + DIAGNOSE_LUNG_DISEASE(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/chronic-lung-diseases"), + DIAGNOSE_MALIGNANT_NEOPLASTIC_DISEASE(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/malignant-neoplastic-disease"), DIAGNOSE_ORGAN_RECIPIENT(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/organ-recipient"), - DIAGNOSE_COMPLICATIONS_COVID_19(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/complications-covid-19"), - DIAGNOSE_DEPENDENCE_ON_VENTILATOR(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/dependence-on-ventilator"), + DIAGNOSE_RHEUMATOLOGICAL_IMMUNOLOGICAL_DISEASE(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/rheumatological-immunological-diseases"), + SYMPTOMS_COVID_19(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/symptoms-covid-19"), // Consent Profiles @@ -46,11 +45,14 @@ public enum Profile { // DiagnosticReport Profiles DIAGNOSTIC_REPORT_LAB(DiagnosticReport.class, "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/DiagnosticReportLab"), - DIAGNOSTIC_REPORT_RADIOLOGY(DiagnosticReport.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/diagnostic-report-radiology"), + // Immunization Profiles + + HISTORY_OF_VACCINATION(Immunization.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization"), // MedicationStatement Profiles + PHARMACOLOGICAL_THERAPY(MedicationStatement.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pharmacological-therapy"), PHARMACOLOGICAL_THERAPY_ACE_INHIBITORS(MedicationStatement.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pharmacological-therapy-ace-inhibitors"), PHARMACOLOGICAL_THERAPY_ANTICOAGULANTS(MedicationStatement.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pharmacological-therapy-anticoagulants"), @@ -58,51 +60,29 @@ public enum Profile { // Observation Profiles - TRAVEL_HISTORY(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/history-of-travel"), - - BODY_HEIGHT(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/body-height"), - + ANTI_BODY_PANEL(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-ab-pnl-ser-pl-ia"), BLOOD_GAS_PANEL(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-gas-panel"), - BLOOD_PRESSURE(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-pressure"), - + BODY_HEIGHT(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/body-height"), BODY_TEMP(Observation.class, "http://hl7.org/fhir/StructureDefinition/bodytemp"), - BODY_WEIGHT(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/body-weight"), - CLINICAL_FRAILTY_SCALE(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/frailty-score"), - CORONARIRUS_NACHWEIS_TEST(Observation.class, "https://charite.infectioncontrol.de/fhir/core/StructureDefinition/CoronavirusNachweisTest"), - FIO2(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/inhaled-oxygen-concentration"), - HEART_RATE(Observation.class, "http://hl7.org/fhir/StructureDefinition/heartrate"), - KNOWN_EXPOSURE(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/known-exposure"), - + OBSERVATION_LAB(Observation.class, "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ObservationLab"), + OXYGEN_SATURATION(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/oxygen-saturation"), PACO2(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/carbon-dioxide-partial-pressure"), - PAO2(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/oxygen-partial-pressure"), - PATIENT_IN_ICU(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/patient-in-icu"), - PCR(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-rt-pcr"), - PH(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pH"), - PREGNANCY_STATUS(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pregnancy-status"), - - OBSERVATION_LAB(Observation.class, "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ObservationLab"), - - OXYGEN_SATURATION(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/oxygen-saturation"), - RESPIRATORY_RATE(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/respiratory-rate"), - SOFA_SCORE(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sofa-score"), - SMOKING_STATUS(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/smoking-status"), - - ANTI_BODY_PANEL(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-ab-pnl-ser-pl-ia"), + TRAVEL_HISTORY(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/history-of-travel"), // Patient Profiles @@ -110,12 +90,10 @@ public enum Profile { // Procedure Profiles - PROCEDURE(Procedure.class, "https://www.medizininformatik-initiative.de/fhir/core/modul-prozedur/StructureDefinition/Procedure"), - - APHERESIS_PROCEDURE(Procedure.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/apheresis"), DIALYSIS_PROCEDURE(Procedure.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/dialysis"), EXTRACORPOREAL_MEMBRANE_OXYGENATION_PROCEDURE(Procedure.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/extracorporeal-membrane-oxygenation"), + PROCEDURE(Procedure.class, "https://www.medizininformatik-initiative.de/fhir/core/modul-prozedur/StructureDefinition/Procedure"), PRONE_POSITION_PROCEDURE(Procedure.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/prone-position"), RADIOLOGY_PROCEDURE(Procedure.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/radiology-procedures"), RESPIRATORY_THERAPIES_PROCEDURE(Procedure.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/respiratory-therapies"), diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java b/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java index 46eb096c0..0a772c413 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java @@ -20,6 +20,10 @@ public enum FhirBridgeEventType implements EventType, EnumeratedCodedValue<Event FindDiagnosticReport("diagnostic-report-find", "Find Diagnostic Report"), + CreateImmunization("immunization-create", "Create Immunization"), + + FindImmunization("immunization-find", "Find Immunization"), + CreateMedicationStatement("medication-statement-create", "Create Medication Statement"), FindMedicationStatement("medication-statement-find", "Find Medication Statement"), diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationAuditStrategy.java new file mode 100644 index 000000000..4ec293b26 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationAuditStrategy.java @@ -0,0 +1,35 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.immunization; + +import org.hl7.fhir.r4.model.Immunization; +import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditStrategy; +import org.openehealth.ipf.commons.ihe.fhir.support.OperationOutcomeOperations; + +import java.util.Optional; + +/** + * Custom implementation of {@link GenericFhirAuditStrategy} for 'Create Immunization' transaction. + * + * @since 1.2.0 + */ +public class CreateImmunizationAuditStrategy extends GenericFhirAuditStrategy<Immunization> { + + public CreateImmunizationAuditStrategy() { + super(true, OperationOutcomeOperations.INSTANCE, immunization -> Optional.of(immunization.getPatient())); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationProvider.java new file mode 100644 index 000000000..f2616aa1d --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationProvider.java @@ -0,0 +1,42 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.immunization; + +import ca.uhn.fhir.rest.annotation.Create; +import ca.uhn.fhir.rest.annotation.ResourceParam; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import org.hl7.fhir.r4.model.Immunization; +import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Concrete implementation of {@link AbstractPlainProvider} that provides REST support + * for 'Create Immunization' transaction. + * + * @since 1.2.0 + */ +public class CreateImmunizationProvider extends AbstractPlainProvider { + + @Create + public MethodOutcome create(@ResourceParam Immunization observation, RequestDetails requestDetails, + HttpServletRequest request, HttpServletResponse response) { + return requestAction(observation, null, request, response, requestDetails); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationTransaction.java new file mode 100644 index 000000000..259abc30d --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationTransaction.java @@ -0,0 +1,42 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.immunization; + +import ca.uhn.fhir.context.FhirVersionEnum; +import org.openehealth.ipf.commons.ihe.fhir.FhirTransactionConfiguration; +import org.openehealth.ipf.commons.ihe.fhir.FhirTransactionValidator; +import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; + +/** + * {@link FhirTransactionConfiguration} for 'Create Immunization'. + * + * @since 1.2.0 + */ +public class CreateImmunizationTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { + + public CreateImmunizationTransaction() { + super("immunization-create", + "Create Immunization", + false, + null, + new CreateImmunizationAuditStrategy(), + FhirVersionEnum.R4, + new CreateImmunizationProvider(), + null, + FhirTransactionValidator.NO_VALIDATION); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationAuditStrategy.java new file mode 100644 index 000000000..b1a919a05 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationAuditStrategy.java @@ -0,0 +1,44 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.immunization; + +import org.ehrbase.fhirbridge.fhir.common.audit.FhirBridgeEventType; +import org.openehealth.ipf.commons.audit.AuditContext; +import org.openehealth.ipf.commons.audit.model.AuditMessage; +import org.openehealth.ipf.commons.ihe.core.atna.event.QueryInformationBuilder; +import org.openehealth.ipf.commons.ihe.fhir.audit.FhirQueryAuditDataset; +import org.openehealth.ipf.commons.ihe.fhir.audit.FhirQueryAuditStrategy; +import org.openehealth.ipf.commons.ihe.fhir.support.OperationOutcomeOperations; + +/** + * Custom implementation of {@link FhirQueryAuditStrategy} for 'Find Immunization' transaction. + * + * @since 1.2.0 + */ +public class FindImmunizationAuditStrategy extends FhirQueryAuditStrategy { + + public FindImmunizationAuditStrategy() { + super(true, OperationOutcomeOperations.INSTANCE); + } + + @Override + public AuditMessage[] makeAuditMessage(AuditContext auditContext, FhirQueryAuditDataset auditDataset) { + return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FindImmunization) + .addPatients(auditDataset.getPatientIds()) + .getMessages(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationProvider.java new file mode 100644 index 000000000..ac8aefd5a --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationProvider.java @@ -0,0 +1,126 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.immunization; + +import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.rest.annotation.Count; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.annotation.Offset; +import ca.uhn.fhir.rest.annotation.OptionalParam; +import ca.uhn.fhir.rest.annotation.Read; +import ca.uhn.fhir.rest.annotation.Search; +import ca.uhn.fhir.rest.annotation.Sort; +import ca.uhn.fhir.rest.api.Constants; +import ca.uhn.fhir.rest.api.SortSpec; +import ca.uhn.fhir.rest.api.server.IBundleProvider; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import ca.uhn.fhir.rest.param.DateRangeParam; +import ca.uhn.fhir.rest.param.ReferenceAndListParam; +import ca.uhn.fhir.rest.param.StringAndListParam; +import ca.uhn.fhir.rest.param.TokenAndListParam; +import ca.uhn.fhir.rest.param.UriAndListParam; +import org.hl7.fhir.instance.model.api.IAnyResource; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.Immunization; +import org.hl7.fhir.r4.model.ResourceType; +import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Concrete implementation of {@link AbstractPlainProvider} that provides REST support + * for 'Find Immunization' transaction. + * + * @since 1.2.0 + */ +@SuppressWarnings({"unused", "java:S107", "DuplicatedCode"}) +public class FindImmunizationProvider extends AbstractPlainProvider { + + @Search(type = Immunization.class) + public IBundleProvider search(@OptionalParam(name = IAnyResource.SP_RES_ID) TokenAndListParam id, + @OptionalParam(name = IAnyResource.SP_RES_LANGUAGE) StringAndListParam language, + @OptionalParam(name = Constants.PARAM_LASTUPDATED) DateRangeParam lastUpdated, + @OptionalParam(name = Constants.PARAM_PROFILE) UriAndListParam profile, + @OptionalParam(name = Constants.PARAM_SOURCE) UriAndListParam resourceSource, + @OptionalParam(name = Constants.PARAM_SECURITY) TokenAndListParam security, + @OptionalParam(name = Constants.PARAM_TAG) TokenAndListParam tag, + @OptionalParam(name = Constants.PARAM_CONTENT) StringAndListParam content, + @OptionalParam(name = Constants.PARAM_TEXT) StringAndListParam text, + @OptionalParam(name = Constants.PARAM_FILTER) StringAndListParam filter, + @OptionalParam(name = Immunization.SP_DATE) DateRangeParam date, + @OptionalParam(name = Immunization.SP_IDENTIFIER) TokenAndListParam identifier, + @OptionalParam(name = Immunization.SP_LOCATION) ReferenceAndListParam location, + @OptionalParam(name = Immunization.SP_LOT_NUMBER) StringAndListParam lotNumber, + @OptionalParam(name = Immunization.SP_MANUFACTURER) ReferenceAndListParam manufacturer, + @OptionalParam(name = Immunization.SP_PATIENT) ReferenceAndListParam patient, + @OptionalParam(name = Immunization.SP_PERFORMER) ReferenceAndListParam performer, + @OptionalParam(name = Immunization.SP_REACTION) ReferenceAndListParam reaction, + @OptionalParam(name = Immunization.SP_REACTION_DATE) DateRangeParam reactionDate, + @OptionalParam(name = Immunization.SP_REASON_CODE) TokenAndListParam reasonCode, + @OptionalParam(name = Immunization.SP_REASON_REFERENCE) ReferenceAndListParam reasonReference, + @OptionalParam(name = Immunization.SP_SERIES) StringAndListParam series, + @OptionalParam(name = Immunization.SP_STATUS) TokenAndListParam status, + @OptionalParam(name = Immunization.SP_STATUS_REASON) TokenAndListParam statusReason, + @OptionalParam(name = Immunization.SP_TARGET_DISEASE) TokenAndListParam targetDisease, + @OptionalParam(name = Immunization.SP_VACCINE_CODE) TokenAndListParam vaccineCode, + @Count Integer count, @Offset Integer offset, @Sort SortSpec sort, + RequestDetails requestDetails, HttpServletRequest request, HttpServletResponse response) { + + var searchParams = new SearchParameterMap(); + searchParams.add(IAnyResource.SP_RES_ID, id); + searchParams.add(IAnyResource.SP_RES_LANGUAGE, language); + + searchParams.add(Constants.PARAM_PROFILE, profile); + searchParams.add(Constants.PARAM_SOURCE, resourceSource); + searchParams.add(Constants.PARAM_SECURITY, security); + searchParams.add(Constants.PARAM_TAG, tag); + searchParams.add(Constants.PARAM_CONTENT, content); + searchParams.add(Constants.PARAM_TEXT, text); + searchParams.add(Constants.PARAM_FILTER, filter); + + searchParams.add(Immunization.SP_DATE, date); + searchParams.add(Immunization.SP_IDENTIFIER, identifier); + searchParams.add(Immunization.SP_LOCATION, location); + searchParams.add(Immunization.SP_LOT_NUMBER, lotNumber); + searchParams.add(Immunization.SP_MANUFACTURER, manufacturer); + searchParams.add(Immunization.SP_PATIENT, patient); + searchParams.add(Immunization.SP_PERFORMER, performer); + searchParams.add(Immunization.SP_REACTION, reaction); + searchParams.add(Immunization.SP_REACTION_DATE, reactionDate); + searchParams.add(Immunization.SP_REASON_CODE, reasonCode); + searchParams.add(Immunization.SP_REASON_CODE, reasonCode); + searchParams.add(Immunization.SP_SERIES, series); + searchParams.add(Immunization.SP_STATUS, status); + searchParams.add(Immunization.SP_STATUS_REASON, statusReason); + searchParams.add(Immunization.SP_TARGET_DISEASE, targetDisease); + searchParams.add(Immunization.SP_VACCINE_CODE, vaccineCode); + + searchParams.setLastUpdated(lastUpdated); + searchParams.setCount(count); + searchParams.setOffset(offset); + searchParams.setSort(sort); + + return requestBundleProvider(searchParams, null, ResourceType.Immunization.name(), request, response, requestDetails); + } + + @Read(version = true) + public Immunization read(@IdParam IdType id, RequestDetails requestDetails, + HttpServletRequest request, HttpServletResponse response) { + return requestResource(id, null, Immunization.class, request, response, requestDetails); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationTransaction.java new file mode 100644 index 000000000..e3a2ba292 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationTransaction.java @@ -0,0 +1,42 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.immunization; + +import ca.uhn.fhir.context.FhirVersionEnum; +import org.openehealth.ipf.commons.ihe.fhir.FhirTransactionConfiguration; +import org.openehealth.ipf.commons.ihe.fhir.FhirTransactionValidator; +import org.openehealth.ipf.commons.ihe.fhir.audit.FhirQueryAuditDataset; + +/** + * {@link FhirTransactionConfiguration} for 'Find Immunization'. + * + * @since 1.2.0 + */ +public class FindImmunizationTransaction extends FhirTransactionConfiguration<FhirQueryAuditDataset> { + + public FindImmunizationTransaction() { + super("immunization-find", + "Find Immunization", + true, + null, + new FindImmunizationAuditStrategy(), + FhirVersionEnum.R4, + new FindImmunizationProvider(), + null, + FhirTransactionValidator.NO_VALIDATION); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/CreateMedicationStatementProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/CreateMedicationStatementProvider.java index 04c9c4fe5..d4aa9fea4 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/CreateMedicationStatementProvider.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/CreateMedicationStatementProvider.java @@ -35,8 +35,8 @@ public class CreateMedicationStatementProvider extends AbstractPlainProvider { @Create - public MethodOutcome createMedicationStatement(@ResourceParam MedicationStatement observation, RequestDetails requestDetails, - HttpServletRequest request, HttpServletResponse response) { + public MethodOutcome create(@ResourceParam MedicationStatement observation, RequestDetails requestDetails, + HttpServletRequest request, HttpServletResponse response) { return requestAction(observation, null, request, response, requestDetails); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/FindMedicationStatementProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/FindMedicationStatementProvider.java index f8acf26e3..ae548210b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/FindMedicationStatementProvider.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/FindMedicationStatementProvider.java @@ -52,29 +52,29 @@ public class FindMedicationStatementProvider extends AbstractPlainProvider { @Search(type = MedicationStatement.class) - public IBundleProvider searchMedicationStatement(@OptionalParam(name = IAnyResource.SP_RES_ID) TokenAndListParam id, - @OptionalParam(name = IAnyResource.SP_RES_LANGUAGE) StringAndListParam language, - @OptionalParam(name = Constants.PARAM_LASTUPDATED) DateRangeParam lastUpdated, - @OptionalParam(name = Constants.PARAM_PROFILE) UriAndListParam profile, - @OptionalParam(name = Constants.PARAM_SOURCE) UriAndListParam resourceSource, - @OptionalParam(name = Constants.PARAM_SECURITY) TokenAndListParam security, - @OptionalParam(name = Constants.PARAM_TAG) TokenAndListParam tag, - @OptionalParam(name = Constants.PARAM_CONTENT) StringAndListParam content, - @OptionalParam(name = Constants.PARAM_TEXT) StringAndListParam text, - @OptionalParam(name = Constants.PARAM_FILTER) StringAndListParam filter, - @OptionalParam(name = MedicationStatement.SP_CATEGORY) TokenAndListParam category, - @OptionalParam(name = MedicationStatement.SP_CODE) TokenAndListParam code, - @OptionalParam(name = MedicationStatement.SP_CONTEXT) ReferenceAndListParam context, - @OptionalParam(name = MedicationStatement.SP_EFFECTIVE) DateRangeParam effective, - @OptionalParam(name = MedicationStatement.SP_IDENTIFIER) TokenAndListParam identifier, - @OptionalParam(name = MedicationStatement.SP_MEDICATION) ReferenceAndListParam medication, - @OptionalParam(name = MedicationStatement.SP_PART_OF) ReferenceAndListParam partOf, - @OptionalParam(name = MedicationStatement.SP_PATIENT) ReferenceAndListParam patient, - @OptionalParam(name = MedicationStatement.SP_SOURCE) ReferenceAndListParam source, - @OptionalParam(name = MedicationStatement.SP_STATUS) TokenAndListParam status, - @OptionalParam(name = MedicationStatement.SP_SUBJECT) ReferenceAndListParam subject, - @Count Integer count, @Offset Integer offset, @Sort SortSpec sort, - RequestDetails requestDetails, HttpServletRequest request, HttpServletResponse response) { + public IBundleProvider search(@OptionalParam(name = IAnyResource.SP_RES_ID) TokenAndListParam id, + @OptionalParam(name = IAnyResource.SP_RES_LANGUAGE) StringAndListParam language, + @OptionalParam(name = Constants.PARAM_LASTUPDATED) DateRangeParam lastUpdated, + @OptionalParam(name = Constants.PARAM_PROFILE) UriAndListParam profile, + @OptionalParam(name = Constants.PARAM_SOURCE) UriAndListParam resourceSource, + @OptionalParam(name = Constants.PARAM_SECURITY) TokenAndListParam security, + @OptionalParam(name = Constants.PARAM_TAG) TokenAndListParam tag, + @OptionalParam(name = Constants.PARAM_CONTENT) StringAndListParam content, + @OptionalParam(name = Constants.PARAM_TEXT) StringAndListParam text, + @OptionalParam(name = Constants.PARAM_FILTER) StringAndListParam filter, + @OptionalParam(name = MedicationStatement.SP_CATEGORY) TokenAndListParam category, + @OptionalParam(name = MedicationStatement.SP_CODE) TokenAndListParam code, + @OptionalParam(name = MedicationStatement.SP_CONTEXT) ReferenceAndListParam context, + @OptionalParam(name = MedicationStatement.SP_EFFECTIVE) DateRangeParam effective, + @OptionalParam(name = MedicationStatement.SP_IDENTIFIER) TokenAndListParam identifier, + @OptionalParam(name = MedicationStatement.SP_MEDICATION) ReferenceAndListParam medication, + @OptionalParam(name = MedicationStatement.SP_PART_OF) ReferenceAndListParam partOf, + @OptionalParam(name = MedicationStatement.SP_PATIENT) ReferenceAndListParam patient, + @OptionalParam(name = MedicationStatement.SP_SOURCE) ReferenceAndListParam source, + @OptionalParam(name = MedicationStatement.SP_STATUS) TokenAndListParam status, + @OptionalParam(name = MedicationStatement.SP_SUBJECT) ReferenceAndListParam subject, + @Count Integer count, @Offset Integer offset, @Sort SortSpec sort, + RequestDetails requestDetails, HttpServletRequest request, HttpServletResponse response) { SearchParameterMap searchParams = new SearchParameterMap(); searchParams.add(IAnyResource.SP_RES_ID, id); @@ -109,8 +109,8 @@ public IBundleProvider searchMedicationStatement(@OptionalParam(name = IAnyResou } @Read(version = true) - public MedicationStatement readMedicationStatement(@IdParam IdType id, RequestDetails requestDetails, - HttpServletRequest request, HttpServletResponse response) { + public MedicationStatement read(@IdParam IdType id, RequestDetails requestDetails, + HttpServletRequest request, HttpServletResponse response) { return requestResource(id, null, MedicationStatement.class, request, response, requestDetails); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java index a1b2be83e..1c9814b2d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java @@ -13,6 +13,7 @@ import org.hl7.fhir.r4.model.Consent; import org.hl7.fhir.r4.model.DiagnosticReport; import org.hl7.fhir.r4.model.Identifier; +import org.hl7.fhir.r4.model.Immunization; import org.hl7.fhir.r4.model.MedicationStatement; import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Patient; @@ -72,6 +73,8 @@ public static Optional<Identifier> getSubjectIdentifier(Resource resource, Optio subjectIdentifier = ((Consent) resource).getPatient().getIdentifier(); } else if (resource instanceof DiagnosticReport) { subjectIdentifier = ((DiagnosticReport) resource).getSubject().getIdentifier(); + } else if (resource instanceof Immunization) { + subjectIdentifier = ((Immunization) resource).getPatient().getIdentifier(); } else if (resource instanceof MedicationStatement) { subjectIdentifier = ((MedicationStatement) resource).getSubject().getIdentifier(); } else if (resource instanceof Observation) { diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/immunization-create b/src/main/resources/META-INF/services/org/apache/camel/component/immunization-create new file mode 100644 index 000000000..79360c9ea --- /dev/null +++ b/src/main/resources/META-INF/services/org/apache/camel/component/immunization-create @@ -0,0 +1 @@ +class=org.ehrbase.fhirbridge.camel.component.fhir.immunization.CreateImmunizationComponent \ No newline at end of file diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/immunization-find b/src/main/resources/META-INF/services/org/apache/camel/component/immunization-find new file mode 100644 index 000000000..3461d29bc --- /dev/null +++ b/src/main/resources/META-INF/services/org/apache/camel/component/immunization-find @@ -0,0 +1 @@ +class=org.ehrbase.fhirbridge.camel.component.fhir.immunization.FindImmunizationComponent \ No newline at end of file diff --git a/src/main/resources/profiles/Immunization.xml b/src/main/resources/profiles/Immunization.xml new file mode 100644 index 000000000..cc51ab009 --- /dev/null +++ b/src/main/resources/profiles/Immunization.xml @@ -0,0 +1,5596 @@ +<StructureDefinition xmlns="http://hl7.org/fhir"> + <id value="gecco-immunization" /> + <url value="https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization" /> + <version value="1.0" /> + <name value="Immunization" /> + <title value="History of Vaccination" /> + <status value="active" /> + <date value="2020-10-29" /> + <publisher value="Charité" /> + <contact> + <telecom> + <system value="url" /> + <value value="https://www.bihealth.org/en/research/core-facilities/interoperability/" /> + </telecom> + </contact> + <description value="A patient's history of vaccination" /> + <fhirVersion value="4.0.1" /> + <mapping> + <identity value="workflow" /> + <uri value="http://hl7.org/fhir/workflow" /> + <name value="Workflow Pattern" /> + </mapping> + <mapping> + <identity value="v2" /> + <uri value="http://hl7.org/v2" /> + <name value="HL7 v2 Mapping" /> + </mapping> + <mapping> + <identity value="rim" /> + <uri value="http://hl7.org/v3" /> + <name value="RIM Mapping" /> + </mapping> + <mapping> + <identity value="w5" /> + <uri value="http://hl7.org/fhir/fivews" /> + <name value="FiveWs Pattern Mapping" /> + </mapping> + <mapping> + <identity value="cda" /> + <uri value="http://hl7.org/v3/cda" /> + <name value="CDA (R2)" /> + </mapping> + <kind value="resource" /> + <abstract value="false" /> + <type value="Immunization" /> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + <derivation value="constraint" /> + <snapshot> + <element id="Immunization"> + <path value="Immunization" /> + <short value="Immunization event information" /> + <definition value="Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Immunization" /> + <min value="0" /> + <max value="*" /> + </base> + <constraint> + <key value="dom-2" /> + <severity value="error" /> + <human value="If the resource is contained in another resource, it SHALL NOT contain nested Resources" /> + <expression value="contained.contained.empty()" /> + <xpath value="not(parent::f:contained and f:contained)" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="dom-4" /> + <severity value="error" /> + <human value="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated" /> + <expression value="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()" /> + <xpath value="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="dom-3" /> + <severity value="error" /> + <human value="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 value="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 value="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 value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice"> + <valueBoolean value="true" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation"> + <valueMarkdown value="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." /> + </extension> + <key value="dom-6" /> + <severity value="warning" /> + <human value="A resource should have narrative for robust management" /> + <expression value="text.`div`.exists()" /> + <xpath value="exists(f:text/h:div)" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="dom-5" /> + <severity value="error" /> + <human value="If a resource is contained in another resource, it SHALL NOT have a security label" /> + <expression value="contained.meta.security.empty()" /> + <xpath value="not(exists(f:contained/*/f:meta/f:security))" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="Entity. Role, or Act" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="VXU_V04" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="SubstanceAdministration" /> + </mapping> + </element> + <element id="Immunization.id"> + <path value="Immunization.id" /> + <short value="Logical id of this artifact" /> + <definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <isSummary value="true" /> + </element> + <element id="Immunization.meta"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.meta" /> + <short value="Metadata about the resource" /> + <definition value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.meta" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Meta" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.implicitRules"> + <path value="Immunization.implicitRules" /> + <short value="A set of rules under which this content was created" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.implicitRules" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="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 value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.language"> + <path value="Immunization.language" /> + <short value="Language of the resource content" /> + <definition value="The base language in which the resource is written." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.language" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"> + <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="Language" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> + <valueBoolean value="true" /> + </extension> + <strength value="preferred" /> + <description value="A human language." /> + <valueSet value="http://hl7.org/fhir/ValueSet/languages" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.text" /> + <short value="Text summary of the resource, for human interpretation" /> + <definition value="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 value="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 value="narrative" /> + <alias value="html" /> + <alias value="xhtml" /> + <alias value="display" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="DomainResource.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Narrative" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Act.text?" /> + </mapping> + </element> + <element id="Immunization.contained"> + <path value="Immunization.contained" /> + <short value="Contained, inline Resources" /> + <definition value="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 value="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 value="inline resources" /> + <alias value="anonymous resources" /> + <alias value="contained resources" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.contained" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Resource" /> + </type> + <mapping> + <identity value="rim" /> + <map value="Entity. Role, or Act" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.extension:dataAbsentReason"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.extension" /> + <sliceName value="dataAbsentReason" /> + <short value="occurrence[x] absence reason" /> + <definition value="Provides a reason why the expected value or elements in the element that is extended are missing." /> + <comment value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="DomainResource.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + <profile value="http://hl7.org/fhir/StructureDefinition/data-absent-reason" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="ANY.nullFlavor" /> + </mapping> + </element> + <element id="Immunization.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.modifierExtension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Extensions that cannot be ignored" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.identifier"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.identifier" /> + <short value="Business identifier" /> + <definition value="A unique identifier assigned to this immunization record." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Immunization.identifier" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Identifier" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="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]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="Identifier" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.identifier" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.identifier" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".id" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/id" /> + </mapping> + </element> + <element id="Immunization.status"> + <path value="Immunization.status" /> + <short value="completed | entered-in-error | not-done" /> + <definition value="Indicates the current status of the immunization event." /> + <comment value="Will generally be set to show that the immunization has been completed or not done. This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Immunization.status" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="This element is labeled as a modifier because it is a status element that contains statuses entered-in-error and not-done which means that the resource should not be treated as valid" /> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ImmunizationStatus" /> + </extension> + <strength value="required" /> + <description value="A set of codes indicating the current status of an Immunization." /> + <valueSet value="http://hl7.org/fhir/ValueSet/immunization-status|4.0.1" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.status" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.status" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="statusCode" /> + </mapping> + </element> + <element id="Immunization.statusReason"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.statusReason" /> + <short value="Reason not done" /> + <definition value="Indicates the reason the immunization event was not performed." /> + <comment value="This is generally only used for the status of "not-done". The reason for performing the immunization event is captured in reasonCode, not here." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.statusReason" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ImmunizationStatusReason" /> + </extension> + <strength value="example" /> + <description value="The reason why a vaccine was not administered." /> + <valueSet value="http://hl7.org/fhir/ValueSet/immunization-status-reason" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.statusReason" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".inboundRelationship[typeCode=SUBJ].source[classCode=CACT, moodCode=EVN].reasonCOde" /> + </mapping> + </element> + <element id="Immunization.vaccineCode"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode" /> + <short value="Vaccine product administered" /> + <definition value="Vaccine that was administered or was to be administered." /> + <comment value="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 value="1" /> + <max value="1" /> + <base> + <path value="Immunization.vaccineCode" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="VaccineCode" /> + </extension> + <strength value="example" /> + <description value="The code for vaccine product administered." /> + <valueSet value="http://hl7.org/fhir/ValueSet/vaccine-code" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.code" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.what[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-5" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".code" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/consumable/manfacturedProduct/manufacturedMaterial/realmCode/code" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.id"> + <path value="Immunization.vaccineCode.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:snomed"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode.coding" /> + <sliceName value="snomed" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="http://snomed.info/sct" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <strength value="extensible" /> + <description value="SNOMED Vaccine Codes" /> + <valueSet value="https://fhir.kbv.de/ValueSet/KBV_VS_MIO_Vaccination_Vaccine_List" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:snomed.id"> + <path value="Immunization.vaccineCode.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:snomed.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:snomed.system"> + <path value="Immunization.vaccineCode.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:snomed.version"> + <path value="Immunization.vaccineCode.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:snomed.code"> + <path value="Immunization.vaccineCode.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:snomed.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Immunization.vaccineCode.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:snomed.userSelected"> + <path value="Immunization.vaccineCode.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:atc"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode.coding" /> + <sliceName value="atc" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="http://fhir.de/CodeSystem/dimdi/atc" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <strength value="extensible" /> + <description value="ATC Vaccine Codes" /> + <valueSet value="https://fhir.kbv.de/ValueSet/KBV_VS_MIO_Vaccination_Vaccine_List_ATC" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:atc.id"> + <path value="Immunization.vaccineCode.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:atc.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:atc.system"> + <path value="Immunization.vaccineCode.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:atc.version"> + <path value="Immunization.vaccineCode.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:atc.code"> + <path value="Immunization.vaccineCode.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:atc.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Immunization.vaccineCode.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:atc.userSelected"> + <path value="Immunization.vaccineCode.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:pzn"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode.coding" /> + <sliceName value="pzn" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="http://fhir.de/CodeSystem/ifa/pzn" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <valueSet value="http://fhir.de/ValueSet/ifa/pzn" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:pzn.id"> + <path value="Immunization.vaccineCode.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:pzn.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:pzn.system"> + <path value="Immunization.vaccineCode.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:pzn.version"> + <path value="Immunization.vaccineCode.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:pzn.code"> + <path value="Immunization.vaccineCode.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:pzn.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Immunization.vaccineCode.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:pzn.userSelected"> + <path value="Immunization.vaccineCode.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode.coding" /> + <sliceName value="absentOrUnknownImmunization" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <valueSet value="http://hl7.org/fhir/uv/ips/ValueSet/absent-or-unknown-immunizations-uv-ips" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization.id"> + <path value="Immunization.vaccineCode.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.vaccineCode.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization.system"> + <path value="Immunization.vaccineCode.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization.version"> + <path value="Immunization.vaccineCode.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization.code"> + <path value="Immunization.vaccineCode.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Immunization.vaccineCode.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization.userSelected"> + <path value="Immunization.vaccineCode.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Immunization.vaccineCode.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Immunization.vaccineCode.text" /> + <short value="Plain text representation of the concept" /> + <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="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 value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element id="Immunization.patient"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.patient" /> + <short value="Who was immunized" /> + <definition value="The patient who either received or did not receive the immunization." /> + <comment value="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 value="1" /> + <max value="1" /> + <base> + <path value="Immunization.patient" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.subject" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.subject[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".partipication[ttypeCode=].role" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.subject" /> + </mapping> + </element> + <element id="Immunization.encounter"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.encounter" /> + <short value="Encounter immunization was part of" /> + <definition value="The visit or admission or other contact between patient and health care provider the immunization was performed as part of." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Immunization.encounter" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.context" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.context" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1-19" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="component->EncounterEvent" /> + </mapping> + </element> + <element id="Immunization.occurrence[x]"> + <path value="Immunization.occurrence[x]" /> + <slicing> + <discriminator> + <type value="type" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Vaccine administration date" /> + <definition value="Date vaccine administered or was to be administered." /> + <comment value="When immunizations are given a specific date and time should always be known. When immunizations are patient reported, a specific date might not be known. Although partial dates are allowed, an adult patient might not be able to recall the year a childhood immunization was given. An exact date is always preferable, but the use of the String data type is acceptable when an exact date is not known. A small number of vaccines (e.g. live oral typhoid vaccine) are given as a series of patient self-administered dose over a span of time. In cases like this, often, only the first dose (typically a provider supervised dose) is recorded with the occurrence indicating the date/time of the first dose." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Immunization.occurrence[x]" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.occurrence[x]" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.done[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".effectiveTime" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/effectiveTime/value" /> + </mapping> + </element> + <element id="Immunization.occurrence[x]:occurrenceDateTime"> + <path value="Immunization.occurrence[x]" /> + <sliceName value="occurrenceDateTime" /> + <short value="Vaccine administration date" /> + <definition value="Date vaccine administered or was to be administered." /> + <comment value="When immunizations are given a specific date and time should always be known. When immunizations are patient reported, a specific date might not be known. Although partial dates are allowed, an adult patient might not be able to recall the year a childhood immunization was given. An exact date is always preferable, but the use of the String data type is acceptable when an exact date is not known. A small number of vaccines (e.g. live oral typhoid vaccine) are given as a series of patient self-administered dose over a span of time. In cases like this, often, only the first dose (typically a provider supervised dose) is recorded with the occurrence indicating the date/time of the first dose." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.occurrence[x]" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.occurrence[x]" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.done[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".effectiveTime" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/effectiveTime/value" /> + </mapping> + </element> + <element id="Immunization.recorded"> + <path value="Immunization.recorded" /> + <short value="When the immunization was first captured in the subject's record" /> + <definition value="The date the occurrence of the immunization was first captured in the record - potentially significantly after the occurrence of the event." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.recorded" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="false" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.recorded" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation[typeCode=AUT].time" /> + </mapping> + </element> + <element id="Immunization.primarySource"> + <path value="Immunization.primarySource" /> + <short value="Indicates context the data was recorded in" /> + <definition value="An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded." /> + <comment value="Reflects the “reliability” of the content." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.primarySource" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.source" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-9" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="immunization.uncertaintycode (if primary source=false, uncertainty=U)" /> + </mapping> + </element> + <element id="Immunization.reportOrigin"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.reportOrigin" /> + <short value="Indicates the source of a secondarily reported record" /> + <definition value="The source of the data when the report of the immunization event is not based on information from the person who administered the vaccine." /> + <comment value="Should not be populated if primarySource = True, not required even if primarySource = False." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.reportOrigin" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ImmunizationReportOrigin" /> + </extension> + <strength value="example" /> + <description value="The source of the data for a record which is not from a primary source." /> + <valueSet value="http://hl7.org/fhir/ValueSet/immunization-origin" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.source" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-9" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation[typeCode=INF].role[classCode=PAT] (this syntax for self-reported) .participation[typeCode=INF].role[classCode=LIC] (this syntax for health care professional) .participation[typeCode=INF].role[classCode=PRS] (this syntax for family member)" /> + </mapping> + </element> + <element id="Immunization.location"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.location" /> + <short value="Where immunization occurred" /> + <definition value="The service delivery location where the vaccine administration occurred." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Immunization.location" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.location" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.where[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-27 (or RXA-11, deprecated as of v2.7)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation[typeCode=LOC].COCT_MT240000UV" /> + </mapping> + </element> + <element id="Immunization.manufacturer"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.manufacturer" /> + <short value="Vaccine manufacturer" /> + <definition value="Name of vaccine manufacturer." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Immunization.manufacturer" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-17" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation[typeCode=CSM].role[classCode=INST].scopedRole.scoper[classCode=ORG]" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/consumable/manfacturedProduct/manufacuturerOrganization/name" /> + </mapping> + </element> + <element id="Immunization.lotNumber"> + <path value="Immunization.lotNumber" /> + <short value="Vaccine lot number" /> + <definition value="Lot number of the vaccine product." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.lotNumber" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-15" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation[typeCode=CSM].role[classCode=INST].scopedRole.scoper[classCode=MMAT].id" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/consumable/manfacturedProduct/manufacturedMaterial/lotNumberText" /> + </mapping> + </element> + <element id="Immunization.expirationDate"> + <path value="Immunization.expirationDate" /> + <short value="Vaccine expiration date" /> + <definition value="Date vaccine batch expires." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.expirationDate" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="date" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-16" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation[typeCode=CSM].role[classCode=INST].scopedRole.scoper[classCode=MMAT].expirationTime" /> + </mapping> + </element> + <element id="Immunization.site"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.site" /> + <short value="Body site vaccine was administered" /> + <definition value="Body site where vaccine was administered." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Immunization.site" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ImmunizationSite" /> + </extension> + <strength value="example" /> + <description value="The site at which the vaccine was administered." /> + <valueSet value="http://hl7.org/fhir/ValueSet/immunization-site" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXR-2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="observation.targetSiteCode" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/approachSiteCode/code" /> + </mapping> + </element> + <element id="Immunization.route"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.route" /> + <short value="How vaccine entered body" /> + <definition value="The path by which the vaccine product is taken into the body." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Immunization.route" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ImmunizationRoute" /> + </extension> + <strength value="example" /> + <description value="The route by which the vaccine was administered." /> + <valueSet value="http://hl7.org/fhir/ValueSet/immunization-route" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXR-1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".routeCode" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/routeCode/code" /> + </mapping> + </element> + <element id="Immunization.doseQuantity"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.doseQuantity" /> + <short value="Amount of vaccine administered" /> + <definition value="The quantity of vaccine product that was administered." /> + <comment value="The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.doseQuantity" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Quantity" /> + <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <constraint> + <key value="sqty-1" /> + <severity value="error" /> + <human value="The comparator is not used on a SimpleQuantity" /> + <expression value="comparator.empty()" /> + <xpath value="not(exists(f:comparator))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <isModifier value="false" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-6 / RXA-7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".doseQuantity" /> + </mapping> + </element> + <element id="Immunization.performer"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.performer" /> + <short value="Who performed event" /> + <definition value="Indicates who performed the immunization event." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Immunization.performer" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.performer" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="ORC-12 / RXA-10" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation[typeCode=PRF].role[scoper.determinerCode=INSTANCE]" /> + </mapping> + </element> + <element id="Immunization.performer.id"> + <path value="Immunization.performer.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.performer.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.performer.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.performer.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.performer.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.performer.function"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.performer.function" /> + <short value="What type of performance was done" /> + <definition value="Describes the type of performance (e.g. ordering provider, administering provider, etc.)." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Immunization.performer.function" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ImmunizationFunction" /> + </extension> + <strength value="extensible" /> + <description value="The role a practitioner or organization plays in the immunization event." /> + <valueSet value="http://hl7.org/fhir/ValueSet/immunization-function" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.performer.function" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation.functionCode" /> + </mapping> + </element> + <element id="Immunization.performer.actor"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.performer.actor" /> + <short value="Individual or organization who was performing" /> + <definition value="The practitioner or organization who performed the action." /> + <comment value="When the individual practitioner who performed the action is known, it is best to send." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Immunization.performer.actor" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.performer.actor" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.actor" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".player" /> + </mapping> + </element> + <element id="Immunization.note"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.note" /> + <short value="Additional immunization notes" /> + <definition value="Extra information about the immunization that is not conveyed by the other attributes." /> + <comment value="For systems that do not have structured annotations, they can simply communicate a single annotation with no author or time. This element may need to be included in narrative because of the potential for modifying information. *Annotations SHOULD NOT* be used to communicate "modifying" information that could be computable. (This is a SHOULD because enforcing user behavior is nearly impossible)." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Immunization.note" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Annotation" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Act" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.note" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-5 : OBX-3 = 48767-8" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="note" /> + </mapping> + </element> + <element id="Immunization.reasonCode"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.reasonCode" /> + <short value="Why immunization occurred" /> + <definition value="Reasons why the vaccine was administered." /> + <comment value="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 value="0" /> + <max value="*" /> + <base> + <path value="Immunization.reasonCode" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ImmunizationReason" /> + </extension> + <strength value="example" /> + <description value="The reason why a vaccine was administered." /> + <valueSet value="http://hl7.org/fhir/ValueSet/immunization-reason" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.reasonCode" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="[actionNegationInd=false].reasonCode" /> + </mapping> + </element> + <element id="Immunization.reasonReference"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.reasonReference" /> + <short value="Why immunization occurred" /> + <definition value="Condition, Observation or DiagnosticReport that supports why the immunization was administered." /> + <comment value="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 value="0" /> + <max value="*" /> + <base> + <path value="Immunization.reasonReference" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Condition" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.reasonReference" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.isSubpotent"> + <path value="Immunization.isSubpotent" /> + <short value="Dose potency" /> + <definition value="Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent." /> + <comment value="Typically, the recognition of the dose being sub-potent is retrospective, after the administration (ex. notification of a manufacturer recall after administration). However, in the case of a partial administration (the patient moves unexpectedly and only some of the dose is actually administered), subpotency may be recognized immediately, but it is still important to record the event." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.isSubpotent" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <meaningWhenMissing value="By default, a dose should be considered to be potent." /> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="This element is labeled as a modifier because an immunization event with a subpotent vaccine doesn't protect the patient the same way as a potent dose." /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RXA-20 = PA (partial administration)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.subpotentReason"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.subpotentReason" /> + <short value="Reason for being subpotent" /> + <definition value="Reason why a dose is considered to be subpotent." /> + <comment value="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 value="0" /> + <max value="*" /> + <base> + <path value="Immunization.subpotentReason" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="SubpotentReason" /> + </extension> + <strength value="example" /> + <description value="The reason why a dose is considered to be subpotent." /> + <valueSet value="http://hl7.org/fhir/ValueSet/immunization-subpotent-reason" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.education"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.education" /> + <short value="Educational material presented to patient" /> + <definition value="Educational material presented to the patient (or guardian) at the time of vaccine administration." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Immunization.education" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="imm-1" /> + <severity value="error" /> + <human value="One of documentType or reference SHALL be present" /> + <expression value="documentType.exists() or reference.exists()" /> + <xpath value="exists(f:documentType) or exists(f:reference)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.education.id"> + <path value="Immunization.education.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.education.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.education.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.education.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.education.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.education.documentType"> + <path value="Immunization.education.documentType" /> + <short value="Educational material document identifier" /> + <definition value="Identifier of the material presented to the patient." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.education.documentType" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-5 : OBX-3 = 69764-9" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.education.reference"> + <path value="Immunization.education.reference" /> + <short value="Educational material reference pointer" /> + <definition value="Reference pointer to the educational material given to the patient if the information was on line." /> + <comment value="see http://en.wikipedia.org/wiki/Uniform_resource_identifier" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.education.reference" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.education.publicationDate"> + <path value="Immunization.education.publicationDate" /> + <short value="Educational material publication date" /> + <definition value="Date the educational material was published." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.education.publicationDate" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-5 : OBX-3 = 29768-9" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.education.presentationDate"> + <path value="Immunization.education.presentationDate" /> + <short value="Educational material presentation date" /> + <definition value="Date the educational material was given to the patient." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.education.presentationDate" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-5 : OBX-3 = 29769-7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.programEligibility"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.programEligibility" /> + <short value="Patient eligibility for a vaccination program" /> + <definition value="Indicates a patient's eligibility for a funding program." /> + <comment value="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 value="0" /> + <max value="*" /> + <base> + <path value="Immunization.programEligibility" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ProgramEligibility" /> + </extension> + <strength value="example" /> + <description value="The patient's eligibility for a vaccation program." /> + <valueSet value="http://hl7.org/fhir/ValueSet/immunization-program-eligibility" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-5 : OBX-3 = 64994-7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.fundingSource"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.fundingSource" /> + <short value="Funding source for the vaccine" /> + <definition value="Indicates the source of the vaccine actually administered. This may be different than the patient eligibility (e.g. the patient may be eligible for a publically purchased vaccine but due to inventory issues, vaccine purchased with private funds was actually administered)." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Immunization.fundingSource" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="FundingSource" /> + </extension> + <strength value="example" /> + <description value="The source of funding used to purchase the vaccine administered." /> + <valueSet value="http://hl7.org/fhir/ValueSet/immunization-funding-source" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.reaction"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.reaction" /> + <short value="Details of a reaction that follows immunization" /> + <definition value="Categorical data indicating that an adverse event is associated in time to an immunization." /> + <comment value="A reaction may be an indication of an allergy or intolerance and, if this is determined to be the case, it should be recorded as a new AllergyIntolerance resource instance as most systems will not query against past Immunization.reaction elements." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Immunization.reaction" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Observation[classCode=obs].code" /> + </mapping> + </element> + <element id="Immunization.reaction.id"> + <path value="Immunization.reaction.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.reaction.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.reaction.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.reaction.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.reaction.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.reaction.date"> + <path value="Immunization.reaction.date" /> + <short value="When reaction started" /> + <definition value="Date of reaction to the immunization." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.reaction.date" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-14 (ideally this would be reported in an IAM segment, but IAM is not part of the HL7 v2 VXU message - most likely would appear in OBX segments if at all)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".effectiveTime" /> + </mapping> + </element> + <element id="Immunization.reaction.detail"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.reaction.detail" /> + <short value="Additional information on reaction" /> + <definition value="Details of the reaction." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Immunization.reaction.detail" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-5" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".value" /> + </mapping> + </element> + <element id="Immunization.reaction.reported"> + <path value="Immunization.reaction.reported" /> + <short value="Indicates self-reported reaction" /> + <definition value="Self-reported indicator." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.reaction.reported" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="(HL7 v2 doesn't seem to provide for this)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation[typeCode=INF].role[classCode=PAT] (this syntax for self-reported=true)" /> + </mapping> + </element> + <element id="Immunization.protocolApplied"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.protocolApplied" /> + <short value="Protocol followed by the provider" /> + <definition value="The protocol (set of recommendations) being followed by the provider who administered the dose." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Immunization.protocolApplied" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.id"> + <path value="Immunization.protocolApplied.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.protocolApplied.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.protocolApplied.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.series"> + <path value="Immunization.protocolApplied.series" /> + <short value="Name of vaccine series" /> + <definition value="One possible path to achieve presumed immunity against a disease - within the context of an authority." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.protocolApplied.series" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.authority"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.protocolApplied.authority" /> + <short value="Who is responsible for publishing the recommendations" /> + <definition value="Indicates the authority who published the protocol (e.g. ACIP) that is being followed." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Immunization.protocolApplied.authority" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.protocolApplied.targetDisease" /> + <short value="Vaccine preventatable disease being targetted" /> + <definition value="The vaccine preventable disease the dose is being administered against." /> + <comment value="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 value="1" /> + <max value="*" /> + <base> + <path value="Immunization.protocolApplied.targetDisease" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <binding> + <strength value="extensible" /> + <description value="The vaccine preventable disease the dose is being administered for." /> + <valueSet value="https://fhir.kbv.de/ValueSet/KBV_VS_MIO_Vaccination_TargetDisease" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.id"> + <path value="Immunization.protocolApplied.targetDisease.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.protocolApplied.targetDisease.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.protocolApplied.targetDisease.coding" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding.id"> + <path value="Immunization.protocolApplied.targetDisease.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Immunization.protocolApplied.targetDisease.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding.system"> + <path value="Immunization.protocolApplied.targetDisease.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding.version"> + <path value="Immunization.protocolApplied.targetDisease.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding.code"> + <path value="Immunization.protocolApplied.targetDisease.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Immunization.protocolApplied.targetDisease.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding.userSelected"> + <path value="Immunization.protocolApplied.targetDisease.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.targetDisease.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Immunization.protocolApplied.targetDisease.text" /> + <short value="Plain text representation of the concept" /> + <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="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 value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.doseNumber[x]"> + <path value="Immunization.protocolApplied.doseNumber[x]" /> + <short value="Dose number within series" /> + <definition value="Nominal position in a series." /> + <comment value="The use of an integer is preferred if known. A string should only be used in cases where an integer is not available (such as when documenting a recurring booster dose)." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Immunization.protocolApplied.doseNumber[x]" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="positiveInt" /> + </type> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Immunization.protocolApplied.seriesDoses[x]"> + <path value="Immunization.protocolApplied.seriesDoses[x]" /> + <short value="Recommended number of doses for immunity" /> + <definition value="The recommended number of doses to achieve immunity." /> + <comment value="The use of an integer is preferred if known. A string should only be used in cases where an integer is not available (such as when documenting a recurring booster dose)." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Immunization.protocolApplied.seriesDoses[x]" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="positiveInt" /> + </type> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + </snapshot> + <differential> + <element id="Immunization.extension"> + <path value="Immunization.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <rules value="open" /> + </slicing> + </element> + <element id="Immunization.extension:dataAbsentReason"> + <path value="Immunization.extension" /> + <sliceName value="dataAbsentReason" /> + <short value="occurrence[x] absence reason" /> + <type> + <code value="Extension" /> + <profile value="http://hl7.org/fhir/StructureDefinition/data-absent-reason" /> + </type> + </element> + <element id="Immunization.vaccineCode"> + <path value="Immunization.vaccineCode" /> + <mustSupport value="true" /> + </element> + <element id="Immunization.vaccineCode.coding"> + <path value="Immunization.vaccineCode.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + </element> + <element id="Immunization.vaccineCode.coding:snomed"> + <path value="Immunization.vaccineCode.coding" /> + <sliceName value="snomed" /> + <max value="1" /> + <patternCoding> + <system value="http://snomed.info/sct" /> + </patternCoding> + <mustSupport value="true" /> + <binding> + <strength value="extensible" /> + <description value="SNOMED Vaccine Codes" /> + <valueSet value="https://fhir.kbv.de/ValueSet/KBV_VS_MIO_Vaccination_Vaccine_List" /> + </binding> + </element> + <element id="Immunization.vaccineCode.coding:snomed.system"> + <path value="Immunization.vaccineCode.coding.system" /> + <min value="1" /> + </element> + <element id="Immunization.vaccineCode.coding:snomed.code"> + <path value="Immunization.vaccineCode.coding.code" /> + <min value="1" /> + </element> + <element id="Immunization.vaccineCode.coding:atc"> + <path value="Immunization.vaccineCode.coding" /> + <sliceName value="atc" /> + <max value="1" /> + <patternCoding> + <system value="http://fhir.de/CodeSystem/dimdi/atc" /> + </patternCoding> + <mustSupport value="true" /> + <binding> + <strength value="extensible" /> + <description value="ATC Vaccine Codes" /> + <valueSet value="https://fhir.kbv.de/ValueSet/KBV_VS_MIO_Vaccination_Vaccine_List_ATC" /> + </binding> + </element> + <element id="Immunization.vaccineCode.coding:atc.system"> + <path value="Immunization.vaccineCode.coding.system" /> + <min value="1" /> + </element> + <element id="Immunization.vaccineCode.coding:atc.code"> + <path value="Immunization.vaccineCode.coding.code" /> + <min value="1" /> + </element> + <element id="Immunization.vaccineCode.coding:pzn"> + <path value="Immunization.vaccineCode.coding" /> + <sliceName value="pzn" /> + <max value="1" /> + <patternCoding> + <system value="http://fhir.de/CodeSystem/ifa/pzn" /> + </patternCoding> + <mustSupport value="true" /> + <binding> + <strength value="required" /> + <valueSet value="http://fhir.de/ValueSet/ifa/pzn" /> + </binding> + </element> + <element id="Immunization.vaccineCode.coding:pzn.system"> + <path value="Immunization.vaccineCode.coding.system" /> + <min value="1" /> + </element> + <element id="Immunization.vaccineCode.coding:pzn.code"> + <path value="Immunization.vaccineCode.coding.code" /> + <min value="1" /> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization"> + <path value="Immunization.vaccineCode.coding" /> + <sliceName value="absentOrUnknownImmunization" /> + <max value="1" /> + <patternCoding> + <system value="http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips" /> + </patternCoding> + <mustSupport value="true" /> + <binding> + <strength value="required" /> + <valueSet value="http://hl7.org/fhir/uv/ips/ValueSet/absent-or-unknown-immunizations-uv-ips" /> + </binding> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization.system"> + <path value="Immunization.vaccineCode.coding.system" /> + <min value="1" /> + </element> + <element id="Immunization.vaccineCode.coding:absentOrUnknownImmunization.code"> + <path value="Immunization.vaccineCode.coding.code" /> + <min value="1" /> + </element> + <element id="Immunization.patient"> + <path value="Immunization.patient" /> + <mustSupport value="true" /> + </element> + <element id="Immunization.occurrence[x]"> + <path value="Immunization.occurrence[x]" /> + <slicing> + <discriminator> + <type value="type" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <mustSupport value="true" /> + </element> + <element id="Immunization.occurrence[x]:occurrenceDateTime"> + <path value="Immunization.occurrence[x]" /> + <sliceName value="occurrenceDateTime" /> + <type> + <code value="dateTime" /> + </type> + <mustSupport value="true" /> + </element> + <element id="Immunization.protocolApplied"> + <path value="Immunization.protocolApplied" /> + <mustSupport value="true" /> + </element> + <element id="Immunization.protocolApplied.targetDisease"> + <path value="Immunization.protocolApplied.targetDisease" /> + <min value="1" /> + <mustSupport value="true" /> + <binding> + <strength value="extensible" /> + <valueSet value="https://fhir.kbv.de/ValueSet/KBV_VS_MIO_Vaccination_TargetDisease" /> + </binding> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding"> + <path value="Immunization.protocolApplied.targetDisease.coding" /> + <min value="1" /> + <max value="1" /> + <mustSupport value="true" /> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding.system"> + <path value="Immunization.protocolApplied.targetDisease.coding.system" /> + <min value="1" /> + </element> + <element id="Immunization.protocolApplied.targetDisease.coding.code"> + <path value="Immunization.protocolApplied.targetDisease.coding.code" /> + <min value="1" /> + </element> + </differential> +</StructureDefinition> \ No newline at end of file From 5dbaaf21f78beb49596b12f5be0baf657d303ad2 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 4 May 2021 10:05:30 +0200 Subject: [PATCH 032/141] Update Postman collection --- .../fhir-bridge.postman_collection.json | 532 +++++++++++++++++- 1 file changed, 530 insertions(+), 2 deletions(-) diff --git a/config/postman/fhir-bridge.postman_collection.json b/config/postman/fhir-bridge.postman_collection.json index 97ddc7911..a50f13f7c 100644 --- a/config/postman/fhir-bridge.postman_collection.json +++ b/config/postman/fhir-bridge.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "d9f6a4ea-db6e-4816-986d-79b7d1f45886", + "_postman_id": "88670883-eab4-4d74-adc2-600bdf47800e", "name": "fhir-bridge", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, @@ -1010,6 +1010,534 @@ } ] }, + { + "name": "Immunization", + "item": [ + { + "name": "Create Immunization", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"id\": \"85bd2fab-256b-43d6-9671-4f97c1407d0f\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization\"\r\n ]\r\n },\r\n \"occurrenceDateTime\": \"2020-10-06\",\r\n \"patient\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\",\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"protocolApplied\": [\r\n {\r\n \"_doseNumberString\": {\r\n \"extension\": [\r\n {\r\n \"url\": \"http://hl7.org/fhir/StructureDefinition/data-absent-reason\",\r\n \"valueCode\": \"unknown\"\r\n }\r\n ]\r\n },\r\n \"targetDisease\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"code\": \"16814004\",\r\n \"display\": \"Pneumococcal infectious disease\",\r\n \"system\": \"http://snomed.info/sct\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"status\": \"completed\",\r\n \"vaccineCode\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"333598008\",\r\n \"display\": \"Pneumococcal vaccine\",\r\n \"system\": \"http://snomed.info/sct\"\r\n }\r\n ]\r\n },\r\n \"resourceType\": \"Immunization\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Immunization", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization" + ] + } + }, + "response": [] + }, + { + "name": "Find Immunization: read", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/fhir/Immunization/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "2" + } + ] + } + }, + "response": [] + }, + { + "name": "Find Immunization: vread", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/fhir/Immunization/:id/_history/:vid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization", + ":id", + "_history", + ":vid" + ], + "variable": [ + { + "key": "id", + "value": "1" + }, + { + "key": "vid", + "value": "1" + } + ] + } + }, + "response": [] + }, + { + "name": "Find Immunization: search", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/fhir/Immunization?status=error", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization" + ], + "query": [ + { + "key": "_id", + "value": "2", + "disabled": true + }, + { + "key": "_language", + "value": null, + "disabled": true + }, + { + "key": "_profile", + "value": null, + "disabled": true + }, + { + "key": "_source", + "value": null, + "disabled": true + }, + { + "key": "_security", + "value": null, + "disabled": true + }, + { + "key": "_tag", + "value": null, + "disabled": true + }, + { + "key": "_content", + "value": null, + "disabled": true + }, + { + "key": "_text", + "value": null, + "disabled": true + }, + { + "key": "_filter", + "value": null, + "disabled": true + }, + { + "key": "date", + "value": null, + "disabled": true + }, + { + "key": "identifier", + "value": null, + "disabled": true + }, + { + "key": "location", + "value": null, + "disabled": true + }, + { + "key": "lot-number", + "value": null, + "disabled": true + }, + { + "key": "manufacturer", + "value": null, + "disabled": true + }, + { + "key": "patient", + "value": null, + "disabled": true + }, + { + "key": "performer", + "value": null, + "disabled": true + }, + { + "key": "reaction", + "value": "", + "disabled": true + }, + { + "key": "reaction-date", + "value": null, + "disabled": true + }, + { + "key": "reason-code", + "value": null, + "disabled": true + }, + { + "key": "reason-reference", + "value": null, + "disabled": true + }, + { + "key": "series", + "value": null, + "disabled": true + }, + { + "key": "status", + "value": "error" + }, + { + "key": "status-reason", + "value": null, + "disabled": true + }, + { + "key": "target-disease", + "value": "", + "disabled": true + }, + { + "key": "vaccine-code", + "value": null, + "disabled": true + } + ] + } + }, + "response": [] + } + ] + }, + { + "name": "MedicationStatement", + "item": [ + { + "name": "Create Pharmacological Therapy", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"MedicationStatement\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pharmacological-therapy\"\r\n ]\r\n },\r\n \"status\": \"active\",\r\n \"medicationCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"413591007\",\r\n \"display\": \"Product containing atazanavir (medicinal product)\"\r\n },\r\n {\r\n \"system\": \"http://fhir.de/CodeSystem/dimdi/atc\",\r\n \"code\": \"J05AE08\",\r\n \"display\": \"Atazanavir\"\r\n }\r\n ],\r\n \"text\": \"Atazanavir\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/MedicationStatement", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "MedicationStatement" + ] + } + }, + "response": [] + }, + { + "name": "Find MedicationStatement: read", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/fhir/MedicalStatement/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "MedicalStatement", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "2" + } + ] + } + }, + "response": [] + }, + { + "name": "Find MedicationStatement: vread", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/fhir/MedicatlStatement/:id/_history/:vid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "MedicatlStatement", + ":id", + "_history", + ":vid" + ], + "variable": [ + { + "key": "id", + "value": "1" + }, + { + "key": "vid", + "value": "1" + } + ] + } + }, + "response": [] + }, + { + "name": "Find MedicationStatement: search", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/fhir/MedicationStatement", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "MedicationStatement" + ], + "query": [ + { + "key": "_id", + "value": "2", + "disabled": true + }, + { + "key": "_language", + "value": null, + "disabled": true + }, + { + "key": "_profile", + "value": null, + "disabled": true + }, + { + "key": "_source", + "value": null, + "disabled": true + }, + { + "key": "_security", + "value": null, + "disabled": true + }, + { + "key": "_tag", + "value": null, + "disabled": true + }, + { + "key": "_content", + "value": null, + "disabled": true + }, + { + "key": "_text", + "value": null, + "disabled": true + }, + { + "key": "_filter", + "value": null, + "disabled": true + }, + { + "key": "category", + "value": null, + "disabled": true + }, + { + "key": "code", + "value": null, + "disabled": true + }, + { + "key": "context", + "value": null, + "disabled": true + }, + { + "key": "effective", + "value": "", + "disabled": true + }, + { + "key": "identifier", + "value": null, + "disabled": true + }, + { + "key": "medication", + "value": null, + "disabled": true + }, + { + "key": "part-of", + "value": null, + "disabled": true + }, + { + "key": "patient", + "value": null, + "disabled": true + }, + { + "key": "source", + "value": null, + "disabled": true + }, + { + "key": "status", + "value": null, + "disabled": true + }, + { + "key": "subject", + "value": null, + "disabled": true + } + ] + } + }, + "response": [] + } + ] + }, { "name": "Observation", "item": [ @@ -3034,4 +3562,4 @@ ] } ] -} +} \ No newline at end of file From cdd486603085a177c88b4074d68b10cf36ecc30f Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 4 May 2021 10:41:48 +0200 Subject: [PATCH 033/141] Update robot tests --- tests/robot/OBSERVATION/03_create_blood_pressure.robot | 2 +- tests/robot/OBSERVATION/06_create_body_temperature.robot | 2 +- .../OBSERVATION/11_create-clinical-frailty-scale-score.robot | 2 +- tests/robot/OBSERVATION/12_create_body_height.robot | 4 ++-- tests/robot/OBSERVATION/13_create_patient_in_ICU.robot | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/robot/OBSERVATION/03_create_blood_pressure.robot b/tests/robot/OBSERVATION/03_create_blood_pressure.robot index c8e360203..00f561386 100644 --- a/tests/robot/OBSERVATION/03_create_blood_pressure.robot +++ b/tests/robot/OBSERVATION/03_create_blood_pressure.robot @@ -103,7 +103,7 @@ ${profile url} https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefi $.meta missing 0 422 Default profile is not supported for Observation. One of the following profiles is expected: .https://.* $.meta.profile missing 0 422 Object must have some content $.meta.profile ${{ ["invalid_url"] }} 0 422 Canonical URLs must be absolute URLs if they are not fragment references .invalid_url. - $.meta.profile ${{ ["http://wrong.url"] }} 0 422 Profile reference 'http://wrong.url' could not be resolved, so has not been checked + $.meta.profile ${{ ["http://wrong.url"] }} 0 422 Profile reference 'http://wrong.url' could not be resolved, so has not been checked $.meta.profile ${EMPTY} 0 422 This property must be an Array, not a a primitive property # comment: the next one sets the value to an empty list/array [] diff --git a/tests/robot/OBSERVATION/06_create_body_temperature.robot b/tests/robot/OBSERVATION/06_create_body_temperature.robot index 07888ab06..9ca665b00 100644 --- a/tests/robot/OBSERVATION/06_create_body_temperature.robot +++ b/tests/robot/OBSERVATION/06_create_body_temperature.robot @@ -103,7 +103,7 @@ Force Tags observation_create body-temperature create # no meta Observation body-temperature false http://hl7.org/fhir/StructureDefinition/bodytemp final true http://terminology.hl7.org/CodeSystem/v2-0203 OBI https://www.charite.de/fhir/CodeSystem/observation-identifiers 8310-5_BodyTemperature true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8310-5 Body Temperature http://snomed.info/sct 386725007 Body Temperature (observable entity) Body Temperature true valid 2020-02-25 true ${37.5} Cel http://unitsofmeasure.org Cel false 422 0 Default profile is not supported for Observation. One of the following profiles is expected: Default profile is not supported for Observation. One of the following profiles is expected: # invalid profile - Observation body-temperature true http://www.google.de final true http://terminology.hl7.org/CodeSystem/v2-0203 OBI https://www.charite.de/fhir/CodeSystem/observation-identifiers 8310-5_BodyTemperature true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8310-5 Body Temperature http://snomed.info/sct 386725007 Body Temperature (observable entity) Body Temperature true valid 2020-02-25 true ${37.5} Cel http://unitsofmeasure.org Cel false 422 0 Profile reference 'http://www.google.de' could not be resolved, so has not been checked Profile reference 'http://www.google.de' could not be resolved, so has not been checked + Observation body-temperature true http://www.google.de final true http://terminology.hl7.org/CodeSystem/v2-0203 OBI https://www.charite.de/fhir/CodeSystem/observation-identifiers 8310-5_BodyTemperature true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8310-5 Body Temperature http://snomed.info/sct 386725007 Body Temperature (observable entity) Body Temperature true valid 2020-02-25 true ${37.5} Cel http://unitsofmeasure.org Cel false 422 0 Profile reference 'http://www.google.de' has not been checked because it is unknown Profile reference 'http://www.google.de' could not be resolved, so has not been checked Observation body-temperature true test final true http://terminology.hl7.org/CodeSystem/v2-0203 OBI https://www.charite.de/fhir/CodeSystem/observation-identifiers 8310-5_BodyTemperature true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8310-5 Body Temperature http://snomed.info/sct 386725007 Body Temperature (observable entity) Body Temperature true valid 2020-02-25 true ${37.5} Cel http://unitsofmeasure.org Cel false 422 0 Canonical URLs must be absolute URLs if they are not fragment references Canonical URLs must be absolute URLs if they are not fragment references Observation body-temperature true ${12345} final true http://terminology.hl7.org/CodeSystem/v2-0203 OBI https://www.charite.de/fhir/CodeSystem/observation-identifiers 8310-5_BodyTemperature true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8310-5 Body Temperature http://snomed.info/sct 386725007 Body Temperature (observable entity) Body Temperature true valid 2020-02-25 true ${37.5} Cel http://unitsofmeasure.org Cel false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. Observation body-temperature true missing final true http://terminology.hl7.org/CodeSystem/v2-0203 OBI https://www.charite.de/fhir/CodeSystem/observation-identifiers 8310-5_BodyTemperature true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8310-5 Body Temperature http://snomed.info/sct 386725007 Body Temperature (observable entity) Body Temperature true valid 2020-02-25 true ${37.5} Cel http://unitsofmeasure.org Cel false 422 0 Default profile is not supported for Observation. One of the following profiles is expected: Default profile is not supported for Observation. One of the following profiles is expected: diff --git a/tests/robot/OBSERVATION/11_create-clinical-frailty-scale-score.robot b/tests/robot/OBSERVATION/11_create-clinical-frailty-scale-score.robot index 49a9b125c..ebea7ff9a 100644 --- a/tests/robot/OBSERVATION/11_create-clinical-frailty-scale-score.robot +++ b/tests/robot/OBSERVATION/11_create-clinical-frailty-scale-score.robot @@ -469,7 +469,7 @@ ${vCC_URL} https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/frailty ehr.create new ehr 000_ehr_status.json create with DataAbsentReason DataAbsentReason create-clinical-frailty-scale-score.json - observation.validate response - 422 (with error message) 422 obs-6: 'dataAbsentReason SHALL only be present if Observation.value[x] is not present' failed Observation + observation.validate response - 422 (with error message) 422 obs-6: 'dataAbsentReason SHALL only be present if Observation.value.x. is not present Observation diff --git a/tests/robot/OBSERVATION/12_create_body_height.robot b/tests/robot/OBSERVATION/12_create_body_height.robot index 95b7844db..3dc8be779 100644 --- a/tests/robot/OBSERVATION/12_create_body_height.robot +++ b/tests/robot/OBSERVATION/12_create_body_height.robot @@ -330,7 +330,7 @@ ${vQSystem} http://unitsofmeasure.org ehr.create new ehr 000_ehr_status.json create with DataAbsentReason DataAbsentReason BodyHeight/create-body-height-normal.json - observation.validate response - 422 (with error message) 422 obs-6: dataAbsentReason SHALL only be present if Observation.value[x] is not present failed Observation + observation.validate response - 422 (with error message) 422 obs-6: dataAbsentReason SHALL only be present if Observation.value[x] is not present Observation @@ -484,7 +484,7 @@ ${vQSystem} http://unitsofmeasure.org Observation 23499ea6-d046-4e91-b7ab-d9cf040add72 true ${body_height-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} false valid 2020-02-25 true ${randstring} ${1234} ${1234} ${1234} 422 Observation.subject: minimum required = 1, but only found 0 .from ${body_height-url}. Observation Observation 23499ea6-d046-4e91-b7ab-d9cf040add72 true ${body_height-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true false ${1234} ${1234} ${1234} true test 2020-02-25 true ${randstring} ${1234} ${1234} ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.code Observation 23499ea6-d046-4e91-b7ab-d9cf040add72 true ${body_height-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true false ${1234} ${1234} ${1234} true valid ${12345} true ${randstring} ${1234} ${1234} ${1234} 422 Not a valid date/time .12345. Observation.effective.ofType.dateTime. - Observation 23499ea6-d046-4e91-b7ab-d9cf040add72 true ${body_height-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true false ${1234} ${1234} ${1234} true valid 2020-02-25 false ${randstring} ${1234} ${1234} ${1234} 422 vs-2: If there is no component or hasMember element then either a value[x] or a data absent reason must be present.* Observation + Observation 23499ea6-d046-4e91-b7ab-d9cf040add72 true ${body_height-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true false ${1234} ${1234} ${1234} true valid 2020-02-25 false ${randstring} ${1234} ${1234} ${1234} 422 vs-2: If there is no component or hasMember element then either a value.x. or a data absent reason must be present.* Observation diff --git a/tests/robot/OBSERVATION/13_create_patient_in_ICU.robot b/tests/robot/OBSERVATION/13_create_patient_in_ICU.robot index 0bdaca952..2e4f6c781 100644 --- a/tests/robot/OBSERVATION/13_create_patient_in_ICU.robot +++ b/tests/robot/OBSERVATION/13_create_patient_in_ICU.robot @@ -395,7 +395,7 @@ ${vCC_URL} http://snomed.info/sct ehr.create new ehr 000_ehr_status.json create with DataAbsentReason DataAbsentReason create-patient-in-icu.json - observation.validate response - 422 (with error message) 422 obs-6: dataAbsentReason SHALL only be present if Observation.value[x] is not present Observation + observation.validate response - 422 (with error message) 422 obs-6: dataAbsentReason SHALL only be present if Observation.value.x. is not present Observation From 0adf0c0780971a0b5df236f4c5f2c9184797b3cf Mon Sep 17 00:00:00 2001 From: uakoenig <urs.a.koenig@t-online.de> Date: Tue, 4 May 2021 11:18:43 +0200 Subject: [PATCH 034/141] java classes generated --- .../GECCOStudienteilnahmeComposition.java | 275 ++++ ...tudienteilnahmeCompositionContainment.java | 66 + .../GeccoStudienteilnahmeEvaluation.java | 109 ++ ...StudienteilnahmeEvaluationContainment.java | 34 + ...GeccoStudienteilnahmeKategorieElement.java | 60 + .../definition/StatusDefiningCode.java | 45 + .../definition/StudiePruefungCluster.java | 147 ++ .../StudiePruefungClusterContainment.java | 40 + .../StudiePruefungRegistrierungCluster.java | 95 ++ .../definition/StudienteilnahmeCluster.java | 98 ++ .../StudienteilnahmeClusterContainment.java | 33 + .../resources/opt/GECCO_Studienteilnahme.opt | 1345 +++++++++++++++++ 12 files changed, 2347 insertions(+) create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeComposition.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeCompositionContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeEvaluation.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeEvaluationContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeKategorieElement.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StatusDefiningCode.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungCluster.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungClusterContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungRegistrierungCluster.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeCluster.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeClusterContainment.java create mode 100644 src/main/resources/opt/GECCO_Studienteilnahme.opt diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeComposition.java new file mode 100644 index 000000000..73cfb78a4 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeComposition.java @@ -0,0 +1,275 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.generic.Participation; +import com.nedap.archie.rm.generic.PartyIdentified; +import com.nedap.archie.rm.generic.PartyProxy; +import java.lang.String; +import java.time.temporal.TemporalAccessor; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Id; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.annotations.Template; +import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; +import org.ehrbase.client.classgenerator.shareddefinition.Category; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; +import org.ehrbase.client.classgenerator.shareddefinition.Setting; +import org.ehrbase.client.classgenerator.shareddefinition.Territory; +import org.ehrbase.client.openehrclient.VersionUid; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.GeccoStudienteilnahmeEvaluation; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.GeccoStudienteilnahmeKategorieElement; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.StatusDefiningCode; + +@Entity +@Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-05-04T11:17:24.205349500+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@Template("GECCO_Studienteilnahme") +public class GECCOStudienteilnahmeComposition implements CompositionEntity { + /** + * Path: GECCO_Studienteilnahme/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: GECCO_Studienteilnahme/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: GECCO_Studienteilnahme/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: GECCO_Studienteilnahme/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: GECCO_Studienteilnahme/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]") + private List<GeccoStudienteilnahmeKategorieElement> kategorie; + + /** + * Path: GECCO_Studienteilnahme/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: GECCO_Studienteilnahme/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: GECCO_Studienteilnahme/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: GECCO_Studienteilnahme/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: GECCO_Studienteilnahme/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: GECCO_Studienteilnahme/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme + * Description: GECCO_Studienteilnahme + */ + @Path("/content[openEHR-EHR-EVALUATION.gecco_study_participation.v0]") + private GeccoStudienteilnahmeEvaluation geccoStudienteilnahme; + + /** + * Path: GECCO_Studienteilnahme/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: GECCO_Studienteilnahme/language + */ + @Path("/language") + private Language language; + + /** + * Path: GECCO_Studienteilnahme/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: GECCO_Studienteilnahme/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode ; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung ; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode ; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode ; + } + + public void setKategorie(List<GeccoStudienteilnahmeKategorieElement> kategorie) { + this.kategorie = kategorie; + } + + public List<GeccoStudienteilnahmeKategorieElement> getKategorie() { + return this.kategorie ; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue ; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public List<Participation> getParticipations() { + return this.participations ; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue ; + } + + public void setLocation(String location) { + this.location = location; + } + + public String getLocation() { + return this.location ; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility ; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode ; + } + + public void setGeccoStudienteilnahme(GeccoStudienteilnahmeEvaluation geccoStudienteilnahme) { + this.geccoStudienteilnahme = geccoStudienteilnahme; + } + + public GeccoStudienteilnahmeEvaluation getGeccoStudienteilnahme() { + return this.geccoStudienteilnahme ; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } + + public PartyProxy getComposer() { + return this.composer ; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public Language getLanguage() { + return this.language ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } + + public void setTerritory(Territory territory) { + this.territory = territory; + } + + public Territory getTerritory() { + return this.territory ; + } + + public VersionUid getVersionUid() { + return this.versionUid ; + } + + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeCompositionContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeCompositionContainment.java new file mode 100644 index 000000000..4e7a8e2af --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeCompositionContainment.java @@ -0,0 +1,66 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.generic.Participation; +import com.nedap.archie.rm.generic.PartyIdentified; +import com.nedap.archie.rm.generic.PartyProxy; +import java.lang.String; +import java.time.temporal.TemporalAccessor; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.Category; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; +import org.ehrbase.client.classgenerator.shareddefinition.Setting; +import org.ehrbase.client.classgenerator.shareddefinition.Territory; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.GeccoStudienteilnahmeEvaluation; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.GeccoStudienteilnahmeKategorieElement; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.StatusDefiningCode; + +public class GECCOStudienteilnahmeCompositionContainment extends Containment { + public SelectAqlField<GECCOStudienteilnahmeComposition> G_E_C_C_O_STUDIENTEILNAHME_COMPOSITION = new AqlFieldImp<GECCOStudienteilnahmeComposition>(GECCOStudienteilnahmeComposition.class, "", "GECCOStudienteilnahmeComposition", GECCOStudienteilnahmeComposition.class, this); + + public SelectAqlField<Category> CATEGORY_DEFINING_CODE = new AqlFieldImp<Category>(GECCOStudienteilnahmeComposition.class, "/category|defining_code", "categoryDefiningCode", Category.class, this); + + public ListSelectAqlField<Cluster> ERWEITERUNG = new ListAqlFieldImp<Cluster>(GECCOStudienteilnahmeComposition.class, "/context/other_context[at0001]/items[at0002]", "erweiterung", Cluster.class, this); + + public SelectAqlField<StatusDefiningCode> STATUS_DEFINING_CODE = new AqlFieldImp<StatusDefiningCode>(GECCOStudienteilnahmeComposition.class, "/context/other_context[at0001]/items[at0004]/value|defining_code", "statusDefiningCode", StatusDefiningCode.class, this); + + public SelectAqlField<NullFlavour> STATUS_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(GECCOStudienteilnahmeComposition.class, "/context/other_context[at0001]/items[at0004]/null_flavour|defining_code", "statusNullFlavourDefiningCode", NullFlavour.class, this); + + public ListSelectAqlField<GeccoStudienteilnahmeKategorieElement> KATEGORIE = new ListAqlFieldImp<GeccoStudienteilnahmeKategorieElement>(GECCOStudienteilnahmeComposition.class, "/context/other_context[at0001]/items[at0005]", "kategorie", GeccoStudienteilnahmeKategorieElement.class, this); + + public SelectAqlField<TemporalAccessor> START_TIME_VALUE = new AqlFieldImp<TemporalAccessor>(GECCOStudienteilnahmeComposition.class, "/context/start_time|value", "startTimeValue", TemporalAccessor.class, this); + + public ListSelectAqlField<Participation> PARTICIPATIONS = new ListAqlFieldImp<Participation>(GECCOStudienteilnahmeComposition.class, "/context/participations", "participations", Participation.class, this); + + public SelectAqlField<TemporalAccessor> END_TIME_VALUE = new AqlFieldImp<TemporalAccessor>(GECCOStudienteilnahmeComposition.class, "/context/end_time|value", "endTimeValue", TemporalAccessor.class, this); + + public SelectAqlField<String> LOCATION = new AqlFieldImp<String>(GECCOStudienteilnahmeComposition.class, "/context/location", "location", String.class, this); + + public SelectAqlField<PartyIdentified> HEALTH_CARE_FACILITY = new AqlFieldImp<PartyIdentified>(GECCOStudienteilnahmeComposition.class, "/context/health_care_facility", "healthCareFacility", PartyIdentified.class, this); + + public SelectAqlField<Setting> SETTING_DEFINING_CODE = new AqlFieldImp<Setting>(GECCOStudienteilnahmeComposition.class, "/context/setting|defining_code", "settingDefiningCode", Setting.class, this); + + public SelectAqlField<GeccoStudienteilnahmeEvaluation> GECCO_STUDIENTEILNAHME = new AqlFieldImp<GeccoStudienteilnahmeEvaluation>(GECCOStudienteilnahmeComposition.class, "/content[openEHR-EHR-EVALUATION.gecco_study_participation.v0]", "geccoStudienteilnahme", GeccoStudienteilnahmeEvaluation.class, this); + + public SelectAqlField<PartyProxy> COMPOSER = new AqlFieldImp<PartyProxy>(GECCOStudienteilnahmeComposition.class, "/composer", "composer", PartyProxy.class, this); + + public SelectAqlField<Language> LANGUAGE = new AqlFieldImp<Language>(GECCOStudienteilnahmeComposition.class, "/language", "language", Language.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(GECCOStudienteilnahmeComposition.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + public SelectAqlField<Territory> TERRITORY = new AqlFieldImp<Territory>(GECCOStudienteilnahmeComposition.class, "/territory", "territory", Territory.class, this); + + private GECCOStudienteilnahmeCompositionContainment() { + super("openEHR-EHR-COMPOSITION.registereintrag.v1"); + } + + public static GECCOStudienteilnahmeCompositionContainment getInstance() { + return new GECCOStudienteilnahmeCompositionContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeEvaluation.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeEvaluation.java new file mode 100644 index 000000000..53b24c35b --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeEvaluation.java @@ -0,0 +1,109 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datavalues.DvCodedText; +import com.nedap.archie.rm.generic.PartyProxy; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.EntryEntity; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Archetype("openEHR-EHR-EVALUATION.gecco_study_participation.v0") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-05-04T11:17:24.266245900+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +public class GeccoStudienteilnahmeEvaluation implements EntryEntity { + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Bereits an interventionellen klinischen Studien teilgenommen? + */ + @Path("/data[at0001]/items[at0002]/value") + private DvCodedText bereitsAnInterventionellenKlinischenStudienTeilgenommen; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Item tree/Bereits an interventionellen klinischen Studien teilgenommen?/null_flavour + */ + @Path("/data[at0001]/items[at0002]/null_flavour|defining_code") + private NullFlavour bereitsAnInterventionellenKlinischenStudienTeilgenommenNullFlavourDefiningCode; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Studienteilnahme + * Description: Detaillierte Informationen über die Teilnahme an einer klinischen Prüfung, Beobachtungs-, Register-, Diagnostik-, Therapiestudie oder an einem anderen medizinischen Forschungsvorhaben in der Rolle eines Studienpatienten oder Probanden. + */ + @Path("/data[at0001]/items[openEHR-EHR-CLUSTER.study_participation.v1]") + private StudienteilnahmeCluster studienteilnahme; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/subject + */ + @Path("/subject") + private PartyProxy subject; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/language + */ + @Path("/language") + private Language language; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setBereitsAnInterventionellenKlinischenStudienTeilgenommen( + DvCodedText bereitsAnInterventionellenKlinischenStudienTeilgenommen) { + this.bereitsAnInterventionellenKlinischenStudienTeilgenommen = bereitsAnInterventionellenKlinischenStudienTeilgenommen; + } + + public DvCodedText getBereitsAnInterventionellenKlinischenStudienTeilgenommen() { + return this.bereitsAnInterventionellenKlinischenStudienTeilgenommen ; + } + + public void setBereitsAnInterventionellenKlinischenStudienTeilgenommenNullFlavourDefiningCode( + NullFlavour bereitsAnInterventionellenKlinischenStudienTeilgenommenNullFlavourDefiningCode) { + this.bereitsAnInterventionellenKlinischenStudienTeilgenommenNullFlavourDefiningCode = bereitsAnInterventionellenKlinischenStudienTeilgenommenNullFlavourDefiningCode; + } + + public NullFlavour getBereitsAnInterventionellenKlinischenStudienTeilgenommenNullFlavourDefiningCode( + ) { + return this.bereitsAnInterventionellenKlinischenStudienTeilgenommenNullFlavourDefiningCode ; + } + + public void setStudienteilnahme(StudienteilnahmeCluster studienteilnahme) { + this.studienteilnahme = studienteilnahme; + } + + public StudienteilnahmeCluster getStudienteilnahme() { + return this.studienteilnahme ; + } + + public void setSubject(PartyProxy subject) { + this.subject = subject; + } + + public PartyProxy getSubject() { + return this.subject ; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public Language getLanguage() { + return this.language ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeEvaluationContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeEvaluationContainment.java new file mode 100644 index 000000000..b89eb420f --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeEvaluationContainment.java @@ -0,0 +1,34 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datavalues.DvCodedText; +import com.nedap.archie.rm.generic.PartyProxy; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +public class GeccoStudienteilnahmeEvaluationContainment extends Containment { + public SelectAqlField<GeccoStudienteilnahmeEvaluation> GECCO_STUDIENTEILNAHME_EVALUATION = new AqlFieldImp<GeccoStudienteilnahmeEvaluation>(GeccoStudienteilnahmeEvaluation.class, "", "GeccoStudienteilnahmeEvaluation", GeccoStudienteilnahmeEvaluation.class, this); + + public SelectAqlField<DvCodedText> BEREITS_AN_INTERVENTIONELLEN_KLINISCHEN_STUDIEN_TEILGENOMMEN = new AqlFieldImp<DvCodedText>(GeccoStudienteilnahmeEvaluation.class, "/data[at0001]/items[at0002]/value", "bereitsAnInterventionellenKlinischenStudienTeilgenommen", DvCodedText.class, this); + + public SelectAqlField<NullFlavour> BEREITS_AN_INTERVENTIONELLEN_KLINISCHEN_STUDIEN_TEILGENOMMEN_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(GeccoStudienteilnahmeEvaluation.class, "/data[at0001]/items[at0002]/null_flavour|defining_code", "bereitsAnInterventionellenKlinischenStudienTeilgenommenNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<StudienteilnahmeCluster> STUDIENTEILNAHME = new AqlFieldImp<StudienteilnahmeCluster>(GeccoStudienteilnahmeEvaluation.class, "/data[at0001]/items[openEHR-EHR-CLUSTER.study_participation.v1]", "studienteilnahme", StudienteilnahmeCluster.class, this); + + public SelectAqlField<PartyProxy> SUBJECT = new AqlFieldImp<PartyProxy>(GeccoStudienteilnahmeEvaluation.class, "/subject", "subject", PartyProxy.class, this); + + public SelectAqlField<Language> LANGUAGE = new AqlFieldImp<Language>(GeccoStudienteilnahmeEvaluation.class, "/language", "language", Language.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(GeccoStudienteilnahmeEvaluation.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + private GeccoStudienteilnahmeEvaluationContainment() { + super("openEHR-EHR-EVALUATION.gecco_study_participation.v0"); + } + + public static GeccoStudienteilnahmeEvaluationContainment getInstance() { + return new GeccoStudienteilnahmeEvaluationContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeKategorieElement.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeKategorieElement.java new file mode 100644 index 000000000..1df5a71cf --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeKategorieElement.java @@ -0,0 +1,60 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import java.lang.String; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.LocatableEntity; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-05-04T11:17:24.242245500+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +public class GeccoStudienteilnahmeKategorieElement implements LocatableEntity { + /** + * Path: GECCO_Studienteilnahme/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/value|value") + private String value; + + /** + * Path: GECCO_Studienteilnahme/context/Baum/Kategorie/null_flavour + */ + @Path("/null_flavour|defining_code") + private NullFlavour value2; + + /** + * Path: GECCO_Studienteilnahme/context/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setValue(String value) { + this.value = value; + } + + public String getValue() { + return this.value ; + } + + public void setValue2(NullFlavour value2) { + this.value2 = value2; + } + + public NullFlavour getValue2() { + return this.value2 ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StatusDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StatusDefiningCode.java new file mode 100644 index 000000000..229978cf5 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StatusDefiningCode.java @@ -0,0 +1,45 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition; + +import java.lang.String; +import org.ehrbase.client.classgenerator.EnumValueSet; + +public enum StatusDefiningCode implements EnumValueSet { + VORLAEUFIG("vorläufig", "*", "local", "at0011"), + + FINAL("final", "*", "local", "at0012"), + + REGISTRIERT("registriert", "*", "local", "at0010"), + + GEAENDERT("geändert", "*", "local", "at0013"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + StatusDefiningCode(String value, String description, String terminologyId, String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungCluster.java new file mode 100644 index 000000000..663fb266b --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungCluster.java @@ -0,0 +1,147 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.datavalues.DvCodedText; +import java.lang.String; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.LocatableEntity; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Archetype("openEHR-EHR-CLUSTER.study_details.v1") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-05-04T11:17:24.280244800+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +public class StudiePruefungCluster implements LocatableEntity { + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Studienteilnahme/Studie/Prüfung/Titel der Studie/Prüfung + * Description: Titel des Forschungsvorhabens. + * Comment: Zum Beispiel: "Eine randomisierte Phase-II-Studie mit nal-Iri plus 5-Fluorouracil im Vergleich zu 5-Fluorouracil bei stationären Patienten mit Cholangio- und Gallenblasenkarzinom, die zuvor mit Gemcitabin oder Gemcitabin-haltigen Therapien behandelt wurden." + */ + @Path("/items[at0001]/value") + private DvCodedText titelDerStudiePruefung; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Item tree/Studienteilnahme/Studie/Prüfung/Titel der Studie/Prüfung/null_flavour + */ + @Path("/items[at0001]/null_flavour|defining_code") + private NullFlavour titelDerStudiePruefungNullFlavourDefiningCode; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Studienteilnahme/Studie/Prüfung/Beschreibung + * Description: Kurze Beschreibung des Forschungsvorhabens. + * Comment: Beschreibung des Forschungsvorhabens in leicht verständlicher Formulierung für Laien. + */ + @Path("/items[at0004]/value|value") + private String beschreibungValue; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Item tree/Studienteilnahme/Studie/Prüfung/Beschreibung/null_flavour + */ + @Path("/items[at0004]/null_flavour|defining_code") + private NullFlavour beschreibungNullFlavourDefiningCode; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Studienteilnahme/Studie/Prüfung/Registrierung + * Description: Registrierung der Studie in Registern. + * Comment: Wenn die Studie auf der Webseite Clinicaltrials.gov registriert ist, besitzt sie eine US NCT-Nummer. Zum Beispiel: NCT03772405. + * Eine EudraCT Nummer wird von der Europäischen Arzneimittelagentur vergeben. Wenn die klinische Prüfung auf der Webseite Current Controlled Trials registriert ist, besitzt sie eine ISRCTN-Nummer (International Standard Randomised Controlled Trial Number). + */ + @Path("/items[at0033]") + private List<StudiePruefungRegistrierungCluster> registrierung; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Studienteilnahme/Studie/Prüfung/Studienzentrum + * Description: Detailangaben über die teilnehmende medizinische Einrichtung wie Klinik oder Praxis, die Patienten gemäß den Studienvorgaben rekrutiert und die Daten erhebt. + * Comment: Zum Beispiel: Name der Einrichtung, Adresse, Name des Prüfers, Kontaktdetails, zuständige Ethikkommission, Datum der Genehmigung der Teilnahme, beteiligte Personen und weitere Details. Hier können auch demographische Archetypen eingefügt werden. + */ + @Path("/items[at0023]") + private List<Cluster> studienzentrum; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Studienteilnahme/Studie/Prüfung/Zusätzliche Details + * Description: Zusätzliche strukturierte Angaben zur Studie. + * Comment: Zum Beispiel detaillierte Angaben über die Genehmigungsbehörde, zum Studiendesign oder -plan, zum Sponsor, zu den Therapiearmen und/oder zum Studienmedikament oder Ein-/Ausschlusskriterien als Voraussetzung für eine Studienteilnahme. + */ + @Path("/items[at0014]") + private List<Cluster> zusaetzlicheDetails; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Studienteilnahme/Studie/Prüfung/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setTitelDerStudiePruefung(DvCodedText titelDerStudiePruefung) { + this.titelDerStudiePruefung = titelDerStudiePruefung; + } + + public DvCodedText getTitelDerStudiePruefung() { + return this.titelDerStudiePruefung ; + } + + public void setTitelDerStudiePruefungNullFlavourDefiningCode( + NullFlavour titelDerStudiePruefungNullFlavourDefiningCode) { + this.titelDerStudiePruefungNullFlavourDefiningCode = titelDerStudiePruefungNullFlavourDefiningCode; + } + + public NullFlavour getTitelDerStudiePruefungNullFlavourDefiningCode() { + return this.titelDerStudiePruefungNullFlavourDefiningCode ; + } + + public void setBeschreibungValue(String beschreibungValue) { + this.beschreibungValue = beschreibungValue; + } + + public String getBeschreibungValue() { + return this.beschreibungValue ; + } + + public void setBeschreibungNullFlavourDefiningCode( + NullFlavour beschreibungNullFlavourDefiningCode) { + this.beschreibungNullFlavourDefiningCode = beschreibungNullFlavourDefiningCode; + } + + public NullFlavour getBeschreibungNullFlavourDefiningCode() { + return this.beschreibungNullFlavourDefiningCode ; + } + + public void setRegistrierung(List<StudiePruefungRegistrierungCluster> registrierung) { + this.registrierung = registrierung; + } + + public List<StudiePruefungRegistrierungCluster> getRegistrierung() { + return this.registrierung ; + } + + public void setStudienzentrum(List<Cluster> studienzentrum) { + this.studienzentrum = studienzentrum; + } + + public List<Cluster> getStudienzentrum() { + return this.studienzentrum ; + } + + public void setZusaetzlicheDetails(List<Cluster> zusaetzlicheDetails) { + this.zusaetzlicheDetails = zusaetzlicheDetails; + } + + public List<Cluster> getZusaetzlicheDetails() { + return this.zusaetzlicheDetails ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungClusterContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungClusterContainment.java new file mode 100644 index 000000000..62182ad0a --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungClusterContainment.java @@ -0,0 +1,40 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.datavalues.DvCodedText; +import java.lang.String; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +public class StudiePruefungClusterContainment extends Containment { + public SelectAqlField<StudiePruefungCluster> STUDIE_PRUEFUNG_CLUSTER = new AqlFieldImp<StudiePruefungCluster>(StudiePruefungCluster.class, "", "StudiePruefungCluster", StudiePruefungCluster.class, this); + + public SelectAqlField<DvCodedText> TITEL_DER_STUDIE_PRUEFUNG = new AqlFieldImp<DvCodedText>(StudiePruefungCluster.class, "/items[at0001]/value", "titelDerStudiePruefung", DvCodedText.class, this); + + public SelectAqlField<NullFlavour> TITEL_DER_STUDIE_PRUEFUNG_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(StudiePruefungCluster.class, "/items[at0001]/null_flavour|defining_code", "titelDerStudiePruefungNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> BESCHREIBUNG_VALUE = new AqlFieldImp<String>(StudiePruefungCluster.class, "/items[at0004]/value|value", "beschreibungValue", String.class, this); + + public SelectAqlField<NullFlavour> BESCHREIBUNG_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(StudiePruefungCluster.class, "/items[at0004]/null_flavour|defining_code", "beschreibungNullFlavourDefiningCode", NullFlavour.class, this); + + public ListSelectAqlField<StudiePruefungRegistrierungCluster> REGISTRIERUNG = new ListAqlFieldImp<StudiePruefungRegistrierungCluster>(StudiePruefungCluster.class, "/items[at0033]", "registrierung", StudiePruefungRegistrierungCluster.class, this); + + public ListSelectAqlField<Cluster> STUDIENZENTRUM = new ListAqlFieldImp<Cluster>(StudiePruefungCluster.class, "/items[at0023]", "studienzentrum", Cluster.class, this); + + public ListSelectAqlField<Cluster> ZUSAETZLICHE_DETAILS = new ListAqlFieldImp<Cluster>(StudiePruefungCluster.class, "/items[at0014]", "zusaetzlicheDetails", Cluster.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(StudiePruefungCluster.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + private StudiePruefungClusterContainment() { + super("openEHR-EHR-CLUSTER.study_details.v1"); + } + + public static StudiePruefungClusterContainment getInstance() { + return new StudiePruefungClusterContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungRegistrierungCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungRegistrierungCluster.java new file mode 100644 index 000000000..2b111f8a8 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungRegistrierungCluster.java @@ -0,0 +1,95 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datavalues.DvCodedText; +import java.lang.String; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.LocatableEntity; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-05-04T11:17:24.286246+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +public class StudiePruefungRegistrierungCluster implements LocatableEntity { + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Studienteilnahme/Studie/Prüfung/Registrierung/Registername + * Description: Studienregister, wo die Studie registriert ist und eine eindeutige Identifikationsnummer besitzt. + * Comment: Zum Beispiel: Europäischen Arzneimittelagentur (EudraCT) oder Webseite Clinicaltrials.gov (US NCT-Nummer). + */ + @Path("/items[at0035]/value") + private DvCodedText registername; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Item tree/Studienteilnahme/Studie/Prüfung/Registrierung/Registername/null_flavour + */ + @Path("/items[at0035]/null_flavour|defining_code") + private NullFlavour registernameNullFlavourDefiningCode; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Studienteilnahme/Studie/Prüfung/Registrierung/Registrierungsnummer + * Description: Eindeutige Identifikationsnummer an dem angezeigten Register. + * Comment: Zum Beispiel die EudraCT Nummer, die von der Europäischen Arzneimittelagentur vergeben wird, oder ISRCTN (International Standard Randomised Controlled Trial Number). + * Wenn die klinische Prüfung auf der Webseite Current Controlled Trials registriert ist, besitzt sie eine ISRCTN-Nummer. + */ + @Path("/items[at0034]/value|value") + private String registrierungsnummerValue; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Item tree/Studienteilnahme/Studie/Prüfung/Registrierung/Registrierungsnummer/null_flavour + */ + @Path("/items[at0034]/null_flavour|defining_code") + private NullFlavour registrierungsnummerNullFlavourDefiningCode; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Studienteilnahme/Studie/Prüfung/Registrierung/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setRegistername(DvCodedText registername) { + this.registername = registername; + } + + public DvCodedText getRegistername() { + return this.registername ; + } + + public void setRegisternameNullFlavourDefiningCode( + NullFlavour registernameNullFlavourDefiningCode) { + this.registernameNullFlavourDefiningCode = registernameNullFlavourDefiningCode; + } + + public NullFlavour getRegisternameNullFlavourDefiningCode() { + return this.registernameNullFlavourDefiningCode ; + } + + public void setRegistrierungsnummerValue(String registrierungsnummerValue) { + this.registrierungsnummerValue = registrierungsnummerValue; + } + + public String getRegistrierungsnummerValue() { + return this.registrierungsnummerValue ; + } + + public void setRegistrierungsnummerNullFlavourDefiningCode( + NullFlavour registrierungsnummerNullFlavourDefiningCode) { + this.registrierungsnummerNullFlavourDefiningCode = registrierungsnummerNullFlavourDefiningCode; + } + + public NullFlavour getRegistrierungsnummerNullFlavourDefiningCode() { + return this.registrierungsnummerNullFlavourDefiningCode ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeCluster.java new file mode 100644 index 000000000..61c1de7f8 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeCluster.java @@ -0,0 +1,98 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.datavalues.DvCodedText; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.LocatableEntity; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Archetype("openEHR-EHR-CLUSTER.study_participation.v1") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-05-04T11:17:24.274245200+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +public class StudienteilnahmeCluster implements LocatableEntity { + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Studienteilnahme/Studie/Prüfung + * Description: Detaillierte Informationen über eine klinische Prüfung, Beobachtungs-, Register-, Diagnostik-, Therapiestudie oder ein anderes medizinisches Forschungsvorhaben an Menschen. + */ + @Path("/items[openEHR-EHR-CLUSTER.study_details.v1]") + private StudiePruefungCluster studiePruefung; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Studienteilnahme/Studienzentrum + * Description: Detailangaben über das Studienzentrum, das für den Patienten zuständig ist. + * Comment: Zum Beispiel: Name der Einrichtung, Adresse, Name des Prüfers, Kontaktdetails und weitere Details. Hier können Demographische Archetypen eingefügt werden. + */ + @Path("/items[at0015]") + private List<Cluster> studienzentrum; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Studienteilnahme/Bestätigte Covid-19-Diagnose als Hauptursache für Aufnahme in Studie + * Description: Zusätzliche Informationen zu der Studienteilnahme. + */ + @Path("/items[at0014 and name/value='Bestätigte Covid-19-Diagnose als Hauptursache für Aufnahme in Studie']/value") + private DvCodedText bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudie; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Item tree/Studienteilnahme/Bestätigte Covid-19-Diagnose als Hauptursache für Aufnahme in Studie/null_flavour + */ + @Path("/items[at0014 and name/value='Bestätigte Covid-19-Diagnose als Hauptursache für Aufnahme in Studie']/null_flavour|defining_code") + private NullFlavour bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieNullFlavourDefiningCode; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Studienteilnahme/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setStudiePruefung(StudiePruefungCluster studiePruefung) { + this.studiePruefung = studiePruefung; + } + + public StudiePruefungCluster getStudiePruefung() { + return this.studiePruefung ; + } + + public void setStudienzentrum(List<Cluster> studienzentrum) { + this.studienzentrum = studienzentrum; + } + + public List<Cluster> getStudienzentrum() { + return this.studienzentrum ; + } + + public void setBestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudie( + DvCodedText bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudie) { + this.bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudie = bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudie; + } + + public DvCodedText getBestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudie() { + return this.bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudie ; + } + + public void setBestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieNullFlavourDefiningCode( + NullFlavour bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieNullFlavourDefiningCode) { + this.bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieNullFlavourDefiningCode = bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieNullFlavourDefiningCode; + } + + public NullFlavour getBestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieNullFlavourDefiningCode( + ) { + return this.bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieNullFlavourDefiningCode ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeClusterContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeClusterContainment.java new file mode 100644 index 000000000..9f1e9ee96 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeClusterContainment.java @@ -0,0 +1,33 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.datavalues.DvCodedText; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +public class StudienteilnahmeClusterContainment extends Containment { + public SelectAqlField<StudienteilnahmeCluster> STUDIENTEILNAHME_CLUSTER = new AqlFieldImp<StudienteilnahmeCluster>(StudienteilnahmeCluster.class, "", "StudienteilnahmeCluster", StudienteilnahmeCluster.class, this); + + public SelectAqlField<StudiePruefungCluster> STUDIE_PRUEFUNG = new AqlFieldImp<StudiePruefungCluster>(StudienteilnahmeCluster.class, "/items[openEHR-EHR-CLUSTER.study_details.v1]", "studiePruefung", StudiePruefungCluster.class, this); + + public ListSelectAqlField<Cluster> STUDIENZENTRUM = new ListAqlFieldImp<Cluster>(StudienteilnahmeCluster.class, "/items[at0015]", "studienzentrum", Cluster.class, this); + + public SelectAqlField<DvCodedText> BESTAETIGTE_COVID19_DIAGNOSE_ALS_HAUPTURSACHE_FUER_AUFNAHME_IN_STUDIE = new AqlFieldImp<DvCodedText>(StudienteilnahmeCluster.class, "/items[at0014]/value", "bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudie", DvCodedText.class, this); + + public SelectAqlField<NullFlavour> BESTAETIGTE_COVID19_DIAGNOSE_ALS_HAUPTURSACHE_FUER_AUFNAHME_IN_STUDIE_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(StudienteilnahmeCluster.class, "/items[at0014]/null_flavour|defining_code", "bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(StudienteilnahmeCluster.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + private StudienteilnahmeClusterContainment() { + super("openEHR-EHR-CLUSTER.study_participation.v1"); + } + + public static StudienteilnahmeClusterContainment getInstance() { + return new StudienteilnahmeClusterContainment(); + } +} diff --git a/src/main/resources/opt/GECCO_Studienteilnahme.opt b/src/main/resources/opt/GECCO_Studienteilnahme.opt new file mode 100644 index 000000000..5bd0e4138 --- /dev/null +++ b/src/main/resources/opt/GECCO_Studienteilnahme.opt @@ -0,0 +1,1345 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<template xmlns="http://schemas.openehr.org/v1"> + <language> + <terminology_id> + <value>ISO_639-1</value> + </terminology_id> + <code_string>de</code_string> + </language> + <description> + <original_author id="Name">Sarah Ballout</original_author> + <original_author id="Email">ballout.sarah@mh-hannover.de</original_author> + <original_author id="Organisation">Peter L. Reichertz Institut für Medizinische Informatik</original_author> + <other_contributors>Antje Wulff</other_contributors> + <lifecycle_state>published</lifecycle_state> + <other_details id="MetaDataSet:Sample Set ">Template metadata sample set </other_details> + <other_details id="Acknowledgements"></other_details> + <other_details id="Business Process Level"></other_details> + <other_details id="Care setting"></other_details> + <other_details id="Client group"></other_details> + <other_details id="Clinical Record Element"></other_details> + <other_details id="Copyright"></other_details> + <other_details id="Issues"></other_details> + <other_details id="Owner"></other_details> + <other_details id="Sign off"></other_details> + <other_details id="Speciality"></other_details> + <other_details id="User roles"></other_details> + <other_details id="MD5-CAM-1.0.1">6d363db61d2440034fe4c34c462a143a</other_details> + <other_details id="PARENT:MD5-CAM-1.0.1">8BD8D5F850A9DEE8A16075105D36FD32</other_details> + <other_details id="build_uid">f8e06c79-0e80-31be-987b-2eb2975e7abf</other_details> + <other_details id="Generated By">Archetype Designer v1.18.6, user=test, repositoryId=gecco-num</other_details> + <details> + <language> + <terminology_id> + <value>ISO_639-1</value> + </terminology_id> + <code_string>de</code_string> + </language> + <purpose>Zur Repräsentation von Informationen, über die Teilnahme an einer klinischen Prüfung, Beobachtungs-, Register-, Diagnostik-, Therapiestudie oder an einem anderen medizinischen Forschungsvorhaben im Rahmen des FoDaPl-Projektes / GECCO-Datensatzes.</purpose> + <keywords>Studie</keywords> + <keywords>Studienteilnahme</keywords> + <keywords>Einverständniserklärung</keywords> + <keywords>Prüfung</keywords> + <keywords>Clinical Trial</keywords> + <keywords>GECCO</keywords> + <keywords>NUM</keywords> + <keywords>FoDaPl</keywords> + <use>Für die Abbildung von Informationen, über die Teilnahme an einer klinischen Prüfung, Beobachtungs-, Register-, Diagnostik-, Therapiestudie oder an einem anderen medizinischen Forschungsvorhaben im Rahmen des FoDaPl-Projektes / GECCO-Datensatzes.</use> + <misuse>Nicht zur Repräsentation von Personendaten verwenden.</misuse> + </details> + </description> + <uid> + <value>ff1e5cae-775e-459c-8a0f-e504d0145365</value> + </uid> + <template_id> + <value>GECCO_Studienteilnahme</value> + </template_id> + <concept>GECCO_Studienteilnahme</concept> + <definition> + <rm_type_name>COMPOSITION</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <rm_attribute_name>category</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <terminology_id> + <value>openehr</value> + </terminology_id> + <code_list>433</code_list> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <rm_attribute_name>context</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>EVENT_CONTEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>other_context</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ITEM_TREE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0001</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>false</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0002</node_id> + <includes> + <string_expression>archetype_id/value matches {/.*/}</string_expression> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0004</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <terminology_id> + <value>local</value> + </terminology_id> + <code_list>at0010</code_list> + <code_list>at0011</code_list> + <code_list>at0012</code_list> + <code_list>at0013</code_list> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>false</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0005</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <item xsi:type="C_STRING"> + <list>survey</list> + <list_open>true</list_open> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <upper_included>false</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </interval> + </cardinality> + </attributes> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <rm_attribute_name>content</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>EVALUATION</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>data</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ITEM_TREE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0001</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0002</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <terminology_id> + <value>SNOMED Clinical Terms</value> + </terminology_id> + <code_list>373066001</code_list> + <code_list>373067005</code_list> + <code_list>261665006</code_list> + <code_list>74964007</code_list> + <code_list>385432009</code_list> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0001</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <terminology_id> + <value>eCRF</value> + </terminology_id> + <code_list>03</code_list> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0004</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>false</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0033</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0035</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <terminology_id> + <value>eCRF</value> + </terminology_id> + <code_list>04</code_list> + <code_list>05</code_list> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0034</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + </children> + </attributes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <upper_included>false</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </interval> + </cardinality> + </attributes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>false</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0023</node_id> + <includes> + <string_expression>archetype_id/value matches {/.*/}</string_expression> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>false</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0014</node_id> + <includes> + <string_expression>archetype_id/value matches {/.*/}</string_expression> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <upper_included>false</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </interval> + </cardinality> + </attributes> + <archetype_id> + <value>openEHR-EHR-CLUSTER.study_details.v1</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="text">Studie/Prüfung</items> + <items id="description">Detaillierte Informationen über eine klinische Prüfung, Beobachtungs-, Register-, Diagnostik-, Therapiestudie oder ein anderes medizinisches Forschungsvorhaben an Menschen.</items> + </term_definitions> + <term_definitions code="at0001"> + <items id="text">Titel der Studie/Prüfung</items> + <items id="description">Titel des Forschungsvorhabens.</items> + <items id="comment">Zum Beispiel: "Eine randomisierte Phase-II-Studie mit nal-Iri plus 5-Fluorouracil im Vergleich zu 5-Fluorouracil bei stationären Patienten mit Cholangio- und Gallenblasenkarzinom, die zuvor mit Gemcitabin oder Gemcitabin-haltigen Therapien behandelt wurden."</items> + </term_definitions> + <term_definitions code="at0002"> + <items id="text">Studien Code</items> + <items id="description">Die eindeutige Bezeichnung der Studie, welche der Sponsor (Studienverantwortliche) vergeben hat.</items> + <items id="comment">Jedes Studienvorhaben wird nach einem Prüfplan (Studienprotokoll) durchgeführt, der durch den Verantwortlichen der Studie eindeutig bezeichnet wird, z. B. AIO-HEP-0116.</items> + </term_definitions> + <term_definitions code="at0003"> + <items id="text">Studientyp</items> + <items id="description">Beschreibt die Art einer Studie.</items> + <items id="comment">Zum Beispiel: Interventionelle klinische Prüfung, Observationsstudie, Registerstudie, Bioäquivalenz-Studie, Medizinproduktestudie oder andere.</items> + </term_definitions> + <term_definitions code="at0004"> + <items id="text">Beschreibung</items> + <items id="description">Kurze Beschreibung des Forschungsvorhabens.</items> + <items id="comment">Beschreibung des Forschungsvorhabens in leicht verständlicher Formulierung für Laien.</items> + </term_definitions> + <term_definitions code="at0005"> + <items id="text">Status</items> + <items id="description">Status der Studie.</items> + <items id="comment">Der Stand der Studie im zeitlichen Prozessverlauf.</items> + </term_definitions> + <term_definitions code="at0010"> + <items id="text">Beginn der Studie</items> + <items id="description">Genaues oder geschätztes Datum, wann die Studie beginnt oder begonnen hat.</items> + <items id="comment">Das Datum, an dem der erste Teilnehmer in die Studie eingeschlossen wird.</items> + </term_definitions> + <term_definitions code="at0012"> + <items id="text">Sponsor</items> + <items id="description">Name des Sponsors.</items> + <items id="comment">Angaben über eine natürliche oder juristische Person, die die Verantwortung für die Veranlassung, Organisation und Finanzierung eines Forschungsvorhabens bei Menschen übernimmt. + Zum Beispiel: Novartis AG.</items> + </term_definitions> + <term_definitions code="at0013"> + <items id="text">Studienleiter</items> + <items id="description">Name des ärztlichen Leiters des Studienvorhabens.</items> + <items id="comment">Name einer Person, die die ärztliche Leitung der Studie übernimmt.</items> + </term_definitions> + <term_definitions code="at0014"> + <items id="text">Zusätzliche Details</items> + <items id="description">Zusätzliche strukturierte Angaben zur Studie.</items> + <items id="comment">Zum Beispiel detaillierte Angaben über die Genehmigungsbehörde, zum Studiendesign oder -plan, zum Sponsor, zu den Therapiearmen und/oder zum Studienmedikament oder Ein-/Ausschlusskriterien als Voraussetzung für eine Studienteilnahme.</items> + </term_definitions> + <term_definitions code="at0015"> + <items id="text">Ende der Studie</items> + <items id="description">Genaues oder geschätztes Datum für das Ende des Studienvorhabens.</items> + <items id="comment">Das Datum, an dem der zuletzt verbleibende Teilnehmer die Studie beendet hat.</items> + </term_definitions> + <term_definitions code="at0016"> + <items id="text">Phase 0</items> + <items id="description">Angabe, ob es sich um eine klinische Prüfung der Phase 0 handelt.</items> + <items id="comment">Eine Forschungsphase, die vor traditionellen Phase-I-Studien durchgeführt wird, um zu untersuchen, wie oder ob ein Medikament den menschlichen Körper beeinflusst. Explorative Studie ohne therapeutische oder diagnostische Ziele (z. B. Screening-Studie, Mikrodosis-Studie).</items> + </term_definitions> + <term_definitions code="at0017"> + <items id="text">Phase I</items> + <items id="description">Angabe, ob es sich um eine klinische Prüfung der Phase I handelt.</items> + <items id="comment">Eine Forschungsphase, die sich mit der Sicherheit eines Arzneimittels befasst. Die Studie wird in der Regel mit gesunden Freiwilligen durchgeführt.</items> + </term_definitions> + <term_definitions code="at0018"> + <items id="text">Phase II</items> + <items id="description">Angabe, ob es sich um eine klinische Prüfung der Phase II handelt.</items> + <items id="comment">In dieser Phase wird vor allem untersucht, ob das Prüfpräparat wirksam und verträglich ist. Außerdem dient diese Phase dazu, die richtige Dosis zu finden.</items> + </term_definitions> + <term_definitions code="at0019"> + <items id="text">Phase III</items> + <items id="description">Angabe, ob es sich um eine klinische Prüfung der Phase III handelt.</items> + <items id="comment">Eine Forschungsphase, in der mehr Informationen über die Sicherheit und Wirksamkeit eines Arzneimittels gesammelt werden, indem verschiedene Populationen und unterschiedliche Dosierungen untersucht werden und das Arzneimittel in Kombination mit anderen Arzneimitteln angewendet wird.</items> + </term_definitions> + <term_definitions code="at0020"> + <items id="text">Phase IV</items> + <items id="description">Angabe, ob es sich um eine klinische Prüfung der Phase IV handelt.</items> + <items id="comment">Eine Phase der Forschung mit einem bereits zugelassenem Medikament. Dazu gehört z. B. eine Post-Marketing-Studie. In dieser Studie werden zusätzliche Informationen zur Sicherheit, Wirksamkeit oder optimalen Verwendung eines Arzneimittels gesammelt.</items> + </term_definitions> + <term_definitions code="at0023"> + <items id="text">Studienzentrum</items> + <items id="description">Detailangaben über die teilnehmende medizinische Einrichtung wie Klinik oder Praxis, die Patienten gemäß den Studienvorgaben rekrutiert und die Daten erhebt.</items> + <items id="comment">Zum Beispiel: Name der Einrichtung, Adresse, Name des Prüfers, Kontaktdetails, zuständige Ethikkommission, Datum der Genehmigung der Teilnahme, beteiligte Personen und weitere Details. Hier können auch demographische Archetypen eingefügt werden. </items> + </term_definitions> + <term_definitions code="at0024"> + <items id="text">In Vorbereitung</items> + <items id="description">Es wurde mit der Rekrutierung der Teilnehmer noch nicht begonnen.</items> + </term_definitions> + <term_definitions code="at0025"> + <items id="text">Rekrutierung</items> + <items id="description">Derzeit werden Teilnehmer für die Studie rekrutiert.</items> + </term_definitions> + <term_definitions code="at0026"> + <items id="text">Einladung zum Screening</items> + <items id="description">Die künftigen Teilnehmer für die Studie werden derzeit aus einer Population oder einer Gruppe von Personen ausgewählt und zur Überprüfung der Eignungskriterien eingeladen.</items> + </term_definitions> + <term_definitions code="at0027"> + <items id="text">Aktiv, keine Rekrutierung</items> + <items id="description">Die Studie läuft, aber potenzielle Teilnehmer werden derzeit nicht rekrutiert oder eingeschrieben.</items> + </term_definitions> + <term_definitions code="at0028"> + <items id="text">Vorübergehend unterbrochen</items> + <items id="description">Die Studie wurde vorzeitig gestoppt, kann jedoch erneut gestartet werden.</items> + </term_definitions> + <term_definitions code="at0029"> + <items id="text">Abgeschlossen</items> + <items id="description">Die Studie wurde regulär beendet.</items> + </term_definitions> + <term_definitions code="at0030"> + <items id="text">Vorzeitiges Ende</items> + <items id="description">Die Studie wurde vorzeitig beendet und wird nicht erneut gestartet. Teilnehmer werden nicht mehr untersucht oder behandelt.</items> + </term_definitions> + <term_definitions code="at0031"> + <items id="text">Widerrufen</items> + <items id="description">Die Studie wurde vorzeitig abgebrochen, bevor der erste Teilnehmer eingeschlossen wurde.</items> + </term_definitions> + <term_definitions code="at0032"> + <items id="text">Unbekannt</items> + <items id="description">Der Status der Studie kann nicht ermittelt werden.</items> + </term_definitions> + <term_definitions code="at0033"> + <items id="text">Registrierung</items> + <items id="description">Registrierung der Studie in Registern.</items> + <items id="comment">Wenn die Studie auf der Webseite Clinicaltrials.gov registriert ist, besitzt sie eine US NCT-Nummer. Zum Beispiel: NCT03772405. +Eine EudraCT Nummer wird von der Europäischen Arzneimittelagentur vergeben. Wenn die klinische Prüfung auf der Webseite Current Controlled Trials registriert ist, besitzt sie eine ISRCTN-Nummer (International Standard Randomised Controlled Trial Number). </items> + </term_definitions> + <term_definitions code="at0034"> + <items id="text">Registrierungsnummer</items> + <items id="description">Eindeutige Identifikationsnummer an dem angezeigten Register.</items> + <items id="comment">Zum Beispiel die EudraCT Nummer, die von der Europäischen Arzneimittelagentur vergeben wird, oder ISRCTN (International Standard Randomised Controlled Trial Number). +Wenn die klinische Prüfung auf der Webseite Current Controlled Trials registriert ist, besitzt sie eine ISRCTN-Nummer.</items> + </term_definitions> + <term_definitions code="at0035"> + <items id="text">Registername</items> + <items id="description">Studienregister, wo die Studie registriert ist und eine eindeutige Identifikationsnummer besitzt.</items> + <items id="comment">Zum Beispiel: Europäischen Arzneimittelagentur (EudraCT) oder Webseite Clinicaltrials.gov (US NCT-Nummer).</items> + </term_definitions> + <term_definitions code="eCRF::03"> + <items id="text">Participation in interventional clinical trials</items> + </term_definitions> + <term_definitions code="eCRF::04"> + <items id="text">EudraCT Number‎</items> + </term_definitions> + <term_definitions code="eCRF::05"> + <items id="text">NCT number</items> + </term_definitions> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>false</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0015</node_id> + <includes> + <string_expression>archetype_id/value matches {/.*/}</string_expression> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0014</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <terminology_id> + <value>SNOMED Clinical Terms</value> + </terminology_id> + <code_list>373066001</code_list> + <code_list>373067005</code_list> + <code_list>261665006</code_list> + <code_list>74964007</code_list> + <code_list>385432009</code_list> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <match_negated>false</match_negated> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id></node_id> + <item xsi:type="C_STRING"> + <list>Bestätigte Covid-19-Diagnose als Hauptursache für Aufnahme in Studie</list> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <upper_included>false</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </interval> + </cardinality> + </attributes> + <archetype_id> + <value>openEHR-EHR-CLUSTER.study_participation.v1</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="text">Studienteilnahme</items> + <items id="description">Detaillierte Informationen über die Teilnahme an einer klinischen Prüfung, Beobachtungs-, Register-, Diagnostik-, Therapiestudie oder an einem anderen medizinischen Forschungsvorhaben in der Rolle eines Studienpatienten oder Probanden.</items> + </term_definitions> + <term_definitions code="at0001"> + <items id="text">Name der Studie</items> + <items id="description">Bezeichnung der Studie bzw. der klinischen Prüfung, an welcher der Patient teilnimmt.</items> + <items id="comment">Der Titel oder Studiencode der Studie, z. B. AIO-HEP-0116.</items> + </term_definitions> + <term_definitions code="at0002"> + <items id="text">Studie</items> + <items id="description">Strukturierte Angaben zur Studie, an welcher der Patient teilnimmt.</items> + <items id="comment">Zum Beispiel: Studienbeschreibung, Typ der Studie, Sponsor, Studienzentrum, Dauer der Studie usw.</items> + </term_definitions> + <term_definitions code="at0003"> + <items id="text">Beginn der Teilnahme</items> + <items id="description">Datum, wann der Patient in die Studie eingeschlossen wurde.</items> + <items id="comment">Das Datumfeld kann leer bleiben, wenn der Teilnahmestatus auf "Informiert" oder "Eingewilligt" gesetzt ist.</items> + </term_definitions> + <term_definitions code="at0004"> + <items id="text">Ende der Teilnahme</items> + <items id="description">Datum, wann der Patient die Studie beendet hat.</items> + <items id="comment">Das Datumfeld kann leer bleiben, wenn der Teilnahmestatus auf "Informiert", "Eingewilligt", "Screening-Phase", "Eingeschlossen" oder "Follow-up" gesetzt ist.</items> + </term_definitions> + <term_definitions code="at0005"> + <items id="text">Status</items> + <items id="description">Status der Teilnahme.</items> + <items id="comment">Ab dem Zeitpunkt, wann ein Patient für eine Studie als Teilnehmer in Frage kommt und darüber informiert wird, kann seine Teilnahme verschiedene Status durchlaufen.</items> + </term_definitions> + <term_definitions code="at0006"> + <items id="text">Informiert</items> + <items id="description">Der Patient wurde über die Studie informiert, aber es wurde noch keine Einwilligung zur Teilnahme erteilt.</items> + </term_definitions> + <term_definitions code="at0007"> + <items id="text">Eingewilligt</items> + <items id="description">Die Einwilligung zur Teilnahme wurde vom Patienten erteilt, aber er wurde in die Studie noch nicht eingeschlossen.</items> + </term_definitions> + <term_definitions code="at0008"> + <items id="text">Screening-Phase</items> + <items id="description">Die Eignungskriterien des Patienten werden derzeit überprüft, bevor eine Intervention stattfindet.</items> + </term_definitions> + <term_definitions code="at0009"> + <items id="text">Eingeschlossen</items> + <items id="description">Der Patient wurde in die Studie eingeschlossen.</items> + </term_definitions> + <term_definitions code="at0010"> + <items id="text">Widerrufen</items> + <items id="description">Der Patient hat seine Einwilligung zurückgezogen, nachdem er bereits eingeschlossen wurde.</items> + </term_definitions> + <term_definitions code="at0011"> + <items id="text">Abgebrochen/Ausgeschlossen</items> + <items id="description">Der Patient hat die Studie aus diversen Gründen von sich aus abgebrochen oder er wurde von Studienverantwortlichen ausgeschlossen.</items> + </term_definitions> + <term_definitions code="at0012"> + <items id="text">Abgeschlossen</items> + <items id="description">Der Patient hat seine Teilnahme regulär beendet.</items> + </term_definitions> + <term_definitions code="at0014"> + <items id="text">Bestätigte Covid-19-Diagnose als Hauptursache für Aufnahme in Studie</items> + <items id="description">Zusätzliche Informationen zu der Studienteilnahme.</items> + </term_definitions> + <term_definitions code="at0015"> + <items id="text">Studienzentrum</items> + <items id="description">Detailangaben über das Studienzentrum, das für den Patienten zuständig ist.</items> + <items id="comment">Zum Beispiel: Name der Einrichtung, Adresse, Name des Prüfers, Kontaktdetails und weitere Details. Hier können Demographische Archetypen eingefügt werden. </items> + </term_definitions> + <term_definitions code="at0016"> + <items id="text">Identifikation</items> + <items id="description">Die Bezeichnung oder Kennung des Patienten in der Studie.</items> + <items id="comment">Eine eindeutige Bezeichnung des Patienten in der Studie, meist als Patienten-/Probandennummer oder Patienten ID/Probanden ID genannt.</items> + </term_definitions> + <term_definitions code="at0017"> + <items id="text">Follow-Up</items> + <items id="description">Der Patient befindet sich in der Nachbeobachtungsphase.</items> + </term_definitions> + <term_definitions code="at0018"> + <items id="text">Rechtsgrundlage</items> + <items id="description">Rechtliche Rahmen oder Regeln für die Teilnahme.</items> + <items id="comment">Zur Sicherheit der Patienten dürfen Forschungen am Menschen nur durchgeführt werden, wenn zahlreiche Gesetze und Richtlinien eingehalten werden. Hier können Gesetze und Richtlinien, nach welchen die Teilnahme an der Studie geregelt wird, benannt werden, z.B. das Arzneimittelgesetz (AMG) und die GCP-Verordnung bei einer in Deutschland durchgeführten klinischen Arzneimittelstudie.</items> + </term_definitions> + <term_definitions code="SNOMED Clinical Terms::373066001"> + <items id="text">Yes (qualifier value)</items> + </term_definitions> + <term_definitions code="SNOMED Clinical Terms::373067005"> + <items id="text">No (qualifier value)</items> + </term_definitions> + <term_definitions code="SNOMED Clinical Terms::261665006"> + <items id="text">Unknown (qualifier value)</items> + </term_definitions> + <term_definitions code="SNOMED Clinical Terms::74964007"> + <items id="text">Other (qualifier value)</items> + </term_definitions> + <term_definitions code="SNOMED Clinical Terms::385432009"> + <items id="text">Not applicable (qualifier value)</items> + </term_definitions> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <upper_included>false</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </interval> + </cardinality> + </attributes> + </children> + </attributes> + <archetype_id> + <value>openEHR-EHR-EVALUATION.gecco_study_participation.v0</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="text">GECCO_Studienteilnahme</items> + <items id="description">GECCO_Studienteilnahme</items> + </term_definitions> + <term_definitions code="at0001"> + <items id="text">Item tree</items> + <items id="description">@ internal @</items> + </term_definitions> + <term_definitions code="at0002"> + <items id="text">Bereits an interventionellen klinischen Studien teilgenommen?</items> + <items id="description"></items> + </term_definitions> + <term_definitions code="at0003"> + <items id="text">Studiendetails</items> + <items id="description"></items> + </term_definitions> + <term_definitions code="SNOMED Clinical Terms::373066001"> + <items id="text">Yes (qualifier value)</items> + </term_definitions> + <term_definitions code="SNOMED Clinical Terms::373067005"> + <items id="text">No (qualifier value)</items> + </term_definitions> + <term_definitions code="SNOMED Clinical Terms::261665006"> + <items id="text">Unknown (qualifier value)</items> + </term_definitions> + <term_definitions code="SNOMED Clinical Terms::74964007"> + <items id="text">Other (qualifier value)</items> + </term_definitions> + <term_definitions code="SNOMED Clinical Terms::385432009"> + <items id="text">Not applicable (qualifier value)</items> + </term_definitions> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <upper_included>false</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </interval> + </cardinality> + </attributes> + <archetype_id> + <value>openEHR-EHR-COMPOSITION.registereintrag.v1</value> + </archetype_id> + <template_id> + <value>GECCO_Studienteilnahme</value> + </template_id> + <term_definitions code="at0000"> + <items id="text">GECCO_Studienteilnahme</items> + <items id="description">Generische Zusammenstellung zur Darstellung eines Datensatzes für Forschungszwecke. </items> + </term_definitions> + <term_definitions code="at0001"> + <items id="text">Baum</items> + <items id="description">@ internal @</items> + </term_definitions> + <term_definitions code="at0002"> + <items id="text">Erweiterung</items> + <items id="description">Ergänzende Angaben zum Registereintrag. </items> + </term_definitions> + <term_definitions code="at0004"> + <items id="text">Status</items> + <items id="description">Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten.</items> + </term_definitions> + <term_definitions code="at0005"> + <items id="text">Kategorie</items> + <items id="description">Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils).</items> + </term_definitions> + <term_definitions code="at0010"> + <items id="text">registriert</items> + <items id="description">*</items> + </term_definitions> + <term_definitions code="at0011"> + <items id="text">vorläufig</items> + <items id="description">*</items> + </term_definitions> + <term_definitions code="at0012"> + <items id="text">final</items> + <items id="description">*</items> + </term_definitions> + <term_definitions code="at0013"> + <items id="text">geändert</items> + <items id="description">*</items> + </term_definitions> + </definition> +</template> From 1e3cc6c1c062ff36d6113ef1a23f1abba24dba22 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 4 May 2021 11:37:13 +0200 Subject: [PATCH 035/141] Fix 004 Create Smoking Status (Invalid/Missing 'meta') --- .../OBSERVATION/08_create_smoking_status.robot | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/robot/OBSERVATION/08_create_smoking_status.robot b/tests/robot/OBSERVATION/08_create_smoking_status.robot index 74a3c2e73..05ad181fd 100644 --- a/tests/robot/OBSERVATION/08_create_smoking_status.robot +++ b/tests/robot/OBSERVATION/08_create_smoking_status.robot @@ -132,19 +132,19 @@ ${randinteger} ${12345} # FIELD/PATH VALUE HTTP ERROR MESSAGE Location # CODE - $.meta missing 422 Default profile is not supported for Observation. One of the following profiles is expected: .https://.* Observation.meta - $.meta.profile missing 422 Object must have some content Observation.meta - $.meta.profile[0] ${randinteger} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randinteger}. Observation.meta.profile.0. - $.meta.profile[0] ${randstring} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randstring}. Observation.meta.profile.0. - $.meta.profile ${{ ["invalid_url"] }} 422 Canonical URLs must be absolute URLs if they are not fragment references .invalid_url. Observation.meta.profile.0. - $.meta.profile ${{ ["http://wrong.url"] }} 422 The resource does not contain any supported profile Observation.meta.profile.0. - $.meta.profile ${EMPTY} 422 This property must be an Array, not a primitive property Observation.meta.profile + $.meta missing 422 Default profile is not supported for Observation. One of the following profiles is expected: .https://.* + $.meta.profile missing 422 Object must have some content Observation.meta + $.meta.profile[0] ${randinteger} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randinteger}. Observation.meta.profile.0. + $.meta.profile[0] ${randstring} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randstring}. Observation.meta.profile.0. + $.meta.profile ${{ ["invalid_url"] }} 422 Canonical URLs must be absolute URLs if they are not fragment references .invalid_url. Observation.meta.profile.0. + $.meta.profile ${{ ["http://wrong.url"] }} 422 The resource does not contain any supported profile. One of the following profiles is expected + $.meta.profile ${EMPTY} 422 This property must be an Array, not a primitive property # comment: the next one sets the value to an empty list/array [] $.meta.profile ${{ [] }} 422 Default profile is not supported for Observation. One of the following profiles is expected: .https://.* # comment: the next one sets value to an empty object {} - $.meta.profile ${{ {} }} 422 This property must be an Array, not an object + $.meta.profile ${{ {} }} 422 This property must be an Array, not an object Observation.meta 005 Create Smoking Status (Invalid/Missing 'Status') From 7d714ba33303f21083f786798e9c2a94008174bd Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 4 May 2021 11:43:05 +0200 Subject: [PATCH 036/141] Fix 004 Create Pregnancy Status (Invalid/Missing 'meta') --- tests/robot/OBSERVATION/09_create_pregnancy_status.robot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/robot/OBSERVATION/09_create_pregnancy_status.robot b/tests/robot/OBSERVATION/09_create_pregnancy_status.robot index 65580b6f2..9491fcd2d 100644 --- a/tests/robot/OBSERVATION/09_create_pregnancy_status.robot +++ b/tests/robot/OBSERVATION/09_create_pregnancy_status.robot @@ -139,7 +139,7 @@ ${identifiervalue} urn:uuid:187e0c12-8dd2-67e2-1234-bf273c878281 $.meta.profile[0] ${randinteger} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randinteger}. Observation.meta.profile.0. $.meta.profile[0] ${randstring} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randstring}. Observation.meta.profile.0. $.meta.profile ${{ ["invalid_url"] }} 422 Canonical URLs must be absolute URLs if they are not fragment references .invalid_url. Observation.meta.profile.0. - $.meta.profile ${{ ["http://wrong.url"] }} 422 The resource does not contain any supported profile Observation.meta.profile.0. + $.meta.profile ${{ ["http://wrong.url"] }} 422 The resource does not contain any supported profile. One of the following profiles is expected $.meta.profile ${EMPTY} 422 This property must be an Array, not a primitive property Observation.meta.profile # comment: the next one sets the value to an empty list/array [] From 216f85ffbef07c846af852c27bb56ce99e65b74c Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 4 May 2021 11:45:30 +0200 Subject: [PATCH 037/141] Fix 010 Create Smoking Status (Invalid 'DataAbsentReason' AND 'valueCodeableConcept') --- tests/robot/OBSERVATION/08_create_smoking_status.robot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/robot/OBSERVATION/08_create_smoking_status.robot b/tests/robot/OBSERVATION/08_create_smoking_status.robot index 05ad181fd..f17564176 100644 --- a/tests/robot/OBSERVATION/08_create_smoking_status.robot +++ b/tests/robot/OBSERVATION/08_create_smoking_status.robot @@ -347,7 +347,7 @@ ${randinteger} ${12345} ehr.create new ehr 000_ehr_status.json create with DataAbsentReason DataAbsentReason create-smoking-status.json - observation.validate response - 422 (with error message) 422 obs-6: dataAbsentReason SHALL only be present if Observation.value[x] is not present failed Observation + observation.validate response - 422 (with error message) 422 obs-6: 'dataAbsentReason SHALL only be present if Observation.value.x. is not present' Observation From ba170d65389549f1ec46ac74712ef04c3e698f28 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 4 May 2021 11:46:40 +0200 Subject: [PATCH 038/141] Fix robot test 011 Create Pregnancy Status (Invalid 'DataAbsentReason' AND 'valueCodeableConcept') --- tests/robot/OBSERVATION/09_create_pregnancy_status.robot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/robot/OBSERVATION/09_create_pregnancy_status.robot b/tests/robot/OBSERVATION/09_create_pregnancy_status.robot index 9491fcd2d..1c4e683c6 100644 --- a/tests/robot/OBSERVATION/09_create_pregnancy_status.robot +++ b/tests/robot/OBSERVATION/09_create_pregnancy_status.robot @@ -376,7 +376,7 @@ ${identifiervalue} urn:uuid:187e0c12-8dd2-67e2-1234-bf273c878281 ehr.create new ehr 000_ehr_status.json create with DataAbsentReason DataAbsentReason create-pregnancy-status.json - observation.validate response - 422 (with error message) 422 obs-6: 'dataAbsentReason SHALL only be present if Observation.value[x] is not present' failed Observation + observation.validate response - 422 (with error message) 422 obs-6: 'dataAbsentReason SHALL only be present if Observation.value.x. is not present' Observation From a15d94fad86b32fe8ffecf34afb67bf2fe67159b Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 4 May 2021 11:49:49 +0200 Subject: [PATCH 039/141] Fix robot test 004 Create Body Temperature (invalid meta/profile) --- tests/robot/OBSERVATION/06_create_body_temperature.robot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/robot/OBSERVATION/06_create_body_temperature.robot b/tests/robot/OBSERVATION/06_create_body_temperature.robot index 9ca665b00..1f53b6baa 100644 --- a/tests/robot/OBSERVATION/06_create_body_temperature.robot +++ b/tests/robot/OBSERVATION/06_create_body_temperature.robot @@ -103,7 +103,7 @@ Force Tags observation_create body-temperature create # no meta Observation body-temperature false http://hl7.org/fhir/StructureDefinition/bodytemp final true http://terminology.hl7.org/CodeSystem/v2-0203 OBI https://www.charite.de/fhir/CodeSystem/observation-identifiers 8310-5_BodyTemperature true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8310-5 Body Temperature http://snomed.info/sct 386725007 Body Temperature (observable entity) Body Temperature true valid 2020-02-25 true ${37.5} Cel http://unitsofmeasure.org Cel false 422 0 Default profile is not supported for Observation. One of the following profiles is expected: Default profile is not supported for Observation. One of the following profiles is expected: # invalid profile - Observation body-temperature true http://www.google.de final true http://terminology.hl7.org/CodeSystem/v2-0203 OBI https://www.charite.de/fhir/CodeSystem/observation-identifiers 8310-5_BodyTemperature true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8310-5 Body Temperature http://snomed.info/sct 386725007 Body Temperature (observable entity) Body Temperature true valid 2020-02-25 true ${37.5} Cel http://unitsofmeasure.org Cel false 422 0 Profile reference 'http://www.google.de' has not been checked because it is unknown Profile reference 'http://www.google.de' could not be resolved, so has not been checked + Observation body-temperature true http://www.google.de final true http://terminology.hl7.org/CodeSystem/v2-0203 OBI https://www.charite.de/fhir/CodeSystem/observation-identifiers 8310-5_BodyTemperature true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8310-5 Body Temperature http://snomed.info/sct 386725007 Body Temperature (observable entity) Body Temperature true valid 2020-02-25 true ${37.5} Cel http://unitsofmeasure.org Cel false 422 0 Profile reference 'http://www.google.de' could not be resolved, so has not been checked The resource does not contain any supported profile. One of the following profiles is expected Observation body-temperature true test final true http://terminology.hl7.org/CodeSystem/v2-0203 OBI https://www.charite.de/fhir/CodeSystem/observation-identifiers 8310-5_BodyTemperature true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8310-5 Body Temperature http://snomed.info/sct 386725007 Body Temperature (observable entity) Body Temperature true valid 2020-02-25 true ${37.5} Cel http://unitsofmeasure.org Cel false 422 0 Canonical URLs must be absolute URLs if they are not fragment references Canonical URLs must be absolute URLs if they are not fragment references Observation body-temperature true ${12345} final true http://terminology.hl7.org/CodeSystem/v2-0203 OBI https://www.charite.de/fhir/CodeSystem/observation-identifiers 8310-5_BodyTemperature true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8310-5 Body Temperature http://snomed.info/sct 386725007 Body Temperature (observable entity) Body Temperature true valid 2020-02-25 true ${37.5} Cel http://unitsofmeasure.org Cel false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. Observation body-temperature true missing final true http://terminology.hl7.org/CodeSystem/v2-0203 OBI https://www.charite.de/fhir/CodeSystem/observation-identifiers 8310-5_BodyTemperature true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8310-5 Body Temperature http://snomed.info/sct 386725007 Body Temperature (observable entity) Body Temperature true valid 2020-02-25 true ${37.5} Cel http://unitsofmeasure.org Cel false 422 0 Default profile is not supported for Observation. One of the following profiles is expected: Default profile is not supported for Observation. One of the following profiles is expected: From 77584cd6b71d13b79cda4f60463df46234273fde Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 4 May 2021 12:07:16 +0200 Subject: [PATCH 040/141] Fix robot tests --- tests/robot/OBSERVATION/03_create_blood_pressure.robot | 4 ++-- .../11_create-clinical-frailty-scale-score.robot | 2 +- tests/robot/OBSERVATION/12_create_body_height.robot | 6 +++--- tests/robot/OBSERVATION/13_create_patient_in_ICU.robot | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/robot/OBSERVATION/03_create_blood_pressure.robot b/tests/robot/OBSERVATION/03_create_blood_pressure.robot index 00f561386..bb3bade1c 100644 --- a/tests/robot/OBSERVATION/03_create_blood_pressure.robot +++ b/tests/robot/OBSERVATION/03_create_blood_pressure.robot @@ -103,8 +103,8 @@ ${profile url} https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefi $.meta missing 0 422 Default profile is not supported for Observation. One of the following profiles is expected: .https://.* $.meta.profile missing 0 422 Object must have some content $.meta.profile ${{ ["invalid_url"] }} 0 422 Canonical URLs must be absolute URLs if they are not fragment references .invalid_url. - $.meta.profile ${{ ["http://wrong.url"] }} 0 422 Profile reference 'http://wrong.url' could not be resolved, so has not been checked - $.meta.profile ${EMPTY} 0 422 This property must be an Array, not a a primitive property + $.meta.profile ${{ ["http://wrong.url"] }} 0 422 The resource does not contain any supported profile. One of the following profiles is expected + $.meta.profile ${EMPTY} 0 422 This property must be an Array, not a primitive property # comment: the next one sets the value to an empty list/array [] $.meta.profile ${{ [] }} 0 422 Default profile is not supported for Observation. One of the following profiles is expected: .https://.* diff --git a/tests/robot/OBSERVATION/11_create-clinical-frailty-scale-score.robot b/tests/robot/OBSERVATION/11_create-clinical-frailty-scale-score.robot index ebea7ff9a..122e472a8 100644 --- a/tests/robot/OBSERVATION/11_create-clinical-frailty-scale-score.robot +++ b/tests/robot/OBSERVATION/11_create-clinical-frailty-scale-score.robot @@ -143,7 +143,7 @@ ${vCC_URL} https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/frailty $.meta.profile[0] ${randinteger} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randinteger}. Observation.meta.profile.0. $.meta.profile[0] ${randstring} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randstring}. Observation.meta.profile.0. $.meta.profile ${{ ["invalid_url"] }} 422 Canonical URLs must be absolute URLs if they are not fragment references .invalid_url. Observation.meta.profile.0. - $.meta.profile ${{ ["http://wrong.url"] }} 422 Profile reference 'http://wrong.url' could not be resolved, so has not been checked Observation.meta.profile.0. + $.meta.profile ${{ ["http://wrong.url"] }} 422 The resource does not contain any supported profile. One of the following profiles is expected $.meta.profile ${EMPTY} 422 This property must be an Array, not a primitive property Observation.meta.profile # comment: the next one sets the value to an empty list/array [] diff --git a/tests/robot/OBSERVATION/12_create_body_height.robot b/tests/robot/OBSERVATION/12_create_body_height.robot index 3dc8be779..a84620220 100644 --- a/tests/robot/OBSERVATION/12_create_body_height.robot +++ b/tests/robot/OBSERVATION/12_create_body_height.robot @@ -136,7 +136,7 @@ ${vQSystem} http://unitsofmeasure.org $.meta.profile[0] ${randinteger} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randinteger}. Observation.meta.profile.0. $.meta.profile[0] ${randstring} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randstring}. Observation.meta.profile.0. $.meta.profile ${{ ["invalid_url"] }} 422 Canonical URLs must be absolute URLs if they are not fragment references .invalid_url. Observation.meta.profile.0. - $.meta.profile ${{ ["http://wrong.url"] }} 422 Profile reference 'http://wrong.url' could not be resolved, so has not been checked Observation.meta.profile.0. + $.meta.profile ${{ ["http://wrong.url"] }} 422 The resource does not contain any supported profile. One of the following profiles is expected $.meta.profile ${EMPTY} 422 This property must be an Array, not a primitive property Observation.meta.profile # comment: the next one sets the value to an empty list/array [] @@ -330,7 +330,7 @@ ${vQSystem} http://unitsofmeasure.org ehr.create new ehr 000_ehr_status.json create with DataAbsentReason DataAbsentReason BodyHeight/create-body-height-normal.json - observation.validate response - 422 (with error message) 422 obs-6: dataAbsentReason SHALL only be present if Observation.value[x] is not present Observation + observation.validate response - 422 (with error message) 422 obs-6: 'dataAbsentReason SHALL only be present if Observation.value.x. is not present' Observation @@ -484,7 +484,7 @@ ${vQSystem} http://unitsofmeasure.org Observation 23499ea6-d046-4e91-b7ab-d9cf040add72 true ${body_height-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true true ${1234} ${1234} ${1234} false valid 2020-02-25 true ${randstring} ${1234} ${1234} ${1234} 422 Observation.subject: minimum required = 1, but only found 0 .from ${body_height-url}. Observation Observation 23499ea6-d046-4e91-b7ab-d9cf040add72 true ${body_height-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true false ${1234} ${1234} ${1234} true test 2020-02-25 true ${randstring} ${1234} ${1234} ${1234} 422 Error parsing JSON: the primitive value must be a string Observation.code Observation 23499ea6-d046-4e91-b7ab-d9cf040add72 true ${body_height-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true false ${1234} ${1234} ${1234} true valid ${12345} true ${randstring} ${1234} ${1234} ${1234} 422 Not a valid date/time .12345. Observation.effective.ofType.dateTime. - Observation 23499ea6-d046-4e91-b7ab-d9cf040add72 true ${body_height-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true false ${1234} ${1234} ${1234} true valid 2020-02-25 false ${randstring} ${1234} ${1234} ${1234} 422 vs-2: If there is no component or hasMember element then either a value.x. or a data absent reason must be present.* Observation + Observation 23499ea6-d046-4e91-b7ab-d9cf040add72 true ${body_height-url} true ${randinteger} ${randinteger} final true true ${1234} ${1234} true false ${1234} ${1234} ${1234} true valid 2020-02-25 false ${randstring} ${1234} ${1234} ${1234} 422 vs-2: 'If there is no component or hasMember element then either a value.x. or a data absent reason must be present.' Observation diff --git a/tests/robot/OBSERVATION/13_create_patient_in_ICU.robot b/tests/robot/OBSERVATION/13_create_patient_in_ICU.robot index 2e4f6c781..93ddaad31 100644 --- a/tests/robot/OBSERVATION/13_create_patient_in_ICU.robot +++ b/tests/robot/OBSERVATION/13_create_patient_in_ICU.robot @@ -151,7 +151,7 @@ ${vCC_URL} http://snomed.info/sct $.meta.profile[0] ${randinteger} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randinteger}. Observation.meta.profile.0. $.meta.profile[0] ${randstring} 422 Canonical URLs must be absolute URLs if they are not fragment references .${randstring}. Observation.meta.profile.0. $.meta.profile ${{ ["invalid_url"] }} 422 Canonical URLs must be absolute URLs if they are not fragment references .invalid_url. Observation.meta.profile.0. - $.meta.profile ${{ ["http://wrong.url"] }} 422 The resource does not contain any supported profile Observation.meta.profile.0. + $.meta.profile ${{ ["http://wrong.url"] }} 422 The resource does not contain any supported profile $.meta.profile[0] ${EMPTY} 422 @value cannot be empty Observation.meta.profile.0. # comment: the next one sets the value to an empty list/array [] @@ -395,7 +395,7 @@ ${vCC_URL} http://snomed.info/sct ehr.create new ehr 000_ehr_status.json create with DataAbsentReason DataAbsentReason create-patient-in-icu.json - observation.validate response - 422 (with error message) 422 obs-6: dataAbsentReason SHALL only be present if Observation.value.x. is not present Observation + observation.validate response - 422 (with error message) 422 obs-6: 'dataAbsentReason SHALL only be present if Observation.value.x. is not present' Observation From a592e38b469c39c10e3c59fd0308b19c30770310 Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Tue, 4 May 2021 14:17:45 +0200 Subject: [PATCH 041/141] merged to add routes --- .../config/ConversionConfiguration.java | 3 +- .../D4lQuestionnaireCompositionConverter.java | 1 - .../HerzfrequenzObservationConverter.java | 1 - .../impfstatus/ImpfungActionConverter.java | 3 +- .../ImpfstatusComposition.java | 13 +- .../ImpfstatusCompositionContainment.java | 2 +- .../definition/ImpfstoffDefiningCode.java | 481 +++++++++--------- .../definition/ImpfungAction.java | 31 +- .../definition/ImpfungActionContainment.java | 4 +- .../definition/ImpfungGegenDefiningCode.java | 1 - .../ImpfungImpfungGegenElement.java | 60 +++ .../UnbekannterImpfstatusEvaluation.java | 4 +- .../definition/VerabreichteDosenCluster.java | 6 +- .../common/audit/FhirBridgeEventType.java | 5 +- src/main/resources/opt/Impfstatus.opt | 22 +- 15 files changed, 336 insertions(+), 301 deletions(-) create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungImpfungGegenElement.java diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java index 036e39652..1a193929b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java @@ -16,6 +16,7 @@ import org.ehrbase.fhirbridge.ehr.converter.specific.geccoDiagnose.GECCODiagnoseCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.heartrate.HeartRateCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.historyoftravel.HistoryOfTravelCompositionConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.impfstatus.ImpfstatusCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.knownexposure.SarsCov2KnownExposureCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.medication.GECCOMedikationCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.observationlab.ObservationLabCompositionConverter; @@ -137,6 +138,6 @@ private void registerMedicationStatementConverter(ConversionService conversionSe } private void registerImmunizationConverters(ConversionService conversionService) { - conversionService.registerConverter(Profile.HISTORY_OF_VACCINATION, null); // TODO: @SevKohler + conversionService.registerConverter(Profile.HISTORY_OF_VACCINATION, new ImpfstatusCompositionConverter()); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/d4lquestionnaire/D4lQuestionnaireCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/d4lquestionnaire/D4lQuestionnaireCompositionConverter.java index 6664ec9d3..517af7cfa 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/d4lquestionnaire/D4lQuestionnaireCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/d4lquestionnaire/D4lQuestionnaireCompositionConverter.java @@ -29,7 +29,6 @@ public class D4lQuestionnaireCompositionConverter extends QuestionnaireResponseT @Override public D4LQuestionnaireComposition convertInternal(@NonNull QuestionnaireResponse resource) { D4LQuestionnaireComposition d4LQuestionnaireComposition = new D4LQuestionnaireComposition(); - //TODO Renaud can´t think of another solution than this bad one maybe you have another idea ?, the language and time are both only contained within the response "main" and need to be given to the specific converters. Language language = resolveLanguageOrDefault(resource); TemporalAccessor authored = super.getStartTime(resource); initialiseSections(language, authored); diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/heartrate/HerzfrequenzObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/heartrate/HerzfrequenzObservationConverter.java index 17177965a..48aaf0d87 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/heartrate/HerzfrequenzObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/heartrate/HerzfrequenzObservationConverter.java @@ -14,7 +14,6 @@ public class HerzfrequenzObservationConverter extends ObservationToObservationCo protected HerzfrequenzObservation convertInternal(Observation resource) { HerzfrequenzObservation herzfrequenzObservation = new HerzfrequenzObservation(); try { - //TODO refactor time values herzfrequenzObservation.setFrequenzMagnitude(resource.getValueQuantity().getValue().doubleValue()); herzfrequenzObservation.setFrequenzUnits(resource.getValueQuantity().getCode());//note that the textual value that openEHR template expects as unit is stored in code for this entity } catch (Exception e) { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfungActionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfungActionConverter.java index dd9f21220..d0666e8ec 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfungActionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfungActionConverter.java @@ -9,6 +9,7 @@ import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.VerabreichteDosenCluster; import org.hl7.fhir.r4.model.Immunization; +import java.util.List; import java.util.Optional; public class ImpfungActionConverter extends ImmunizationToActionConverter<ImpfungAction> { @@ -45,7 +46,7 @@ private void setImfungGegen(ImpfungAction impfungAction, Immunization resource) if (resource.getProtocolApplied().get(0).getTargetDisease().get(0).hasCoding() && resource.getProtocolApplied().get(0).getTargetDisease().get(0).getCoding().get(0).hasSystem() && resource.getProtocolApplied().get(0).getTargetDisease().get(0).getCoding().get(0).getSystem().equals(CodeSystem.SNOMED.getUrl())) { - impfungAction.setImpfungGegenDefiningCode(mapImpfungGegen(resource)); + impfungAction.setImpfungGegen(List.of(mapImpfungGegen(resource))); } else { throw new UnprocessableEntityException("Target Disease code"); } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java index 9e27d0e37..1015a2384 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java @@ -20,7 +20,6 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.ImpfungAction; import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.UnbekannterImpfstatusEvaluation; @@ -28,11 +27,11 @@ @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-04-29T13:40:23.832151+02:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-05-04T14:02:53.881839+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @Template("Impfstatus") -public class ImpfstatusComposition implements CompositionEntity, Composition { +public class ImpfstatusComposition implements CompositionEntity { /** * Path: Impfstatus/category */ @@ -88,7 +87,7 @@ public class ImpfstatusComposition implements CompositionEntity, Composition { * Comment: Dies beschränkt sich nicht nur auf Aktivitäten, die auf der Grundlage von Arzneimittelverordnungen von Ärzten durchgeführt werden, sondern kann sich auch z.B. auf die Einnahme von freiverkäuflichen Medikamenten beziehen. */ @Path("/content[openEHR-EHR-ACTION.medication.v1 and name/value='Impfung']") - private ImpfungAction impfung; + private List<ImpfungAction> impfung; /** * Path: Impfstatus/Unbekannter Impfstatus @@ -188,11 +187,11 @@ public Setting getSettingDefiningCode() { return this.settingDefiningCode ; } - public void setImpfung(ImpfungAction impfung) { + public void setImpfung(List<ImpfungAction> impfung) { this.impfung = impfung; } - public ImpfungAction getImpfung() { + public List<ImpfungAction> getImpfung() { return this.impfung ; } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusCompositionContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusCompositionContainment.java index c702037cd..4f5070016 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusCompositionContainment.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusCompositionContainment.java @@ -38,7 +38,7 @@ public class ImpfstatusCompositionContainment extends Containment { public SelectAqlField<Setting> SETTING_DEFINING_CODE = new AqlFieldImp<Setting>(ImpfstatusComposition.class, "/context/setting|defining_code", "settingDefiningCode", Setting.class, this); - public SelectAqlField<ImpfungAction> IMPFUNG = new AqlFieldImp<ImpfungAction>(ImpfstatusComposition.class, "/content[openEHR-EHR-ACTION.medication.v1]", "impfung", ImpfungAction.class, this); + public ListSelectAqlField<ImpfungAction> IMPFUNG = new ListAqlFieldImp<ImpfungAction>(ImpfstatusComposition.class, "/content[openEHR-EHR-ACTION.medication.v1]", "impfung", ImpfungAction.class, this); public SelectAqlField<UnbekannterImpfstatusEvaluation> UNBEKANNTER_IMPFSTATUS = new AqlFieldImp<UnbekannterImpfstatusEvaluation>(ImpfstatusComposition.class, "/content[openEHR-EHR-EVALUATION.absence.v2]", "unbekannterImpfstatus", UnbekannterImpfstatusEvaluation.class, this); diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfstoffDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfstoffDefiningCode.java index 57acad6bf..f16c130ad 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfstoffDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfstoffDefiningCode.java @@ -7,485 +7,485 @@ import org.ehrbase.client.classgenerator.EnumValueSet; public enum ImpfstoffDefiningCode implements EnumValueSet { - TYPHUS_VACCINE_PRODUCT("Typhus vaccine (product)", "", "local_terms", "37146000"), + TYPHUS_VACCINE_PRODUCT("Typhus vaccine (product)", "", "SNOMED Clinical Terms", "37146000"), - VACCINE_PRODUCT_CONTAINING_ONLY_HAEMOPHILUS_INFLUENZAE_TYPE_B_AND_NEISSERIA_MENINGITIDIS_SEROGROUP_C_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing only Haemophilus influenzae type B and Neisseria meningitidis serogroup C antigens (medicinal product)", "", "local_terms", "836500008"), + VACCINE_PRODUCT_CONTAINING_ONLY_HAEMOPHILUS_INFLUENZAE_TYPE_B_AND_NEISSERIA_MENINGITIDIS_SEROGROUP_C_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing only Haemophilus influenzae type B and Neisseria meningitidis serogroup C antigens (medicinal product)", "", "SNOMED Clinical Terms", "836500008"), - HEPATITIS_A_VIRUS_VACCINE("Hepatitis A virus vaccine", "", "local_terms", "14745005"), + HEPATITIS_A_VIRUS_VACCINE("Hepatitis A virus vaccine", "", "SNOMED Clinical Terms", "14745005"), - POLIOMYELITIS_ORAL_TRIVALENT_LEBEND_ABGESCHWAECHT("Poliomyelitis, oral, trivalent, lebend abgeschwächt", "", "local_terms", "J07BF02"), + POLIOMYELITIS_ORAL_TRIVALENT_LEBEND_ABGESCHWAECHT("Poliomyelitis, oral, trivalent, lebend abgeschwächt", "", "SNOMED Clinical Terms", "J07BF02"), - HAEMOPHILUS_INFLUENZAE_TYPE_B_RECOMBINANT_HEPATITIS_B_VIRUS_VACCINE_PRODUCT("Haemophilus influenzae Type b + recombinant hepatitis B virus vaccine (product)", "", "local_terms", "426971004"), + HAEMOPHILUS_INFLUENZAE_TYPE_B_RECOMBINANT_HEPATITIS_B_VIRUS_VACCINE_PRODUCT("Haemophilus influenzae Type b + recombinant hepatitis B virus vaccine (product)", "", "SNOMED Clinical Terms", "426971004"), - VACCINE_PRODUCT_CONTAINING_SALMONELLA_ENTERICA_SUBSPECIES_ENTERICA_SEROVAR_TYPHI_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Salmonella enterica subspecies enterica serovar Typhi antigen (medicinal product)", "", "local_terms", "836390004"), + VACCINE_PRODUCT_CONTAINING_SALMONELLA_ENTERICA_SUBSPECIES_ENTERICA_SEROVAR_TYPHI_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Salmonella enterica subspecies enterica serovar Typhi antigen (medicinal product)", "", "SNOMED Clinical Terms", "836390004"), - DIPHTHERIA_TETANUS_PERTUSSIS_POLIOMYELITIS_RECOMBINANT_HEPATITIS_B_VIRUS_VACCINE_PRODUCT("Diphtheria + tetanus + pertussis + poliomyelitis + recombinant hepatitis B virus vaccine (product)", "", "local_terms", "427542001"), + DIPHTHERIA_TETANUS_PERTUSSIS_POLIOMYELITIS_RECOMBINANT_HEPATITIS_B_VIRUS_VACCINE_PRODUCT("Diphtheria + tetanus + pertussis + poliomyelitis + recombinant hepatitis B virus vaccine (product)", "", "SNOMED Clinical Terms", "427542001"), - VACCINE_PRODUCT_CONTAINING_HEPATITIS_B_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Hepatitis B virus antigen (medicinal product)", "", "local_terms", "836374004"), + VACCINE_PRODUCT_CONTAINING_HEPATITIS_B_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Hepatitis B virus antigen (medicinal product)", "", "SNOMED Clinical Terms", "836374004"), - VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_CHOLERA_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_TYPHOID_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Cholera vaccine (substance) } { Has active ingredient (attribute) = Typhoid vaccine (substance) }", "", "local_terms", "787859002:{127489000=396422009}{127489000=396441007}"), + VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_CHOLERA_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_TYPHOID_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Cholera vaccine (substance) } { Has active ingredient (attribute) = Typhoid vaccine (substance) }", "", "SNOMED Clinical Terms", "787859002:{127489000=396422009}{127489000=396441007}"), - TOLLWUT_IMPFSTOFFE("Tollwut-Impfstoffe", "", "local_terms", "J07BG"), + TOLLWUT_IMPFSTOFFE("Tollwut-Impfstoffe", "", "SNOMED Clinical Terms", "J07BG"), - HEPATITIS_A_B_VACCINE_PRODUCT("Hepatitis A+B vaccine (product)", "", "local_terms", "333702001"), + HEPATITIS_A_B_VACCINE_PRODUCT("Hepatitis A+B vaccine (product)", "", "SNOMED Clinical Terms", "333702001"), - PERTUSSIS_IMPFSTOFFE("Pertussis-Impfstoffe", "", "local_terms", "J07AJ"), + PERTUSSIS_IMPFSTOFFE("Pertussis-Impfstoffe", "", "SNOMED Clinical Terms", "J07AJ"), - VACCINE_PRODUCT_CONTAINING_VACCINIA_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Vaccinia virus antigen (medicinal product)", "", "local_terms", "836389008"), + VACCINE_PRODUCT_CONTAINING_VACCINIA_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Vaccinia virus antigen (medicinal product)", "", "SNOMED Clinical Terms", "836389008"), - VACCINE_PRODUCT_CONTAINING_LIVE_ATTENUATED_MYCOBACTERIUM_BOVIS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing live attenuated Mycobacterium bovis antigen (medicinal product)", "", "local_terms", "836402002"), + VACCINE_PRODUCT_CONTAINING_LIVE_ATTENUATED_MYCOBACTERIUM_BOVIS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing live attenuated Mycobacterium bovis antigen (medicinal product)", "", "SNOMED Clinical Terms", "836402002"), - PERTUSSIS_GEREINIGTES_ANTIGEN_KOMBINATIONEN_MIT_TOXOIDEN("Pertussis, gereinigtes Antigen, Kombinationen mit Toxoiden", "", "local_terms", "J07AJ52"), + PERTUSSIS_GEREINIGTES_ANTIGEN_KOMBINATIONEN_MIT_TOXOIDEN("Pertussis, gereinigtes Antigen, Kombinationen mit Toxoiden", "", "SNOMED Clinical Terms", "J07AJ52"), - IMMUNGLOBULINE_NORMAL_HUMAN("Immunglobuline, normal human", "", "local_terms", "J06BA"), + IMMUNGLOBULINE_NORMAL_HUMAN("Immunglobuline, normal human", "", "SNOMED Clinical Terms", "J06BA"), - DIPHTHERIA_VACCINE("Diphtheria vaccine", "", "local_terms", "428214002"), + DIPHTHERIA_VACCINE("Diphtheria vaccine", "", "SNOMED Clinical Terms", "428214002"), - BRUCELLA_ANTIGEN("Brucella-Antigen", "", "local_terms", "J07AD01"), + BRUCELLA_ANTIGEN("Brucella-Antigen", "", "SNOMED Clinical Terms", "J07AD01"), - MENINGOKOKKEN_TETRAVALENT_A_C_Y_W135_GEREINIGTES_POLYSACCHARID_ANTIGEN("Meningokokken tetravalent (A, C, Y, W-135), gereinigtes Polysaccharid-Antigen", "", "local_terms", "J07AH04"), + MENINGOKOKKEN_TETRAVALENT_A_C_Y_W135_GEREINIGTES_POLYSACCHARID_ANTIGEN("Meningokokken tetravalent (A, C, Y, W-135), gereinigtes Polysaccharid-Antigen", "", "SNOMED Clinical Terms", "J07AH04"), - VACCINE_PRODUCT_CONTAINING_ONLY_LIVE_ATTENUATED_HUMAN_ALPHAHERPESVIRUS3_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing only live attenuated Human alphaherpesvirus 3 antigen (medicinal product)", "", "local_terms", "2221000221107"), + VACCINE_PRODUCT_CONTAINING_ONLY_LIVE_ATTENUATED_HUMAN_ALPHAHERPESVIRUS3_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing only live attenuated Human alphaherpesvirus 3 antigen (medicinal product)", "", "SNOMED Clinical Terms", "2221000221107"), - VACCINE_PRODUCT_CONTAINING_YELLOW_FEVER_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Yellow fever virus antigen (medicinal product)", "", "local_terms", "836385002"), + VACCINE_PRODUCT_CONTAINING_YELLOW_FEVER_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Yellow fever virus antigen (medicinal product)", "", "SNOMED Clinical Terms", "836385002"), - TUBERKULOSE_IMPFSTOFFE("Tuberkulose-Impfstoffe", "", "local_terms", "J07AN"), + TUBERKULOSE_IMPFSTOFFE("Tuberkulose-Impfstoffe", "", "SNOMED Clinical Terms", "J07AN"), - CYTOMEGALIEVIRUS_IMMUNGLOBULIN("Cytomegalievirus-Immunglobulin", "", "local_terms", "J06BB09"), + CYTOMEGALIEVIRUS_IMMUNGLOBULIN("Cytomegalievirus-Immunglobulin", "", "SNOMED Clinical Terms", "J06BB09"), - VACCINE_PRODUCT_CONTAINING_HAEMOPHILUS_INFLUENZAE_TYPE_B_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_HUMAN_POLIOVIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Haemophilus influenzae type B antigen (medicinal product) + Vaccine product containing Human poliovirus antigen (medicinal product)", "", "local_terms", "836380007+1031000221108"), + VACCINE_PRODUCT_CONTAINING_HAEMOPHILUS_INFLUENZAE_TYPE_B_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_HUMAN_POLIOVIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Haemophilus influenzae type B antigen (medicinal product) + Vaccine product containing Human poliovirus antigen (medicinal product)", "", "SNOMED Clinical Terms", "836380007+1031000221108"), - DIPHTHERIE_POLIOMYELITIS_TETANUS("Diphtherie-Poliomyelitis-Tetanus", "", "local_terms", "J07CA01"), + DIPHTHERIE_POLIOMYELITIS_TETANUS("Diphtherie-Poliomyelitis-Tetanus", "", "SNOMED Clinical Terms", "J07CA01"), - ZOSTER_VIRUS_LEBEND_ABGESCHWAECHT("Zoster Virus, lebend abgeschwächt", "", "local_terms", "J07BK02"), + ZOSTER_VIRUS_LEBEND_ABGESCHWAECHT("Zoster Virus, lebend abgeschwächt", "", "SNOMED Clinical Terms", "J07BK02"), - POCKEN_IMPFSTOFF_LEBEND_MODIFIZIERT("Pocken-Impfstoff, lebend, modifiziert", "", "local_terms", "J07BX01"), + POCKEN_IMPFSTOFF_LEBEND_MODIFIZIERT("Pocken-Impfstoff, lebend, modifiziert", "", "SNOMED Clinical Terms", "J07BX01"), - MEASLES_MUMPS_RUBELLA_VARICELLA_VACCINE_PRODUCT("Measles + mumps + rubella + varicella vaccine (product)", "", "local_terms", "419550004"), + MEASLES_MUMPS_RUBELLA_VARICELLA_VACCINE_PRODUCT("Measles + mumps + rubella + varicella vaccine (product)", "", "SNOMED Clinical Terms", "419550004"), - PRODUCT_CONTAINING_VARICELLA_ZOSTER_VIRUS_ANTIBODY_MEDICINAL_PRODUCT("Product containing Varicella-zoster virus antibody (medicinal product)", "", "local_terms", "62294009"), + PRODUCT_CONTAINING_VARICELLA_ZOSTER_VIRUS_ANTIBODY_MEDICINAL_PRODUCT("Product containing Varicella-zoster virus antibody (medicinal product)", "", "SNOMED Clinical Terms", "62294009"), - ANTI_D_RH_IMMUNGLOBULIN("Anti-D(rh)-Immunglobulin", "", "local_terms", "J06BB01"), + ANTI_D_RH_IMMUNGLOBULIN("Anti-D(rh)-Immunglobulin", "", "SNOMED Clinical Terms", "J06BB01"), - VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_AND_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_AND_HAEMOPHILUS_INFLUENZAE_TYPE_B_AND_HUMAN_POLIOVIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae and Haemophilus influenzae type B and Human poliovirus antigens (medicinal product)", "", "local_terms", "838279002"), + VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_AND_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_AND_HAEMOPHILUS_INFLUENZAE_TYPE_B_AND_HUMAN_POLIOVIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae and Haemophilus influenzae type B and Human poliovirus antigens (medicinal product)", "", "SNOMED Clinical Terms", "838279002"), - PRODUCT_CONTAINING_HEPATITIS_B_SURFACE_ANTIGEN_IMMUNOGLOBULIN_MEDICINAL_PRODUCT("Product containing Hepatitis B surface antigen immunoglobulin (medicinal product)", "", "local_terms", "9542007"), + PRODUCT_CONTAINING_HEPATITIS_B_SURFACE_ANTIGEN_IMMUNOGLOBULIN_MEDICINAL_PRODUCT("Product containing Hepatitis B surface antigen immunoglobulin (medicinal product)", "", "SNOMED Clinical Terms", "9542007"), - INFLUENZA_VIRUS_VACCINE("Influenza virus vaccine", "", "local_terms", "46233009"), + INFLUENZA_VIRUS_VACCINE("Influenza virus vaccine", "", "SNOMED Clinical Terms", "46233009"), - MEASLES_AND_MUMPS_VACCINE_PRODUCT("Measles and mumps vaccine (product)", "", "local_terms", "785865001"), + MEASLES_AND_MUMPS_VACCINE_PRODUCT("Measles and mumps vaccine (product)", "", "SNOMED Clinical Terms", "785865001"), - VARICELLA_ZOSTER_VACCINE("Varicella-zoster vaccine", "", "local_terms", "407737004"), + VARICELLA_ZOSTER_VACCINE("Varicella-zoster vaccine", "", "SNOMED Clinical Terms", "407737004"), - DIPHTHERIE_HEPATITIS_B_PERTUSSIS_TETANUS("Diphtherie-Hepatitis B-Pertussis-Tetanus", "", "local_terms", "J07CA05"), + DIPHTHERIE_HEPATITIS_B_PERTUSSIS_TETANUS("Diphtherie-Hepatitis B-Pertussis-Tetanus", "", "SNOMED Clinical Terms", "J07CA05"), - VACCINE_PRODUCT_CONTAINING_HUMAN_ALPHAHERPESVIRUS3_AND_MEASLES_MORBILLIVIRUS_AND_MUMPS_ORTHORUBULAVIRUS_AND_RUBELLA_VIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Human alphaherpesvirus 3 and Measles morbillivirus and Mumps orthorubulavirus and Rubella virus antigens (medicinal product)", "", "local_terms", "838280004"), + VACCINE_PRODUCT_CONTAINING_HUMAN_ALPHAHERPESVIRUS3_AND_MEASLES_MORBILLIVIRUS_AND_MUMPS_ORTHORUBULAVIRUS_AND_RUBELLA_VIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Human alphaherpesvirus 3 and Measles morbillivirus and Mumps orthorubulavirus and Rubella virus antigens (medicinal product)", "", "SNOMED Clinical Terms", "838280004"), - HAEMOPHILUS_INFLUENZAE_B_UND_HEPATITIS_B("Haemophilus influenzae B und Hepatitis B", "", "local_terms", "J07CA08"), + HAEMOPHILUS_INFLUENZAE_B_UND_HEPATITIS_B("Haemophilus influenzae B und Hepatitis B", "", "SNOMED Clinical Terms", "J07CA08"), - MASERN_KOMBINATIONEN_MIT_ROETELN_LEBEND_ABGESCHWAECHT("Masern, Kombinationen mit Röteln, lebend abgeschwächt", "", "local_terms", "J07BD53"), + MASERN_KOMBINATIONEN_MIT_ROETELN_LEBEND_ABGESCHWAECHT("Masern, Kombinationen mit Röteln, lebend abgeschwächt", "", "SNOMED Clinical Terms", "J07BD53"), - TETANUS_TOXOID_KOMBINATIONEN_MIT_DIPHTHERIE_TOXOID("Tetanus-Toxoid, Kombinationen mit Diphtherie-Toxoid", "", "local_terms", "J07AM51"), + TETANUS_TOXOID_KOMBINATIONEN_MIT_DIPHTHERIE_TOXOID("Tetanus-Toxoid, Kombinationen mit Diphtherie-Toxoid", "", "SNOMED Clinical Terms", "J07AM51"), - PAPILLOMVIRUS_IMPFSTOFFE("Papillomvirus-Impfstoffe", "", "local_terms", "J07BM"), + PAPILLOMVIRUS_IMPFSTOFFE("Papillomvirus-Impfstoffe", "", "SNOMED Clinical Terms", "J07BM"), - VACCINE_PRODUCT_CONTAINING_INFLUENZA_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Influenza virus antigen (medicinal product)", "", "local_terms", "836377006"), + VACCINE_PRODUCT_CONTAINING_INFLUENZA_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Influenza virus antigen (medicinal product)", "", "SNOMED Clinical Terms", "836377006"), - GELBFIEBER_IMPFSTOFFE("Gelbfieber-Impfstoffe", "", "local_terms", "J07BL"), + GELBFIEBER_IMPFSTOFFE("Gelbfieber-Impfstoffe", "", "SNOMED Clinical Terms", "J07BL"), - MENINGOKOKKEN_C_GEREINIGTES_POLYSACCHARID_ANTIGEN_KONJUGIERT("Meningokokken C, gereinigtes Polysaccharid-Antigen, konjugiert", "", "local_terms", "J07AH07"), + MENINGOKOKKEN_C_GEREINIGTES_POLYSACCHARID_ANTIGEN_KONJUGIERT("Meningokokken C, gereinigtes Polysaccharid-Antigen, konjugiert", "", "SNOMED Clinical Terms", "J07AH07"), - BRUCELLOSE_IMPFSTOFFE("Brucellose-Impfstoffe", "", "local_terms", "J07AD"), + BRUCELLOSE_IMPFSTOFFE("Brucellose-Impfstoffe", "", "SNOMED Clinical Terms", "J07AD"), - MEASLES_VACCINE("Measles vaccine", "", "local_terms", "386012008"), + MEASLES_VACCINE("Measles vaccine", "", "SNOMED Clinical Terms", "386012008"), - MASERN_LEBEND_ABGESCHWAECHT("Masern, lebend abgeschwächt", "", "local_terms", "J07BD01"), + MASERN_LEBEND_ABGESCHWAECHT("Masern, lebend abgeschwächt", "", "SNOMED Clinical Terms", "J07BD01"), - DIPHTHERIE_IMPFSTOFFE("Diphtherie-Impfstoffe", "", "local_terms", "J07AF"), + DIPHTHERIE_IMPFSTOFFE("Diphtherie-Impfstoffe", "", "SNOMED Clinical Terms", "J07AF"), - PRODUCT_CONTAINING_HUMAN_ANTI_D_IMMUNOGLOBULIN_MEDICINAL_PRODUCT("Product containing human anti-D immunoglobulin (medicinal product)|", "", "local_terms", "786224004"), + PRODUCT_CONTAINING_HUMAN_ANTI_D_IMMUNOGLOBULIN_MEDICINAL_PRODUCT("Product containing human anti-D immunoglobulin (medicinal product)|", "", "SNOMED Clinical Terms", "786224004"), - PRODUCT_CONTAINING_PALIVIZUMAB_MEDICINAL_PRODUCT("Product containing palivizumab (medicinal product)", "", "local_terms", "108725001"), + PRODUCT_CONTAINING_PALIVIZUMAB_MEDICINAL_PRODUCT("Product containing palivizumab (medicinal product)", "", "SNOMED Clinical Terms", "108725001"), - IMMUNGLOBULINE_NORMAL_HUMAN_ZUR_INTRAVASALEN_ANWENDUNG("Immunglobuline, normal human, zur intravasalen Anwendung", "", "local_terms", "J06BA02"), + IMMUNGLOBULINE_NORMAL_HUMAN_ZUR_INTRAVASALEN_ANWENDUNG("Immunglobuline, normal human, zur intravasalen Anwendung", "", "SNOMED Clinical Terms", "J06BA02"), - PALIVIZUMAB("Palivizumab", "", "local_terms", "J06BB16"), + PALIVIZUMAB("Palivizumab", "", "SNOMED Clinical Terms", "J06BB16"), - POLIOMYELITIS_IMPFSTOFFE("Poliomyelitis-Impfstoffe", "", "local_terms", "J07BF"), + POLIOMYELITIS_IMPFSTOFFE("Poliomyelitis-Impfstoffe", "", "SNOMED Clinical Terms", "J07BF"), - CHOLERA_VACCINE("Cholera vaccine", "", "local_terms", "35736007"), + CHOLERA_VACCINE("Cholera vaccine", "", "SNOMED Clinical Terms", "35736007"), - PRODUCT_CONTAINING_NORMAL_IMMUNOGLOBULIN_HUMAN_MEDICINAL_PRODUCT("Product containing normal immunoglobulin human (medicinal product)", "", "local_terms", "714569001"), + PRODUCT_CONTAINING_NORMAL_IMMUNOGLOBULIN_HUMAN_MEDICINAL_PRODUCT("Product containing normal immunoglobulin human (medicinal product)", "", "SNOMED Clinical Terms", "714569001"), - DIPHTHERIA_PERTUSSIS_TETANUS_VACCINE_PRODUCT("Diphtheria + pertussis + tetanus vaccine (product)", "", "local_terms", "421245007"), + DIPHTHERIA_PERTUSSIS_TETANUS_VACCINE_PRODUCT("Diphtheria + pertussis + tetanus vaccine (product)", "", "SNOMED Clinical Terms", "421245007"), - VACCINE_PRODUCT_CONTAINING_ROTAVIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Rotavirus antigen (medicinal product)", "", "local_terms", "836387005"), + VACCINE_PRODUCT_CONTAINING_ROTAVIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Rotavirus antigen (medicinal product)", "", "SNOMED Clinical Terms", "836387005"), - VARICELLA_ZOSTER_IMMUNGLOBULIN("Varicella/Zoster-Immunglobulin", "", "local_terms", "J06BB03"), + VARICELLA_ZOSTER_IMMUNGLOBULIN("Varicella/Zoster-Immunglobulin", "", "SNOMED Clinical Terms", "J06BB03"), - VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HAEMOPHILUS_INFLUENZAE_TYPE_B_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_LIVE_POLIOVIRUS_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Haemophilus influenzae type b vaccine (substance) } { Has active ingredient (attribute) = Live Poliovirus vaccine (substance) }", "", "local_terms", "787859002:{127489000=412374001}{127489000=396436004}"), + VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HAEMOPHILUS_INFLUENZAE_TYPE_B_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_LIVE_POLIOVIRUS_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Haemophilus influenzae type b vaccine (substance) } { Has active ingredient (attribute) = Live Poliovirus vaccine (substance) }", "", "SNOMED Clinical Terms", "787859002:{127489000=412374001}{127489000=396436004}"), - RUBELLA_VACCINE("Rubella vaccine", "", "local_terms", "386013003"), + RUBELLA_VACCINE("Rubella vaccine", "", "SNOMED Clinical Terms", "386013003"), - CHOLERA_IMPFSTOFFE("Cholera-Impfstoffe", "", "local_terms", "J07AE"), + CHOLERA_IMPFSTOFFE("Cholera-Impfstoffe", "", "SNOMED Clinical Terms", "J07AE"), - DIPHTHERIA_TETANUS_PERTUSSIS_POLIOMYELITIS_HAEMOPHILUS_INFLUENZAE_B_VACCINE_PRODUCT("Diphtheria + tetanus + pertussis + poliomyelitis + haemophilus influenzae b vaccine (product)", "", "local_terms", "414004005"), + DIPHTHERIA_TETANUS_PERTUSSIS_POLIOMYELITIS_HAEMOPHILUS_INFLUENZAE_B_VACCINE_PRODUCT("Diphtheria + tetanus + pertussis + poliomyelitis + haemophilus influenzae b vaccine (product)", "", "SNOMED Clinical Terms", "414004005"), - PRODUCT_CONTAINING_RABIES_HUMAN_IMMUNE_GLOBULIN_MEDICINAL_PRODUCT("Product containing rabies human immune globulin (medicinal product)", "", "local_terms", "80834004"), + PRODUCT_CONTAINING_RABIES_HUMAN_IMMUNE_GLOBULIN_MEDICINAL_PRODUCT("Product containing rabies human immune globulin (medicinal product)", "", "SNOMED Clinical Terms", "80834004"), - ENCEPHALITIS_JAPANISCHE_LEBEND_ABGESCHWAECHT("Encephalitis, japanische, lebend abgeschwächt", "", "local_terms", "J07BA03"), + ENCEPHALITIS_JAPANISCHE_LEBEND_ABGESCHWAECHT("Encephalitis, japanische, lebend abgeschwächt", "", "SNOMED Clinical Terms", "J07BA03"), - MENINGOCOCCUS_VACCINE("Meningococcus vaccine", "", "local_terms", "423531006"), + MENINGOCOCCUS_VACCINE("Meningococcus vaccine", "", "SNOMED Clinical Terms", "423531006"), - VACCINE_PRODUCT_CONTAINING_ONLY_SEVERE_ACUTE_RESPIRATORY_SYNDROME_CORONAVIRUS2_MESSENGER_RIBONUCLEIC_ACID_MEDICINAL_PRODUCT("Vaccine product containing only Severe acute respiratory syndrome coronavirus 2 messenger ribonucleic acid (medicinal product)", "", "local_terms", "1119349007"), + VACCINE_PRODUCT_CONTAINING_ONLY_SEVERE_ACUTE_RESPIRATORY_SYNDROME_CORONAVIRUS2_MESSENGER_RIBONUCLEIC_ACID_MEDICINAL_PRODUCT("Vaccine product containing only Severe acute respiratory syndrome coronavirus 2 messenger ribonucleic acid (medicinal product)", "", "SNOMED Clinical Terms", "1119349007"), - VARICELLA_ZOSTER_IMPFSTOFFE("Varicella Zoster Impfstoffe", "", "local_terms", "J07BK"), + VARICELLA_ZOSTER_IMPFSTOFFE("Varicella Zoster Impfstoffe", "", "SNOMED Clinical Terms", "J07BK"), - VACCINE_PRODUCT_CONTAINING_HUMAN_POLIOVIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Human poliovirus antigen (medicinal product)", "", "local_terms", "1031000221108"), + VACCINE_PRODUCT_CONTAINING_HUMAN_POLIOVIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Human poliovirus antigen (medicinal product)", "", "SNOMED Clinical Terms", "1031000221108"), - HUMANER_PAPILLOMVIRUS_IMPFSTOFF_TYPEN6111618("Humaner-Papillomvirus-Impfstoff (Typen 6,11,16,18)", "", "local_terms", "J07BM01"), + HUMANER_PAPILLOMVIRUS_IMPFSTOFF_TYPEN6111618("Humaner-Papillomvirus-Impfstoff (Typen 6,11,16,18)", "", "SNOMED Clinical Terms", "J07BM01"), - INFLUENZA_LEBEND_ABGESCHWAECHT("Influenza, lebend abgeschwächt", "", "local_terms", "J07BB03"), + INFLUENZA_LEBEND_ABGESCHWAECHT("Influenza, lebend abgeschwächt", "", "SNOMED Clinical Terms", "J07BB03"), - PERTUSSIS_INAKTIVIERT_GANZE_ZELLE_KOMBINATIONEN_MIT_TOXOIDEN("Pertussis, inaktiviert, ganze Zelle, Kombinationen mit Toxoiden", "", "local_terms", "J07AJ51"), + PERTUSSIS_INAKTIVIERT_GANZE_ZELLE_KOMBINATIONEN_MIT_TOXOIDEN("Pertussis, inaktiviert, ganze Zelle, Kombinationen mit Toxoiden", "", "SNOMED Clinical Terms", "J07AJ51"), - DIPHTHERIE_PERTUSSIS_POLIOMYELITIS_TETANUS_HEPATITIS_B("Diphtherie-Pertussis-Poliomyelitis-Tetanus-Hepatitis B", "", "local_terms", "J07CA12"), + DIPHTHERIE_PERTUSSIS_POLIOMYELITIS_TETANUS_HEPATITIS_B("Diphtherie-Pertussis-Poliomyelitis-Tetanus-Hepatitis B", "", "SNOMED Clinical Terms", "J07CA12"), - PERTUSSIS_VACCINE("Pertussis vaccine", "", "local_terms", "61602008"), + PERTUSSIS_VACCINE("Pertussis vaccine", "", "SNOMED Clinical Terms", "61602008"), - MENINGOKOKKEN_A_GEREINIGTES_POLYSACCHARID_ANTIGEN_KONJUGIERT("Meningokokken A, gereinigtes Polysaccharid-Antigen, konjugiert", "", "local_terms", "J07AH10"), + MENINGOKOKKEN_A_GEREINIGTES_POLYSACCHARID_ANTIGEN_KONJUGIERT("Meningokokken A, gereinigtes Polysaccharid-Antigen, konjugiert", "", "SNOMED Clinical Terms", "J07AH10"), - VACCINE_PRODUCT_CONTAINING_RABIES_LYSSAVIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Rabies lyssavirus antigen (medicinal product)", "", "local_terms", "836393002"), + VACCINE_PRODUCT_CONTAINING_RABIES_LYSSAVIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Rabies lyssavirus antigen (medicinal product)", "", "SNOMED Clinical Terms", "836393002"), - VACCINE_PRODUCT_CONTAINING_NEISSERIA_MENINGITIDIS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Neisseria meningitidis antigen (medicinal product)", "", "local_terms", "836401009"), + VACCINE_PRODUCT_CONTAINING_NEISSERIA_MENINGITIDIS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Neisseria meningitidis antigen (medicinal product)", "", "SNOMED Clinical Terms", "836401009"), - MENINGOKOKKEN_A_GEREINIGTES_POLYSACCHARID_ANTIGEN("Meningokokken A, gereinigtes Polysaccharid-Antigen", "", "local_terms", "J07AH01"), + MENINGOKOKKEN_A_GEREINIGTES_POLYSACCHARID_ANTIGEN("Meningokokken A, gereinigtes Polysaccharid-Antigen", "", "SNOMED Clinical Terms", "J07AH01"), - DIPHTHERIA_TETANUS_PERTUSSIS_RECOMBINANT_HEPATITIS_B_VIRUS_VACCINE_PRODUCT("Diphtheria + tetanus + pertussis + recombinant hepatitis B virus vaccine (product)", "", "local_terms", "426081003"), + DIPHTHERIA_TETANUS_PERTUSSIS_RECOMBINANT_HEPATITIS_B_VIRUS_VACCINE_PRODUCT("Diphtheria + tetanus + pertussis + recombinant hepatitis B virus vaccine (product)", "", "SNOMED Clinical Terms", "426081003"), - VACCINE_PRODUCT_CONTAINING_MEASLES_MORBILLIVIRUS_AND_MUMPS_ORTHORUBULAVIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Measles morbillivirus and Mumps orthorubulavirus antigens (medicinal product)", "", "local_terms", "836499004"), + VACCINE_PRODUCT_CONTAINING_MEASLES_MORBILLIVIRUS_AND_MUMPS_ORTHORUBULAVIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Measles morbillivirus and Mumps orthorubulavirus antigens (medicinal product)", "", "SNOMED Clinical Terms", "836499004"), - VACCINE_PRODUCT_CONTAINING_ONLY_CORYNEBACTERIUM_DIPHTHERIAE_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_HAEMOPHILUS_INFLUENZAE_TYPE_B_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_CLOSTRIDIUM_TETANI_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_HEPATITIS_B_VIRUS_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_ONLY_NEISSERIA_MENINGITIDIS_SEROGROUP_A_AND_C_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing only Corynebacterium diphtheriae antigen (medicinal product) + Vaccine product containing Haemophilus influenzae type B antigen (medicinal product) + Vaccine product containing Bordetella pertussis antigen (medicinal product) + Vaccine product containing Clostridium tetani antigen (medicinal product) + Vaccine product containing Hepatitis B virus antigen (medicinal product) + Vaccine product containing only Neisseria meningitidis serogroup A and C antigens (medicinal product)", "", "local_terms", "871729003+836380007+601000221108+863911006+836374004+871871008"), + VACCINE_PRODUCT_CONTAINING_ONLY_CORYNEBACTERIUM_DIPHTHERIAE_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_HAEMOPHILUS_INFLUENZAE_TYPE_B_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_CLOSTRIDIUM_TETANI_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_HEPATITIS_B_VIRUS_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_ONLY_NEISSERIA_MENINGITIDIS_SEROGROUP_A_AND_C_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing only Corynebacterium diphtheriae antigen (medicinal product) + Vaccine product containing Haemophilus influenzae type B antigen (medicinal product) + Vaccine product containing Bordetella pertussis antigen (medicinal product) + Vaccine product containing Clostridium tetani antigen (medicinal product) + Vaccine product containing Hepatitis B virus antigen (medicinal product) + Vaccine product containing only Neisseria meningitidis serogroup A and C antigens (medicinal product)", "", "SNOMED Clinical Terms", "871729003+836380007+601000221108+863911006+836374004+871871008"), - MASERN_KOMBINATIONEN_MIT_MUMPS_UND_ROETELN_LEBEND_ABGESCHWAECHT("Masern, Kombinationen mit Mumps und Röteln, lebend abgeschwächt", "", "local_terms", "J07BD52"), + MASERN_KOMBINATIONEN_MIT_MUMPS_UND_ROETELN_LEBEND_ABGESCHWAECHT("Masern, Kombinationen mit Mumps und Röteln, lebend abgeschwächt", "", "SNOMED Clinical Terms", "J07BD52"), - PNEUMOCOCCAL_VACCINE("Pneumococcal vaccine", "", "local_terms", "333598008"), + PNEUMOCOCCAL_VACCINE("Pneumococcal vaccine", "", "SNOMED Clinical Terms", "333598008"), - HAEMOPHILUS_INFLUENZAE_TYPE_B_VACCINE("Haemophilus influenzae Type b vaccine", "", "local_terms", "333680004"), + HAEMOPHILUS_INFLUENZAE_TYPE_B_VACCINE("Haemophilus influenzae Type b vaccine", "", "SNOMED Clinical Terms", "333680004"), - PEST_INAKTIVIERT_GANZE_ZELLE("Pest, inaktiviert, ganze Zelle", "", "local_terms", "J07AK01"), + PEST_INAKTIVIERT_GANZE_ZELLE("Pest, inaktiviert, ganze Zelle", "", "SNOMED Clinical Terms", "J07AK01"), - VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_DIPHTHERIA_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HAEMOPHILUS_INFLUENZAE_TYPE_B_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_PERTUSSIS_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_TETANUS_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HEPATITIS_B_VIRUS_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Diphtheria vaccine (substance) } { Has active ingredient (attribute) = Haemophilus influenzae type b vaccine (substance) } { Has active ingredient (attribute) = Pertussis vaccine (substance) } { Has active ingredient (attribute) = Tetanus vaccine (substance) } { Has active ingredient (attribute) = Hepatitis B virus vaccine (substance) }", "", "local_terms", "787859002:{127489000=428126001}{127489000=412374001}{127489000=396433007}{127489000=412375000}{127489000=396424005}"), + VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_DIPHTHERIA_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HAEMOPHILUS_INFLUENZAE_TYPE_B_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_PERTUSSIS_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_TETANUS_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HEPATITIS_B_VIRUS_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Diphtheria vaccine (substance) } { Has active ingredient (attribute) = Haemophilus influenzae type b vaccine (substance) } { Has active ingredient (attribute) = Pertussis vaccine (substance) } { Has active ingredient (attribute) = Tetanus vaccine (substance) } { Has active ingredient (attribute) = Hepatitis B virus vaccine (substance) }", "", "SNOMED Clinical Terms", "787859002:{127489000=428126001}{127489000=412374001}{127489000=396433007}{127489000=412375000}{127489000=396424005}"), - TYPHOID_VACCINE("Typhoid vaccine", "", "local_terms", "89428009"), + TYPHOID_VACCINE("Typhoid vaccine", "", "SNOMED Clinical Terms", "89428009"), - MILZBRAND_IMPFSTOFFE("Milzbrand-Impfstoffe", "", "local_terms", "J07AC"), + MILZBRAND_IMPFSTOFFE("Milzbrand-Impfstoffe", "", "SNOMED Clinical Terms", "J07AC"), - VACCINE_PRODUCT_CONTAINING_ONLY_CORYNEBACTERIUM_DIPHTHERIAE_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_RUBELLA_VIRUS_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_CLOSTRIDIUM_TETANI_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing only Corynebacterium diphtheriae antigen (medicinal product) + Vaccine product containing Rubella virus antigen (medicinal product) + Vaccine product containing Clostridium tetani antigen (medicinal product)", "", "local_terms", "871729003+836388000+863911006"), + VACCINE_PRODUCT_CONTAINING_ONLY_CORYNEBACTERIUM_DIPHTHERIAE_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_RUBELLA_VIRUS_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_CLOSTRIDIUM_TETANI_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing only Corynebacterium diphtheriae antigen (medicinal product) + Vaccine product containing Rubella virus antigen (medicinal product) + Vaccine product containing Clostridium tetani antigen (medicinal product)", "", "SNOMED Clinical Terms", "871729003+836388000+863911006"), - MUMPS_LIVE_VIRUS_VACCINE("Mumps live virus vaccine", "", "local_terms", "90043005"), + MUMPS_LIVE_VIRUS_VACCINE("Mumps live virus vaccine", "", "SNOMED Clinical Terms", "90043005"), - VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_RUBELLA_AND_MUMPS_VACCINE_SUBSTANCE("Vaccine product (product): Has active ingredient (attribute) = Rubella and mumps vaccine (substance)", "", "local_terms", "787859002:127489000=412300006"), + VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_RUBELLA_AND_MUMPS_VACCINE_SUBSTANCE("Vaccine product (product): Has active ingredient (attribute) = Rubella and mumps vaccine (substance)", "", "SNOMED Clinical Terms", "787859002:127489000=412300006"), - HAEMOPHILUS_INFLUENZAE_B_KOMBINATIONEN_MIT_MENINGOKOKKEN_C_KONJUGIERT("Haemophilus influenzae B, Kombinationen mit Meningokokken C, konjugiert", "", "local_terms", "J07AG53"), + HAEMOPHILUS_INFLUENZAE_B_KOMBINATIONEN_MIT_MENINGOKOKKEN_C_KONJUGIERT("Haemophilus influenzae B, Kombinationen mit Meningokokken C, konjugiert", "", "SNOMED Clinical Terms", "J07AG53"), - VACCINE_PRODUCT_CONTAINING_HAEMOPHILUS_INFLUENZAE_TYPE_B_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Haemophilus influenzae type B antigen (medicinal product) + Vaccine product containing Bordetella pertussis antigen (medicinal product)", "", "local_terms", "836380007+601000221108"), + VACCINE_PRODUCT_CONTAINING_HAEMOPHILUS_INFLUENZAE_TYPE_B_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Haemophilus influenzae type B antigen (medicinal product) + Vaccine product containing Bordetella pertussis antigen (medicinal product)", "", "SNOMED Clinical Terms", "836380007+601000221108"), - VACCINE_PRODUCT_CONTAINING_MUMPS_ORTHORUBULAVIRUS_AND_RUBELLA_VIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Mumps orthorubulavirus and Rubella virus antigens (medicinal product)", "", "local_terms", "836376002"), + VACCINE_PRODUCT_CONTAINING_MUMPS_ORTHORUBULAVIRUS_AND_RUBELLA_VIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Mumps orthorubulavirus and Rubella virus antigens (medicinal product)", "", "SNOMED Clinical Terms", "836376002"), - VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_MEASLES_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_RUBELLA_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Measles vaccine (substance) } { Has active ingredient (attribute) = Rubella vaccine (substance) }", "", "local_terms", "787859002:{127489000=396427003}{127489000=396438003}"), + VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_MEASLES_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_RUBELLA_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Measles vaccine (substance) } { Has active ingredient (attribute) = Rubella vaccine (substance) }", "", "SNOMED Clinical Terms", "787859002:{127489000=396427003}{127489000=396438003}"), - HEPATITIS_A_TYPHOID_VACCINE_PRODUCT("Hepatitis A+typhoid vaccine (product)", "", "local_terms", "333707007"), + HEPATITIS_A_TYPHOID_VACCINE_PRODUCT("Hepatitis A+typhoid vaccine (product)", "", "SNOMED Clinical Terms", "333707007"), - HUMAN_PAPILLOMAVIRUS_VACCINE("Human papillomavirus vaccine", "", "local_terms", "424519000"), + HUMAN_PAPILLOMAVIRUS_VACCINE("Human papillomavirus vaccine", "", "SNOMED Clinical Terms", "424519000"), - VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_AND_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_AND_HAEMOPHILUS_INFLUENZAE_TYPE_B_AND_HEPATITIS_B_VIRUS_AND_HUMAN_POLIOVIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae and Haemophilus influenzae type B and Hepatitis B virus and Human poliovirus antigens (medicinal product)", "", "local_terms", "871896006"), + VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_AND_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_AND_HAEMOPHILUS_INFLUENZAE_TYPE_B_AND_HEPATITIS_B_VIRUS_AND_HUMAN_POLIOVIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae and Haemophilus influenzae type B and Hepatitis B virus and Human poliovirus antigens (medicinal product)", "", "SNOMED Clinical Terms", "871896006"), - KOMBINATIONEN("Kombinationen", "", "local_terms", "J07BC20"), + KOMBINATIONEN("Kombinationen", "", "SNOMED Clinical Terms", "J07BC20"), - BRUCELLA_VACCINE("Brucella vaccine", "", "local_terms", "7230005"), + BRUCELLA_VACCINE("Brucella vaccine", "", "SNOMED Clinical Terms", "7230005"), - PRODUCT_CONTAINING_TETANUS_ANTITOXIN_MEDICINAL_PRODUCT("Product containing tetanus antitoxin (medicinal product)", "", "local_terms", "384706007"), + PRODUCT_CONTAINING_TETANUS_ANTITOXIN_MEDICINAL_PRODUCT("Product containing tetanus antitoxin (medicinal product)", "", "SNOMED Clinical Terms", "384706007"), - VACCINE_PRODUCT_CONTAINING_STREPTOCOCCUS_PNEUMONIAE_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_HAEMOPHILUS_INFLUENZAE_TYPE_B_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Streptococcus pneumoniae antigen (medicinal product) + Vaccine product containing Haemophilus influenzae type B antigen (medicinal product)", "", "local_terms", "836398006+836380007"), + VACCINE_PRODUCT_CONTAINING_STREPTOCOCCUS_PNEUMONIAE_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_HAEMOPHILUS_INFLUENZAE_TYPE_B_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Streptococcus pneumoniae antigen (medicinal product) + Vaccine product containing Haemophilus influenzae type B antigen (medicinal product)", "", "SNOMED Clinical Terms", "836398006+836380007"), - VACCINE_PRODUCT_CONTAINING_RUBELLA_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Rubella virus antigen (medicinal product)", "", "local_terms", "836388000"), + VACCINE_PRODUCT_CONTAINING_RUBELLA_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Rubella virus antigen (medicinal product)", "", "SNOMED Clinical Terms", "836388000"), - PERTUSSIS_GEREINIGTES_ANTIGEN("Pertussis, gereinigtes Antigen", "", "local_terms", "J07AJ02"), + PERTUSSIS_GEREINIGTES_ANTIGEN("Pertussis, gereinigtes Antigen", "", "SNOMED Clinical Terms", "J07AJ02"), - DIPHTHERIE_PERTUSSIS_POLIOMYELITIS_TETANUS("Diphtherie-Pertussis-Poliomyelitis-Tetanus", "", "local_terms", "J07CA02"), + DIPHTHERIE_PERTUSSIS_POLIOMYELITIS_TETANUS("Diphtherie-Pertussis-Poliomyelitis-Tetanus", "", "SNOMED Clinical Terms", "J07CA02"), - VARICELLA_ZOSTER_LIVE_ATTENUATED_VACCINE_PRODUCT("Varicella-zoster live attenuated vaccine (product)", "", "local_terms", "407746005"), + VARICELLA_ZOSTER_LIVE_ATTENUATED_VACCINE_PRODUCT("Varicella-zoster live attenuated vaccine (product)", "", "SNOMED Clinical Terms", "407746005"), - BEZLOTOXUMAB("Bezlotoxumab", "", "local_terms", "J06BB21"), + BEZLOTOXUMAB("Bezlotoxumab", "", "SNOMED Clinical Terms", "J06BB21"), - VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_AND_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_AND_HEPATITIS_B_VIRUS_AND_HUMAN_POLIOVIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae and Hepatitis B virus and Human poliovirus antigens (medicinal product)", "", "local_terms", "871892008"), + VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_AND_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_AND_HEPATITIS_B_VIRUS_AND_HUMAN_POLIOVIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae and Hepatitis B virus and Human poliovirus antigens (medicinal product)", "", "SNOMED Clinical Terms", "871892008"), - PERTUSSIS_INAKTIVIERT_GANZE_ZELLE("Pertussis, inaktiviert, ganze Zelle", "", "local_terms", "J07AJ01"), + PERTUSSIS_INAKTIVIERT_GANZE_ZELLE("Pertussis, inaktiviert, ganze Zelle", "", "SNOMED Clinical Terms", "J07AJ01"), - INFLUENZA_IMPFSTOFFE("Influenza-Impfstoffe", "", "local_terms", "J07BB"), + INFLUENZA_IMPFSTOFFE("Influenza-Impfstoffe", "", "SNOMED Clinical Terms", "J07BB"), - TOLLWUT_INAKTIVIERT_GANZES_VIRUS("Tollwut, inaktiviert, ganzes Virus", "", "local_terms", "J07BG01"), + TOLLWUT_INAKTIVIERT_GANZES_VIRUS("Tollwut, inaktiviert, ganzes Virus", "", "SNOMED Clinical Terms", "J07BG01"), - TYPHUS_GEREINIGTES_POLYSACCHARID_ANTIGEN("Typhus, gereinigtes Polysaccharid-Antigen", "", "local_terms", "J07AP03"), + TYPHUS_GEREINIGTES_POLYSACCHARID_ANTIGEN("Typhus, gereinigtes Polysaccharid-Antigen", "", "SNOMED Clinical Terms", "J07AP03"), - DIPHTHERIA_TETANUS_POLIOMYELITIS_VACCINE_PRODUCT("Diphtheria + tetanus + poliomyelitis vaccine (product)", "", "local_terms", "414006007"), + DIPHTHERIA_TETANUS_POLIOMYELITIS_VACCINE_PRODUCT("Diphtheria + tetanus + poliomyelitis vaccine (product)", "", "SNOMED Clinical Terms", "414006007"), - MENINGOKOKKEN_IMPFSTOFFE("Meningokokken-Impfstoffe", "", "local_terms", "J07AH"), + MENINGOKOKKEN_IMPFSTOFFE("Meningokokken-Impfstoffe", "", "SNOMED Clinical Terms", "J07AH"), - PRODUCT_CONTAINING_CYTOMEGALOVIRUS_ANTIBODY_MEDICINAL_PRODUCT("Product containing Cytomegalovirus antibody (medicinal product)", "", "local_terms", "9778000"), + PRODUCT_CONTAINING_CYTOMEGALOVIRUS_ANTIBODY_MEDICINAL_PRODUCT("Product containing Cytomegalovirus antibody (medicinal product)", "", "SNOMED Clinical Terms", "9778000"), - POLIOMYELITIS_TRIVALENT_INAKTIVIERT_GANZES_VIRUS("Poliomyelitis, trivalent, inaktiviert, ganzes Virus", "", "local_terms", "J07BF03"), + POLIOMYELITIS_TRIVALENT_INAKTIVIERT_GANZES_VIRUS("Poliomyelitis, trivalent, inaktiviert, ganzes Virus", "", "SNOMED Clinical Terms", "J07BF03"), - VACCINE_PRODUCT_CONTAINING_VIBRIO_CHOLERAE_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_SALMONELLA_ENTERICA_SUBSPECIES_ENTERICA_SEROVAR_TYPHI_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Vibrio cholerae antigen (medicinal product) + Vaccine product containing Salmonella enterica subspecies enterica serovar Typhi antigen (medicinal product)", "", "local_terms", "836383009+836390004"), + VACCINE_PRODUCT_CONTAINING_VIBRIO_CHOLERAE_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_SALMONELLA_ENTERICA_SUBSPECIES_ENTERICA_SEROVAR_TYPHI_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Vibrio cholerae antigen (medicinal product) + Vaccine product containing Salmonella enterica subspecies enterica serovar Typhi antigen (medicinal product)", "", "SNOMED Clinical Terms", "836383009+836390004"), - TETANUS_TOXOID("Tetanus-Toxoid", "", "local_terms", "J07AM01"), + TETANUS_TOXOID("Tetanus-Toxoid", "", "SNOMED Clinical Terms", "J07AM01"), - VACCINE_PRODUCT_CONTAINING_MEASLES_MORBILLIVIRUS_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_RUBELLA_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Measles morbillivirus antigen (medicinal product) + Vaccine product containing Rubella virus antigen (medicinal product)", "", "local_terms", "836382004+836388000"), + VACCINE_PRODUCT_CONTAINING_MEASLES_MORBILLIVIRUS_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_RUBELLA_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Measles morbillivirus antigen (medicinal product) + Vaccine product containing Rubella virus antigen (medicinal product)", "", "SNOMED Clinical Terms", "836382004+836388000"), - DIPHTHERIE_TOXOID("Diphtherie-Toxoid", "", "local_terms", "J07AF01"), + DIPHTHERIE_TOXOID("Diphtherie-Toxoid", "", "SNOMED Clinical Terms", "J07AF01"), - VACCINE_PRODUCT_CONTAINING_HEPATITIS_A_AND_HEPATITIS_B_VIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Hepatitis A and Hepatitis B virus antigens (medicinal product)", "", "local_terms", "836493003"), + VACCINE_PRODUCT_CONTAINING_HEPATITIS_A_AND_HEPATITIS_B_VIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Hepatitis A and Hepatitis B virus antigens (medicinal product)", "", "SNOMED Clinical Terms", "836493003"), - ROETELN_KOMBINATIONEN_MIT_MUMPS_LEBEND_ABGESCHWAECHT("Röteln, Kombinationen mit Mumps, lebend abgeschwächt", "", "local_terms", "J07BJ51"), + ROETELN_KOMBINATIONEN_MIT_MUMPS_LEBEND_ABGESCHWAECHT("Röteln, Kombinationen mit Mumps, lebend abgeschwächt", "", "SNOMED Clinical Terms", "J07BJ51"), - YELLOW_FEVER_VACCINE("Yellow fever vaccine", "", "local_terms", "56844000"), + YELLOW_FEVER_VACCINE("Yellow fever vaccine", "", "SNOMED Clinical Terms", "56844000"), - VACCINE_PRODUCT_CONTAINING_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_AND_HUMAN_POLIOVIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Clostridium tetani and Corynebacterium diphtheriae and Human poliovirus antigens (medicinal product)", "", "local_terms", "836505003"), + VACCINE_PRODUCT_CONTAINING_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_AND_HUMAN_POLIOVIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Clostridium tetani and Corynebacterium diphtheriae and Human poliovirus antigens (medicinal product)", "", "SNOMED Clinical Terms", "836505003"), - MUMPS_LEBEND_ABGESCHWAECHT("Mumps, lebend abgeschwächt", "", "local_terms", "J07BE01"), + MUMPS_LEBEND_ABGESCHWAECHT("Mumps, lebend abgeschwächt", "", "SNOMED Clinical Terms", "J07BE01"), - VACCINE_PRODUCT_CONTAINING_STREPTOCOCCUS_PNEUMONIAE_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Streptococcus pneumoniae antigen (medicinal product)", "", "local_terms", "836398006"), + VACCINE_PRODUCT_CONTAINING_STREPTOCOCCUS_PNEUMONIAE_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Streptococcus pneumoniae antigen (medicinal product)", "", "SNOMED Clinical Terms", "836398006"), - MENINGOKOKKEN_B_AEUSSERE_VESIKELMEMBRAN_IMPFSTOFF("Meningokokken B, äußere Vesikelmembran-Impfstoff", "", "local_terms", "J07AH06"), + MENINGOKOKKEN_B_AEUSSERE_VESIKELMEMBRAN_IMPFSTOFF("Meningokokken B, äußere Vesikelmembran-Impfstoff", "", "SNOMED Clinical Terms", "J07AH06"), - ANTHRAX_VACCINE("Anthrax vaccine", "", "local_terms", "333521006"), + ANTHRAX_VACCINE("Anthrax vaccine", "", "SNOMED Clinical Terms", "333521006"), - HEPATITIS_A_INAKTIVIERT_GANZES_VIRUS("Hepatitis A, inaktiviert, ganzes Virus", "", "local_terms", "J07BC02"), + HEPATITIS_A_INAKTIVIERT_GANZES_VIRUS("Hepatitis A, inaktiviert, ganzes Virus", "", "SNOMED Clinical Terms", "J07BC02"), - CHOLERA_LEBEND_ABGESCHWAECHT("Cholera, lebend abgeschwächt", "", "local_terms", "J07AE02"), + CHOLERA_LEBEND_ABGESCHWAECHT("Cholera, lebend abgeschwächt", "", "SNOMED Clinical Terms", "J07AE02"), - TYPHUS_KOMBINATIONEN_MIT_PARATYPHUSTYPEN("Typhus, Kombinationen mit Paratyphustypen", "", "local_terms", "J07AP10"), + TYPHUS_KOMBINATIONEN_MIT_PARATYPHUSTYPEN("Typhus, Kombinationen mit Paratyphustypen", "", "SNOMED Clinical Terms", "J07AP10"), - TUBERCULOSOS_VACCINE("Tuberculosos vaccine", "", "local_terms", "420538001"), + TUBERCULOSOS_VACCINE("Tuberculosos vaccine", "", "SNOMED Clinical Terms", "420538001"), - VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Bordetella pertussis antigen (medicinal product)", "", "local_terms", "601000221108"), + VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Bordetella pertussis antigen (medicinal product)", "", "SNOMED Clinical Terms", "601000221108"), - VACCINE_PRODUCT_CONTAINING_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Clostridium tetani and Corynebacterium diphtheriae antigens (medicinal product)", "", "local_terms", "836502000"), + VACCINE_PRODUCT_CONTAINING_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Clostridium tetani and Corynebacterium diphtheriae antigens (medicinal product)", "", "SNOMED Clinical Terms", "836502000"), - DIPHTHERIE_HEPATITIS_B_TETANUS("Diphtherie-Hepatitis B-Tetanus", "", "local_terms", "J07CA07"), + DIPHTHERIE_HEPATITIS_B_TETANUS("Diphtherie-Hepatitis B-Tetanus", "", "SNOMED Clinical Terms", "J07CA07"), - CHOLERA_KOMBINATIONEN_MIT_TYPHUS_IMPFSTOFF_INAKTIVIERT_GANZE_ZELLE("Cholera, Kombinationen mit Typhus-Impfstoff, inaktiviert, ganze Zelle", "", "local_terms", "J07AE51"), + CHOLERA_KOMBINATIONEN_MIT_TYPHUS_IMPFSTOFF_INAKTIVIERT_GANZE_ZELLE("Cholera, Kombinationen mit Typhus-Impfstoff, inaktiviert, ganze Zelle", "", "SNOMED Clinical Terms", "J07AE51"), - TYPHUS_EXANTHEMATICUS_IMPFSTOFF("Typhus (exanthematicus)-Impfstoff", "", "local_terms", "J07AR"), + TYPHUS_EXANTHEMATICUS_IMPFSTOFF("Typhus (exanthematicus)-Impfstoff", "", "SNOMED Clinical Terms", "J07AR"), - PNEUMOKOKKEN_GEREINIGTES_POLYSACCHARID_ANTIGEN_KONJUGIERT("Pneumokokken, gereinigtes Polysaccharid-Antigen, konjugiert", "", "local_terms", "J07AL02"), + PNEUMOKOKKEN_GEREINIGTES_POLYSACCHARID_ANTIGEN_KONJUGIERT("Pneumokokken, gereinigtes Polysaccharid-Antigen, konjugiert", "", "SNOMED Clinical Terms", "J07AL02"), - VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HAEMOPHILUS_INFLUENZAE_TYPE_B_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_PERTUSSIS_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_TOXOID_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Haemophilus influenzae type b vaccine (substance) } { Has active ingredient (attribute) = Pertussis vaccine (substance) } { Has active ingredient (attribute) = Toxoid (substance) }", "", "local_terms", "787859002:{127489000=412374001}{127489000=396433007}{127489000=396411005}"), + VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HAEMOPHILUS_INFLUENZAE_TYPE_B_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_PERTUSSIS_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_TOXOID_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Haemophilus influenzae type b vaccine (substance) } { Has active ingredient (attribute) = Pertussis vaccine (substance) } { Has active ingredient (attribute) = Toxoid (substance) }", "", "SNOMED Clinical Terms", "787859002:{127489000=412374001}{127489000=396433007}{127489000=396411005}"), - POLIOVIRUS_VACCINE("Poliovirus vaccine", "", "local_terms", "111164008"), + POLIOVIRUS_VACCINE("Poliovirus vaccine", "", "SNOMED Clinical Terms", "111164008"), - HAEMOPHILUS_INFLUENZAE_B_GEREINIGTES_ANTIGEN_KONJUGIERT("Haemophilus influenzae B, gereinigtes Antigen konjugiert", "", "local_terms", "J07AG01"), + HAEMOPHILUS_INFLUENZAE_B_GEREINIGTES_ANTIGEN_KONJUGIERT("Haemophilus influenzae B, gereinigtes Antigen konjugiert", "", "SNOMED Clinical Terms", "J07AG01"), - TOLLWUT_IMMUNGLOBULIN("Tollwut-Immunglobulin", "", "local_terms", "J06BB05"), + TOLLWUT_IMMUNGLOBULIN("Tollwut-Immunglobulin", "", "SNOMED Clinical Terms", "J06BB05"), - VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_DIPHTHERIA_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HAEMOPHILUS_INFLUENZAE_TYPE_B_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_PERTUSSIS_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_TETANUS_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HEPATITIS_B_VIRUS_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_MENINGOCOCCUS_GROUP_A_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_MENINGOCOCCUS_GROUP_C_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Diphtheria vaccine (substance) } { Has active ingredient (attribute) = Haemophilus influenzae type b vaccine (substance) } { Has active ingredient (attribute) = Pertussis vaccine (substance) } { Has active ingredient (attribute) = Tetanus vaccine (substance) } { Has active ingredient (attribute) = Hepatitis B virus vaccine (substance) } { Has active ingredient (attribute) = Meningococcus group A vaccine (substance) } { Has active ingredient (attribute) = Meningococcus group C vaccine (substance) }", "", "local_terms", "787859002:{127489000=428126001}{127489000=412374001}{127489000=396433007}{127489000=412375000}{127489000=396424005}{127489000=768365004}{127489000=768366003}"), + VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_DIPHTHERIA_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HAEMOPHILUS_INFLUENZAE_TYPE_B_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_PERTUSSIS_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_TETANUS_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HEPATITIS_B_VIRUS_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_MENINGOCOCCUS_GROUP_A_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_MENINGOCOCCUS_GROUP_C_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Diphtheria vaccine (substance) } { Has active ingredient (attribute) = Haemophilus influenzae type b vaccine (substance) } { Has active ingredient (attribute) = Pertussis vaccine (substance) } { Has active ingredient (attribute) = Tetanus vaccine (substance) } { Has active ingredient (attribute) = Hepatitis B virus vaccine (substance) } { Has active ingredient (attribute) = Meningococcus group A vaccine (substance) } { Has active ingredient (attribute) = Meningococcus group C vaccine (substance) }", "", "SNOMED Clinical Terms", "787859002:{127489000=428126001}{127489000=412374001}{127489000=396433007}{127489000=412375000}{127489000=396424005}{127489000=768365004}{127489000=768366003}"), - DIPHTHERIE_HAEMOPHILUS_INFLUENZAE_B_PERTUSSIS_TETANUS_HEPATITIS_B("Diphtherie-Haemophilus influenzae B-Pertussis-Tetanus-Hepatitis B", "", "local_terms", "J07CA11"), + DIPHTHERIE_HAEMOPHILUS_INFLUENZAE_B_PERTUSSIS_TETANUS_HEPATITIS_B("Diphtherie-Haemophilus influenzae B-Pertussis-Tetanus-Hepatitis B", "", "SNOMED Clinical Terms", "J07CA11"), - IMMUNGLOBULINE_NORMAL_HUMAN_ZUR_EXTRAVASALEN_ANWENDUNG("Immunglobuline, normal human, zur extravasalen Anwendung", "", "local_terms", "J06BA01"), + IMMUNGLOBULINE_NORMAL_HUMAN_ZUR_EXTRAVASALEN_ANWENDUNG("Immunglobuline, normal human, zur extravasalen Anwendung", "", "SNOMED Clinical Terms", "J06BA01"), - VACCINE_PRODUCT_CONTAINING_ONLY_LIVE_ATTENUATED_MUMPS_ORTHORUBULAVIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing only live attenuated Mumps orthorubulavirus antigen (medicinal product)", "", "local_terms", "871738001"), + VACCINE_PRODUCT_CONTAINING_ONLY_LIVE_ATTENUATED_MUMPS_ORTHORUBULAVIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing only live attenuated Mumps orthorubulavirus antigen (medicinal product)", "", "SNOMED Clinical Terms", "871738001"), - VARICELLA_LEBEND_ABGESCHWAECHT("Varicella, lebend abgeschwächt", "", "local_terms", "J07BK01"), + VARICELLA_LEBEND_ABGESCHWAECHT("Varicella, lebend abgeschwächt", "", "SNOMED Clinical Terms", "J07BK01"), - VACCINE_PRODUCT_CONTAINING_ONLY_CORYNEBACTERIUM_DIPHTHERIAE_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_HAEMOPHILUS_INFLUENZAE_TYPE_B_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_CLOSTRIDIUM_TETANI_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_HEPATITIS_B_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing only Corynebacterium diphtheriae antigen (medicinal product) + Vaccine product containing Haemophilus influenzae type B antigen (medicinal product) + Vaccine product containing Bordetella pertussis antigen (medicinal product) + Vaccine product containing Clostridium tetani antigen (medicinal product) + Vaccine product containing Hepatitis B virus antigen (medicinal product)", "", "local_terms", "871729003+836380007+601000221108+863911006+836374004"), + VACCINE_PRODUCT_CONTAINING_ONLY_CORYNEBACTERIUM_DIPHTHERIAE_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_HAEMOPHILUS_INFLUENZAE_TYPE_B_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_CLOSTRIDIUM_TETANI_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_HEPATITIS_B_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing only Corynebacterium diphtheriae antigen (medicinal product) + Vaccine product containing Haemophilus influenzae type B antigen (medicinal product) + Vaccine product containing Bordetella pertussis antigen (medicinal product) + Vaccine product containing Clostridium tetani antigen (medicinal product) + Vaccine product containing Hepatitis B virus antigen (medicinal product)", "", "SNOMED Clinical Terms", "871729003+836380007+601000221108+863911006+836374004"), - ANDERE_MENINGOKOKKEN_POLYVALENT_GEREINIGTES_POLYSACCHARID_ANTIGEN("Andere Meningokokken polyvalent, gereinigtes Polysaccharid-Antigen", "", "local_terms", "J07AH05"), + ANDERE_MENINGOKOKKEN_POLYVALENT_GEREINIGTES_POLYSACCHARID_ANTIGEN("Andere Meningokokken polyvalent, gereinigtes Polysaccharid-Antigen", "", "SNOMED Clinical Terms", "J07AH05"), - HAEMOPHILUS_INFLUENZAE_TYPE_B_MENINGOCOCCAL_GROUP_C_VACCINE_PRODUCT("Haemophilus influenzae type b + Meningococcal group C vaccine (product)", "", "local_terms", "423912009"), + HAEMOPHILUS_INFLUENZAE_TYPE_B_MENINGOCOCCAL_GROUP_C_VACCINE_PRODUCT("Haemophilus influenzae type b + Meningococcal group C vaccine (product)", "", "SNOMED Clinical Terms", "423912009"), - FSME_INAKTIVIERT_GANZES_VIRUS("FSME, inaktiviert, ganzes Virus", "", "local_terms", "J07BA01"), + FSME_INAKTIVIERT_GANZES_VIRUS("FSME, inaktiviert, ganzes Virus", "", "SNOMED Clinical Terms", "J07BA01"), - VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_PNEUMOCOCCAL_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HAEMOPHILUS_INFLUENZAE_TYPE_B_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Pneumococcal vaccine (substance) } { Has active ingredient (attribute) = Haemophilus influenzae type b vaccine (substance) }", "", "local_terms", "78785900:{127489000=398730001}{127489000=412374001}"), + VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_PNEUMOCOCCAL_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HAEMOPHILUS_INFLUENZAE_TYPE_B_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Pneumococcal vaccine (substance) } { Has active ingredient (attribute) = Haemophilus influenzae type b vaccine (substance) }", "", "SNOMED Clinical Terms", "78785900:{127489000=398730001}{127489000=412374001}"), - VACCINE_PRODUCT_CONTAINING_HEPATITIS_A_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Hepatitis A virus antigen (medicinal product)", "", "local_terms", "836375003"), + VACCINE_PRODUCT_CONTAINING_HEPATITIS_A_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Hepatitis A virus antigen (medicinal product)", "", "SNOMED Clinical Terms", "836375003"), - PEST_IMPFSTOFFE("Pest-Impfstoffe", "", "local_terms", "J07AK"), + PEST_IMPFSTOFFE("Pest-Impfstoffe", "", "SNOMED Clinical Terms", "J07AK"), - DIPHTHERIA_TETANUS_PERTUSSIS_POLIOMYELITIS_RECOMBINANT_HEPATITIS_B_VIRUS_RECOMBINANT_HAEMOPHILUS_INFLUENZAE_TYPE_B_VACCINE_PRODUCT("Diphtheria + tetanus + pertussis + poliomyelitis + recombinant hepatitis B virus + recombinant haemophilus influenzae type B vaccine (product)", "", "local_terms", "426842004"), + DIPHTHERIA_TETANUS_PERTUSSIS_POLIOMYELITIS_RECOMBINANT_HEPATITIS_B_VIRUS_RECOMBINANT_HAEMOPHILUS_INFLUENZAE_TYPE_B_VACCINE_PRODUCT("Diphtheria + tetanus + pertussis + poliomyelitis + recombinant hepatitis B virus + recombinant haemophilus influenzae type B vaccine (product)", "", "SNOMED Clinical Terms", "426842004"), - ANDERE_MENINGOKOKKEN_MONOVALENT_GEREINIGTES_POLYSACCHARID_ANTIGEN("Andere Meningokokken monovalent, gereinigtes Polysaccharid-Antigen", "", "local_terms", "J07AH02"), + ANDERE_MENINGOKOKKEN_MONOVALENT_GEREINIGTES_POLYSACCHARID_ANTIGEN("Andere Meningokokken monovalent, gereinigtes Polysaccharid-Antigen", "", "SNOMED Clinical Terms", "J07AH02"), - CHOLERA_INAKTIVIERT_GANZE_ZELLE("Cholera, inaktiviert, ganze Zelle", "", "local_terms", "J07AE01"), + CHOLERA_INAKTIVIERT_GANZE_ZELLE("Cholera, inaktiviert, ganze Zelle", "", "SNOMED Clinical Terms", "J07AE01"), - VACCINE_PRODUCT_CONTAINING_HAEMOPHILUS_INFLUENZAE_TYPE_B_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Haemophilus influenzae type B antigen (medicinal product)", "", "local_terms", "836380007"), + VACCINE_PRODUCT_CONTAINING_HAEMOPHILUS_INFLUENZAE_TYPE_B_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Haemophilus influenzae type B antigen (medicinal product)", "", "SNOMED Clinical Terms", "836380007"), - MUMPS_IMPFSTOFFE("Mumps-Impfstoffe", "", "local_terms", "J07BE"), + MUMPS_IMPFSTOFFE("Mumps-Impfstoffe", "", "SNOMED Clinical Terms", "J07BE"), - TYPHUS_IMPFSTOFFE("Typhus-Impfstoffe", "", "local_terms", "J07AP"), + TYPHUS_IMPFSTOFFE("Typhus-Impfstoffe", "", "SNOMED Clinical Terms", "J07AP"), - VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_AND_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_AND_HUMAN_POLIOVIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae and Human poliovirus antigens (medicinal product)", "", "local_terms", "836508001"), + VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_AND_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_AND_HUMAN_POLIOVIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae and Human poliovirus antigens (medicinal product)", "", "SNOMED Clinical Terms", "836508001"), - ENCEPHALITIS_IMPFSTOFFE("Encephalitis-Impfstoffe", "", "local_terms", "J07BA"), + ENCEPHALITIS_IMPFSTOFFE("Encephalitis-Impfstoffe", "", "SNOMED Clinical Terms", "J07BA"), - MASERN_KOMBINATIONEN_MIT_MUMPS_ROETELN_UND_VARICELLA_LEBEND_ABGESCHWAECHT("Masern, Kombinationen mit Mumps, Röteln und Varicella, lebend abgeschwächt", "", "local_terms", "J07BD54"), + MASERN_KOMBINATIONEN_MIT_MUMPS_ROETELN_UND_VARICELLA_LEBEND_ABGESCHWAECHT("Masern, Kombinationen mit Mumps, Röteln und Varicella, lebend abgeschwächt", "", "SNOMED Clinical Terms", "J07BD54"), - HEPATITIS_B_GEREINIGTES_ANTIGEN("Hepatitis B, gereinigtes Antigen", "", "local_terms", "J07BC01"), + HEPATITIS_B_GEREINIGTES_ANTIGEN("Hepatitis B, gereinigtes Antigen", "", "SNOMED Clinical Terms", "J07BC01"), - ROETELN_IMPFSTOFFE("Röteln-Impfstoffe", "", "local_terms", "J07BJ"), + ROETELN_IMPFSTOFFE("Röteln-Impfstoffe", "", "SNOMED Clinical Terms", "J07BJ"), - PRODUCT_CONTAINING_BEZLOTOXUMAB_MEDICINAL_PRODUCT("Product containing bezlotoxumab (medicinal product)", "", "local_terms", "763703008"), + PRODUCT_CONTAINING_BEZLOTOXUMAB_MEDICINAL_PRODUCT("Product containing bezlotoxumab (medicinal product)", "", "SNOMED Clinical Terms", "763703008"), - HUMANER_PAPILLOMVIRUS_IMPFSTOFF_TYPEN1618("Humaner-Papillomvirus-Impfstoff (Typen 16,18)", "", "local_terms", "J07BM02"), + HUMANER_PAPILLOMVIRUS_IMPFSTOFF_TYPEN1618("Humaner-Papillomvirus-Impfstoff (Typen 16,18)", "", "SNOMED Clinical Terms", "J07BM02"), - ENCEPHALITIS_JAPANISCHE_INAKTIVIERT_GANZES_VIRUS("Encephalitis, japanische, inaktiviert, ganzes Virus", "", "local_terms", "J07BA02"), + ENCEPHALITIS_JAPANISCHE_INAKTIVIERT_GANZES_VIRUS("Encephalitis, japanische, inaktiviert, ganzes Virus", "", "SNOMED Clinical Terms", "J07BA02"), - DIPHTHERIE_HAEMOPHILUS_INFLUENZAE_B_PERTUSSIS_POLIOMYELITIS_TETANUS("Diphtherie-Haemophilus influenzae B-Pertussis-Poliomyelitis-Tetanus", "", "local_terms", "J07CA06"), + DIPHTHERIE_HAEMOPHILUS_INFLUENZAE_B_PERTUSSIS_POLIOMYELITIS_TETANUS("Diphtherie-Haemophilus influenzae B-Pertussis-Poliomyelitis-Tetanus", "", "SNOMED Clinical Terms", "J07CA06"), - TYPHUS_HEPATITIS_A("Typhus-Hepatitis A", "", "local_terms", "J07CA10"), + TYPHUS_HEPATITIS_A("Typhus-Hepatitis A", "", "SNOMED Clinical Terms", "J07CA10"), - MENINGOKOKKEN_B_MULTIKOMPONENTEN_IMPFSTOFF("Meningokokken B, Multikomponenten-Impfstoff", "", "local_terms", "J07AH09"), + MENINGOKOKKEN_B_MULTIKOMPONENTEN_IMPFSTOFF("Meningokokken B, Multikomponenten-Impfstoff", "", "SNOMED Clinical Terms", "J07AH09"), - POLIOMYELITIS_ORAL_MONOVALENT_LEBEND_ABGESCHWAECHT("Poliomyelitis, oral, monovalent, lebend abgeschwächt", "", "local_terms", "J07BF01"), + POLIOMYELITIS_ORAL_MONOVALENT_LEBEND_ABGESCHWAECHT("Poliomyelitis, oral, monovalent, lebend abgeschwächt", "", "SNOMED Clinical Terms", "J07BF01"), - MEASLES_MUMPS_AND_RUBELLA_VACCINE_PRODUCT("Measles, mumps and rubella vaccine (product)", "", "local_terms", "61153008"), + MEASLES_MUMPS_AND_RUBELLA_VACCINE_PRODUCT("Measles, mumps and rubella vaccine (product)", "", "SNOMED Clinical Terms", "61153008"), - HEPATITIS_A_GEREINIGTES_ANTIGEN("Hepatitis A, gereinigtes Antigen", "", "local_terms", "J07BC03"), + HEPATITIS_A_GEREINIGTES_ANTIGEN("Hepatitis A, gereinigtes Antigen", "", "SNOMED Clinical Terms", "J07BC03"), - VACCINE_PRODUCT_CONTAINING_ONLY_SEVERE_ACUTE_RESPIRATORY_SYNDROME_CORONAVIRUS2_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing only Severe acute respiratory syndrome coronavirus 2 antigen (medicinal product)", "", "local_terms", "1119305005"), + VACCINE_PRODUCT_CONTAINING_ONLY_SEVERE_ACUTE_RESPIRATORY_SYNDROME_CORONAVIRUS2_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing only Severe acute respiratory syndrome coronavirus 2 antigen (medicinal product)", "", "SNOMED Clinical Terms", "1119305005"), - VACCINE_PRODUCT_CONTAINING_HUMAN_ALPHAHERPESVIRUS3_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Human alphaherpesvirus 3 antigen (medicinal product)", "", "local_terms", "836495005"), + VACCINE_PRODUCT_CONTAINING_HUMAN_ALPHAHERPESVIRUS3_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Human alphaherpesvirus 3 antigen (medicinal product)", "", "SNOMED Clinical Terms", "836495005"), - ROTAVIRUS_PENTAVALENT_LEBEND_REASSORTANTEN("Rotavirus, pentavalent, lebend, Reassortanten", "", "local_terms", "J07BH02"), + ROTAVIRUS_PENTAVALENT_LEBEND_REASSORTANTEN("Rotavirus, pentavalent, lebend, Reassortanten", "", "SNOMED Clinical Terms", "J07BH02"), - INFLUENZA_INAKTIVIERT_SPALTVIRUS_ODER_OBERFLAECHENANTIGEN("Influenza, inaktiviert, Spaltvirus oder Oberflächenantigen", "", "local_terms", "J07BB02"), + INFLUENZA_INAKTIVIERT_SPALTVIRUS_ODER_OBERFLAECHENANTIGEN("Influenza, inaktiviert, Spaltvirus oder Oberflächenantigen", "", "SNOMED Clinical Terms", "J07BB02"), - VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_AND_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae antigens (medicinal product)", "", "local_terms", "836503005"), + VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_AND_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae antigens (medicinal product)", "", "SNOMED Clinical Terms", "836503005"), - VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_DIPHTHERIA_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HEPATITIS_B_VIRUS_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_TETANUS_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Diphtheria vaccine (substance) } { Has active ingredient (attribute) = Hepatitis B virus vaccine (substance) } { Has active ingredient (attribute) = Tetanus vaccine (substance) }", "", "local_terms", "787859002:{127489000=428126001}{127489000=396424005}{127489000=412375000}"), + VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_DIPHTHERIA_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_HEPATITIS_B_VIRUS_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_TETANUS_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Diphtheria vaccine (substance) } { Has active ingredient (attribute) = Hepatitis B virus vaccine (substance) } { Has active ingredient (attribute) = Tetanus vaccine (substance) }", "", "SNOMED Clinical Terms", "787859002:{127489000=428126001}{127489000=396424005}{127489000=412375000}"), - HAEMOPHILUS_INFLUENZAE_B_UND_POLIOMYELITIS("Haemophilus influenzae B und Poliomyelitis", "", "local_terms", "J07CA04"), + HAEMOPHILUS_INFLUENZAE_B_UND_POLIOMYELITIS("Haemophilus influenzae B und Poliomyelitis", "", "SNOMED Clinical Terms", "J07CA04"), - ROTAVIRUS_LEBEND_ABGESCHWAECHT("Rotavirus, lebend abgeschwächt", "", "local_terms", "J07BH01"), + ROTAVIRUS_LEBEND_ABGESCHWAECHT("Rotavirus, lebend abgeschwächt", "", "SNOMED Clinical Terms", "J07BH01"), - VACCINE_PRODUCT_CONTAINING_ONLY_CORYNEBACTERIUM_DIPHTHERIAE_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_HEPATITIS_B_VIRUS_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_CLOSTRIDIUM_TETANI_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing only Corynebacterium diphtheriae antigen (medicinal product) + Vaccine product containing Hepatitis B virus antigen (medicinal product) + Vaccine product containing Clostridium tetani antigen (medicinal product)", "", "local_terms", "871729003+836374004+863911006"), + VACCINE_PRODUCT_CONTAINING_ONLY_CORYNEBACTERIUM_DIPHTHERIAE_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_HEPATITIS_B_VIRUS_ANTIGEN_MEDICINAL_PRODUCT_VACCINE_PRODUCT_CONTAINING_CLOSTRIDIUM_TETANI_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing only Corynebacterium diphtheriae antigen (medicinal product) + Vaccine product containing Hepatitis B virus antigen (medicinal product) + Vaccine product containing Clostridium tetani antigen (medicinal product)", "", "SNOMED Clinical Terms", "871729003+836374004+863911006"), - VACCINE_PRODUCT_CONTAINING_HEPATITIS_A_VIRUS_AND_SALMONELLA_ENTERICA_SUBSPECIES_ENTERICA_SEROVAR_TYPHI_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Hepatitis A virus and Salmonella enterica subspecies enterica serovar Typhi antigens (medicinal product)", "", "local_terms", "836501007"), + VACCINE_PRODUCT_CONTAINING_HEPATITIS_A_VIRUS_AND_SALMONELLA_ENTERICA_SUBSPECIES_ENTERICA_SEROVAR_TYPHI_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Hepatitis A virus and Salmonella enterica subspecies enterica serovar Typhi antigens (medicinal product)", "", "SNOMED Clinical Terms", "836501007"), - TYPHUS_INAKTIVIERT_GANZE_ZELLE("Typhus, inaktiviert, ganze Zelle", "", "local_terms", "J07AP02"), + TYPHUS_INAKTIVIERT_GANZE_ZELLE("Typhus, inaktiviert, ganze Zelle", "", "SNOMED Clinical Terms", "J07AP02"), - TYPHUS_EXANTHEMATICUS_INAKTIVIERT_GANZE_ZELLE("Typhus exanthematicus, inaktiviert, ganze Zelle", "", "local_terms", "J07AR01"), + TYPHUS_EXANTHEMATICUS_INAKTIVIERT_GANZE_ZELLE("Typhus exanthematicus, inaktiviert, ganze Zelle", "", "SNOMED Clinical Terms", "J07AR01"), - VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_AND_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_AND_HEPATITIS_B_VIRUS_MEDICINAL_PRODUCT("Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae and Hepatitis B virus (medicinal product)", "", "local_terms", "871917002"), + VACCINE_PRODUCT_CONTAINING_BORDETELLA_PERTUSSIS_AND_CLOSTRIDIUM_TETANI_AND_CORYNEBACTERIUM_DIPHTHERIAE_AND_HEPATITIS_B_VIRUS_MEDICINAL_PRODUCT("Vaccine product containing Bordetella pertussis and Clostridium tetani and Corynebacterium diphtheriae and Hepatitis B virus (medicinal product)", "", "SNOMED Clinical Terms", "871917002"), - SMALLPOX_VACCINE("Smallpox vaccine", "", "local_terms", "33234009"), + SMALLPOX_VACCINE("Smallpox vaccine", "", "SNOMED Clinical Terms", "33234009"), - VACCINE_PRODUCT_CONTAINING_JAPANESE_ENCEPHALITIS_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Japanese encephalitis virus antigen (medicinal product)", "", "local_terms", "836378001"), + VACCINE_PRODUCT_CONTAINING_JAPANESE_ENCEPHALITIS_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Japanese encephalitis virus antigen (medicinal product)", "", "SNOMED Clinical Terms", "836378001"), - HAEMOPHILUS_INFLUENZAE_B_IMPFSTOFFE("Haemophilus influenzae B-Impfstoffe", "", "local_terms", "J07AG"), + HAEMOPHILUS_INFLUENZAE_B_IMPFSTOFFE("Haemophilus influenzae B-Impfstoffe", "", "SNOMED Clinical Terms", "J07AG"), - VACCINE_PRODUCT_PRODUCT("Vaccine product (product)", "", "local_terms", "787859002"), + VACCINE_PRODUCT_PRODUCT("Vaccine product (product)", "", "SNOMED Clinical Terms", "787859002"), - JAPANESE_B_ENCEPHALITIS_VACCINE("Japanese B encephalitis vaccine", "", "local_terms", "333697005"), + JAPANESE_B_ENCEPHALITIS_VACCINE("Japanese B encephalitis vaccine", "", "SNOMED Clinical Terms", "333697005"), - HEPATITIS_B_IMMUNGLOBULIN("Hepatitis-B-Immunglobulin", "", "local_terms", "J06BB04"), + HEPATITIS_B_IMMUNGLOBULIN("Hepatitis-B-Immunglobulin", "", "SNOMED Clinical Terms", "J06BB04"), - PNEUMOKOKKEN_GEREINIGTES_POLYSACCHARID_ANTIGEN("Pneumokokken, gereinigtes Polysaccharid-Antigen", "", "local_terms", "J07AL01"), + PNEUMOKOKKEN_GEREINIGTES_POLYSACCHARID_ANTIGEN("Pneumokokken, gereinigtes Polysaccharid-Antigen", "", "SNOMED Clinical Terms", "J07AL01"), - PNEUMOKOKKEN_GEREINIGTES_POLYSACCHARID_ANTIGEN_UND_HAEMOPHILUS_INFLUENZAE_B_KONJUGIERT("Pneumokokken, gereinigtes Polysaccharid-Antigen und Haemophilus influenzae B, konjugiert", "", "local_terms", "J07AL52"), + PNEUMOKOKKEN_GEREINIGTES_POLYSACCHARID_ANTIGEN_UND_HAEMOPHILUS_INFLUENZAE_B_KONJUGIERT("Pneumokokken, gereinigtes Polysaccharid-Antigen und Haemophilus influenzae B, konjugiert", "", "SNOMED Clinical Terms", "J07AL52"), - INFLUENZA_INAKTIVIERT_GANZES_VIRUS("Influenza, inaktiviert, ganzes Virus", "", "local_terms", "J07BB01"), + INFLUENZA_INAKTIVIERT_GANZES_VIRUS("Influenza, inaktiviert, ganzes Virus", "", "SNOMED Clinical Terms", "J07BB01"), - VACCINE_PRODUCT_CONTAINING_YERSINIA_PESTIS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Yersinia pestis antigen (medicinal product)", "", "local_terms", "840549009"), + VACCINE_PRODUCT_CONTAINING_YERSINIA_PESTIS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Yersinia pestis antigen (medicinal product)", "", "SNOMED Clinical Terms", "840549009"), - VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_DIPHTHERIA_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_RUBELLA_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_TETANUS_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Diphtheria vaccine (substance) } { Has active ingredient (attribute) = Rubella vaccine (substance) } { Has active ingredient (attribute) = Tetanus vaccine (substance) }", "", "local_terms", "787859002:{127489000=428126001}{127489000=396438003}{127489000=412375000}"), + VACCINE_PRODUCT_PRODUCT_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_DIPHTHERIA_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_RUBELLA_VACCINE_SUBSTANCE_HAS_ACTIVE_INGREDIENT_ATTRIBUTE_TETANUS_VACCINE_SUBSTANCE("Vaccine product (product): { Has active ingredient (attribute) = Diphtheria vaccine (substance) } { Has active ingredient (attribute) = Rubella vaccine (substance) } { Has active ingredient (attribute) = Tetanus vaccine (substance) }", "", "SNOMED Clinical Terms", "787859002:{127489000=428126001}{127489000=396438003}{127489000=412375000}"), - TETANUS_IMPFSTOFFE("Tetanus-Impfstoffe", "", "local_terms", "J07AM"), + TETANUS_IMPFSTOFFE("Tetanus-Impfstoffe", "", "SNOMED Clinical Terms", "J07AM"), - MENINGOKOKKEN_BIVALENT_A_C_GEREINIGTES_POLYSACCHARID_ANTIGEN("Meningokokken bivalent (A, C), gereinigtes Polysaccharid-Antigen", "", "local_terms", "J07AH03"), + MENINGOKOKKEN_BIVALENT_A_C_GEREINIGTES_POLYSACCHARID_ANTIGEN("Meningokokken bivalent (A, C), gereinigtes Polysaccharid-Antigen", "", "SNOMED Clinical Terms", "J07AH03"), - MASERN_IMPFSTOFFE("Masern-Impfstoffe", "", "local_terms", "J07BD"), + MASERN_IMPFSTOFFE("Masern-Impfstoffe", "", "SNOMED Clinical Terms", "J07BD"), - TICK_BORNE_ENCEPHALITIS_VACCINE("Tick-borne encephalitis vaccine", "", "local_terms", "333699008"), + TICK_BORNE_ENCEPHALITIS_VACCINE("Tick-borne encephalitis vaccine", "", "SNOMED Clinical Terms", "333699008"), - RABIES_VACCINE("Rabies vaccine", "", "local_terms", "333606008"), + RABIES_VACCINE("Rabies vaccine", "", "SNOMED Clinical Terms", "333606008"), - ROTAVIRUS_VACCINE("Rotavirus vaccine", "", "local_terms", "116077000"), + ROTAVIRUS_VACCINE("Rotavirus vaccine", "", "SNOMED Clinical Terms", "116077000"), - POLIOMYELITIS_ORAL_BIVALENT_LEBEND_ABGESCHWAECHT("Poliomyelitis, oral, bivalent, lebend abgeschwächt", "", "local_terms", "J07BF04"), + POLIOMYELITIS_ORAL_BIVALENT_LEBEND_ABGESCHWAECHT("Poliomyelitis, oral, bivalent, lebend abgeschwächt", "", "SNOMED Clinical Terms", "J07BF04"), - DIPHTHERIE_HAEMOPHILUS_INFLUENZAE_B_PERTUSSIS_POLIOMYELITIS_TETANUS_HEPATITIS_B("Diphtherie-Haemophilus influenzae B-Pertussis-Poliomyelitis-Tetanus-Hepatitis B", "", "local_terms", "J07CA09"), + DIPHTHERIE_HAEMOPHILUS_INFLUENZAE_B_PERTUSSIS_POLIOMYELITIS_TETANUS_HEPATITIS_B("Diphtherie-Haemophilus influenzae B-Pertussis-Poliomyelitis-Tetanus-Hepatitis B", "", "SNOMED Clinical Terms", "J07CA09"), - DIPHTHERIA_TETANUS_PERTUSSIS_POLIOMYELITIS_VACCINE_PRODUCT("Diphtheria + tetanus + pertussis + poliomyelitis vaccine (product)", "", "local_terms", "414005006"), + DIPHTHERIA_TETANUS_PERTUSSIS_POLIOMYELITIS_VACCINE_PRODUCT("Diphtheria + tetanus + pertussis + poliomyelitis vaccine (product)", "", "SNOMED Clinical Terms", "414005006"), - TUBERKULOSE_LEBEND_ABGESCHWAECHT("Tuberkulose, lebend abgeschwächt", "", "local_terms", "J07AN01"), + TUBERKULOSE_LEBEND_ABGESCHWAECHT("Tuberkulose, lebend abgeschwächt", "", "SNOMED Clinical Terms", "J07AN01"), - TETANUS_IMMUNGLOBULIN("Tetanus-Immunglobulin", "", "local_terms", "J06BB02"), + TETANUS_IMMUNGLOBULIN("Tetanus-Immunglobulin", "", "SNOMED Clinical Terms", "J06BB02"), - PLAGUE_VACCINE("Plague vaccine", "", "local_terms", "11866009"), + PLAGUE_VACCINE("Plague vaccine", "", "SNOMED Clinical Terms", "11866009"), - ROTAVIRUS_DIARRHOE_IMPFSTOFFE("Rotavirus-Diarrhoe-Impfstoffe", "", "local_terms", "J07BH"), + ROTAVIRUS_DIARRHOE_IMPFSTOFFE("Rotavirus-Diarrhoe-Impfstoffe", "", "SNOMED Clinical Terms", "J07BH"), - MASERN_KOMBINATIONEN_MIT_MUMPS_LEBEND_ABGESCHWAECHT("Masern, Kombinationen mit Mumps, lebend abgeschwächt", "", "local_terms", "J07BD51"), + MASERN_KOMBINATIONEN_MIT_MUMPS_LEBEND_ABGESCHWAECHT("Masern, Kombinationen mit Mumps, lebend abgeschwächt", "", "SNOMED Clinical Terms", "J07BD51"), - VACCINE_PRODUCT_CONTAINING_CLOSTRIDIUM_TETANI_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Clostridium tetani antigen (medicinal product)", "", "local_terms", "863911006"), + VACCINE_PRODUCT_CONTAINING_CLOSTRIDIUM_TETANI_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Clostridium tetani antigen (medicinal product)", "", "SNOMED Clinical Terms", "863911006"), - HAEMOPHILUS_INFLUENZAE_B_KOMBINATIONEN_MIT_PERTUSSIS_UND_TOXOIDEN("Haemophilus influenzae B, Kombinationen mit Pertussis und Toxoiden", "", "local_terms", "J07AG52"), + HAEMOPHILUS_INFLUENZAE_B_KOMBINATIONEN_MIT_PERTUSSIS_UND_TOXOIDEN("Haemophilus influenzae B, Kombinationen mit Pertussis und Toxoiden", "", "SNOMED Clinical Terms", "J07AG52"), - HUMANER_PAPILLOMVIRUS_IMPFSTOFF_TYPEN61116183133455258("Humaner-Papillomvirus-Impfstoff (Typen 6,11,16,18,31,33,45,52,58)", "", "local_terms", "J07BM03"), + HUMANER_PAPILLOMVIRUS_IMPFSTOFF_TYPEN61116183133455258("Humaner-Papillomvirus-Impfstoff (Typen 6,11,16,18,31,33,45,52,58)", "", "SNOMED Clinical Terms", "J07BM03"), - ZOSTER_VIRUS_GEREINIGTES_ANTIGEN("Zoster Virus, gereinigtes Antigen", "", "local_terms", "J07BK03"), + ZOSTER_VIRUS_GEREINIGTES_ANTIGEN("Zoster Virus, gereinigtes Antigen", "", "SNOMED Clinical Terms", "J07BK03"), - DIPHTHERIE_HAEMOPHILUS_INFLUENZAE_B_PERTUSSIS_TETANUS_HEPATITIS_B_MENINGOKOKKEN_A_C("Diphtherie-Haemophilus influenzae B-Pertussis-Tetanus-Hepatitis B-Meningokokken A + C", "", "local_terms", "J07CA13"), + DIPHTHERIE_HAEMOPHILUS_INFLUENZAE_B_PERTUSSIS_TETANUS_HEPATITIS_B_MENINGOKOKKEN_A_C("Diphtherie-Haemophilus influenzae B-Pertussis-Tetanus-Hepatitis B-Meningokokken A + C", "", "SNOMED Clinical Terms", "J07CA13"), - VACCINE_PRODUCT_CONTAINING_HUMAN_PAPILLOMAVIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Human papillomavirus antigen (medicinal product)", "", "local_terms", "836379009"), + VACCINE_PRODUCT_CONTAINING_HUMAN_PAPILLOMAVIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Human papillomavirus antigen (medicinal product)", "", "SNOMED Clinical Terms", "836379009"), - MENINGOKOKKEN_TETRAVALENT_A_C_Y_W135_GEREINIGTES_POLYSACCHARID_ANTIGEN_KONJUGIERT("Meningokokken tetravalent (A, C, Y, W-135), gereinigtes Polysaccharid-Antigen, konjugiert", "", "local_terms", "J07AH08"), + MENINGOKOKKEN_TETRAVALENT_A_C_Y_W135_GEREINIGTES_POLYSACCHARID_ANTIGEN_KONJUGIERT("Meningokokken tetravalent (A, C, Y, W-135), gereinigtes Polysaccharid-Antigen, konjugiert", "", "SNOMED Clinical Terms", "J07AH08"), - VACCINE_PRODUCT_CONTAINING_BACILLUS_ANTHRACIS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Bacillus anthracis antigen (medicinal product)", "", "local_terms", "836384003"), + VACCINE_PRODUCT_CONTAINING_BACILLUS_ANTHRACIS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Bacillus anthracis antigen (medicinal product)", "", "SNOMED Clinical Terms", "836384003"), - HEPATITIS_B_VIRUS_VACCINE("Hepatitis B virus vaccine", "", "local_terms", "34689006"), + HEPATITIS_B_VIRUS_VACCINE("Hepatitis B virus vaccine", "", "SNOMED Clinical Terms", "34689006"), - ANDERE_VIRALE_IMPFSTOFFE("Andere virale Impfstoffe", "", "local_terms", "J07BX"), + ANDERE_VIRALE_IMPFSTOFFE("Andere virale Impfstoffe", "", "SNOMED Clinical Terms", "J07BX"), - VACCINE_PRODUCT_CONTAINING_VIBRIO_CHOLERAE_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Vibrio cholerae antigen (medicinal product)", "", "local_terms", "836383009"), + VACCINE_PRODUCT_CONTAINING_VIBRIO_CHOLERAE_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Vibrio cholerae antigen (medicinal product)", "", "SNOMED Clinical Terms", "836383009"), - DIPHTHERIA_TETANUS_VACCINE_PRODUCT("Diphtheria + tetanus vaccine (product)", "", "local_terms", "350327004"), + DIPHTHERIA_TETANUS_VACCINE_PRODUCT("Diphtheria + tetanus vaccine (product)", "", "SNOMED Clinical Terms", "350327004"), - ANTHRAX_ANTIGEN("Anthrax-Antigen", "", "local_terms", "J07AC01"), + ANTHRAX_ANTIGEN("Anthrax-Antigen", "", "SNOMED Clinical Terms", "J07AC01"), - PNEUMOKOKKEN_IMPFSTOFFE("Pneumokokken-Impfstoffe", "", "local_terms", "J07AL"), + PNEUMOKOKKEN_IMPFSTOFFE("Pneumokokken-Impfstoffe", "", "SNOMED Clinical Terms", "J07AL"), - VACCINE_PRODUCT_CONTAINING_MEASLES_MORBILLIVIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Measles morbillivirus antigen (medicinal product)", "", "local_terms", "836382004"), + VACCINE_PRODUCT_CONTAINING_MEASLES_MORBILLIVIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Measles morbillivirus antigen (medicinal product)", "", "SNOMED Clinical Terms", "836382004"), - VACCINE_PRODUCT_CONTAINING_HAEMOPHILUS_INFLUENZAE_TYPE_B_AND_HEPATITIS_B_VIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Haemophilus influenzae type B and Hepatitis B virus antigens (medicinal product)", "", "local_terms", "865946000"), + VACCINE_PRODUCT_CONTAINING_HAEMOPHILUS_INFLUENZAE_TYPE_B_AND_HEPATITIS_B_VIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Haemophilus influenzae type B and Hepatitis B virus antigens (medicinal product)", "", "SNOMED Clinical Terms", "865946000"), - BAKTERIELLE_UND_VIRALE_IMPFSTOFFE_KOMBINIERT("Bakterielle und virale Impfstoffe, kombiniert", "", "local_terms", "J07CA"), + BAKTERIELLE_UND_VIRALE_IMPFSTOFFE_KOMBINIERT("Bakterielle und virale Impfstoffe, kombiniert", "", "SNOMED Clinical Terms", "J07CA"), - GELBFIEBER_LEBEND_ABGESCHWAECHT("Gelbfieber, lebend abgeschwächt", "", "local_terms", "J07BL01"), + GELBFIEBER_LEBEND_ABGESCHWAECHT("Gelbfieber, lebend abgeschwächt", "", "SNOMED Clinical Terms", "J07BL01"), - VACCINE_PRODUCT_CONTAINING_CORYNEBACTERIUM_DIPHTHERIAE_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Corynebacterium diphtheriae antigen (medicinal product)", "", "local_terms", "836381006"), + VACCINE_PRODUCT_CONTAINING_CORYNEBACTERIUM_DIPHTHERIAE_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Corynebacterium diphtheriae antigen (medicinal product)", "", "SNOMED Clinical Terms", "836381006"), - DIPHTHERIE_ROETELN_TETANUS("Diphtherie-Röteln-Tetanus", "", "local_terms", "J07CA03"), + DIPHTHERIE_ROETELN_TETANUS("Diphtherie-Röteln-Tetanus", "", "SNOMED Clinical Terms", "J07CA03"), - HEPATITIS_IMPFSTOFFE("Hepatitis-Impfstoffe", "", "local_terms", "J07BC"), + HEPATITIS_IMPFSTOFFE("Hepatitis-Impfstoffe", "", "SNOMED Clinical Terms", "J07BC"), - HAEMOPHILUS_INFLUENZAE_B_KOMBINATIONEN_MIT_TOXOIDEN("Haemophilus influenzae B, Kombinationen mit Toxoiden", "", "local_terms", "J07AG51"), + HAEMOPHILUS_INFLUENZAE_B_KOMBINATIONEN_MIT_TOXOIDEN("Haemophilus influenzae B, Kombinationen mit Toxoiden", "", "SNOMED Clinical Terms", "J07AG51"), - SPEZIFISCHE_IMMUNGLOBULINE("Spezifische Immunglobuline", "", "local_terms", "J06BB"), + SPEZIFISCHE_IMMUNGLOBULINE("Spezifische Immunglobuline", "", "SNOMED Clinical Terms", "J06BB"), - VACCINE_PRODUCT_CONTAINING_TICK_BORNE_ENCEPHALITIS_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Tick-borne encephalitis virus antigen (medicinal product)", "", "local_terms", "836403007"), + VACCINE_PRODUCT_CONTAINING_TICK_BORNE_ENCEPHALITIS_VIRUS_ANTIGEN_MEDICINAL_PRODUCT("Vaccine product containing Tick-borne encephalitis virus antigen (medicinal product)", "", "SNOMED Clinical Terms", "836403007"), - VACCINE_PRODUCT_CONTAINING_MEASLES_MORBILLIVIRUS_AND_MUMPS_ORTHORUBULAVIRUS_AND_RUBELLA_VIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Measles morbillivirus and Mumps orthorubulavirus and Rubella virus antigens (medicinal product)", "", "local_terms", "836494009"), + VACCINE_PRODUCT_CONTAINING_MEASLES_MORBILLIVIRUS_AND_MUMPS_ORTHORUBULAVIRUS_AND_RUBELLA_VIRUS_ANTIGENS_MEDICINAL_PRODUCT("Vaccine product containing Measles morbillivirus and Mumps orthorubulavirus and Rubella virus antigens (medicinal product)", "", "SNOMED Clinical Terms", "836494009"), - TYPHUS_ORAL_LEBEND_ABGESCHWAECHT("Typhus, oral, lebend abgeschwächt", "", "local_terms", "J07AP01"), + TYPHUS_ORAL_LEBEND_ABGESCHWAECHT("Typhus, oral, lebend abgeschwächt", "", "SNOMED Clinical Terms", "J07AP01"), - ROETELN_LEBEND_ABGESCHWAECHT("Röteln, lebend abgeschwächt", "", "local_terms", "J07BJ01"), + ROETELN_LEBEND_ABGESCHWAECHT("Röteln, lebend abgeschwächt", "", "SNOMED Clinical Terms", "J07BJ01"), - TETANUS_TOXOID_KOMBINATIONEN_MIT_TETANUS_IMMUNGLOBULIN("Tetanus-Toxoid, Kombinationen mit Tetanus-Immunglobulin", "", "local_terms", "J07AM52"), + TETANUS_TOXOID_KOMBINATIONEN_MIT_TETANUS_IMMUNGLOBULIN("Tetanus-Toxoid, Kombinationen mit Tetanus-Immunglobulin", "", "SNOMED Clinical Terms", "J07AM52"), - TETANUS_VACCINE("Tetanus vaccine", "", "local_terms", "333621002"); + TETANUS_VACCINE("Tetanus vaccine", "", "SNOMED Clinical Terms", "333621002"); private String value; @@ -510,7 +510,6 @@ public static Map<String, ImpfstoffDefiningCode> getCodesAsMap(){ return impfstoffDefiningCodeHashMap; } - public String getValue() { return this.value ; } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungAction.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungAction.java index e8cbcae85..bf1454c29 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungAction.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungAction.java @@ -18,8 +18,8 @@ @Archetype("openEHR-EHR-ACTION.medication.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-04-29T13:40:23.862565+02:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-05-04T14:02:53.930005+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class ImpfungAction implements EntryEntity { /** @@ -58,14 +58,8 @@ public class ImpfungAction implements EntryEntity { * Description: Begründung, warum der Prozessschritt für das identifizierte Arzneimittel durchgeführt wurde. * Comment: Zum Beispiel: "Verschoben - Patient war zum Zeitpunkt der Arzneimittelgabe nicht verfügbar", "abgesagt - Nebenwirkung". Merke: Dies ist nicht der Grund für die Arzneimittelverordnung, sondern der spezifische Grund, warum ein Behandlungsschritt durchgeführt wurde. Wird oft verwendet, um Abweichungen von der ursprünglichen Verordnung zu dokumentieren. */ - @Path("/description[at0017]/items[at0021 and name/value='Impfung gegen']/value|defining_code") - private ImpfungGegenDefiningCode impfungGegenDefiningCode; - - /** - * Path: Impfstatus/Impfung/Tree/Impfung gegen/null_flavour - */ - @Path("/description[at0017]/items[at0021 and name/value='Impfung gegen']/null_flavour|defining_code") - private NullFlavour impfungGegenNullFlavourDefiningCode; + @Path("/description[at0017]/items[at0021 and name/value='Impfung gegen']") + private List<ImpfungImpfungGegenElement> impfungGegen; /** * Path: Impfstatus/Impfung/Zusätzliche Details @@ -156,21 +150,12 @@ public VerabreichteDosenCluster getVerabreichteDosen() { return this.verabreichteDosen ; } - public void setImpfungGegenDefiningCode(ImpfungGegenDefiningCode impfungGegenDefiningCode) { - this.impfungGegenDefiningCode = impfungGegenDefiningCode; - } - - public ImpfungGegenDefiningCode getImpfungGegenDefiningCode() { - return this.impfungGegenDefiningCode ; - } - - public void setImpfungGegenNullFlavourDefiningCode( - NullFlavour impfungGegenNullFlavourDefiningCode) { - this.impfungGegenNullFlavourDefiningCode = impfungGegenNullFlavourDefiningCode; + public void setImpfungGegen(List<ImpfungImpfungGegenElement> impfungGegen) { + this.impfungGegen = impfungGegen; } - public NullFlavour getImpfungGegenNullFlavourDefiningCode() { - return this.impfungGegenNullFlavourDefiningCode ; + public List<ImpfungImpfungGegenElement> getImpfungGegen() { + return this.impfungGegen ; } public void setZusaetzlicheDetails(List<Cluster> zusaetzlicheDetails) { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungActionContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungActionContainment.java index aeda67167..034e24bbb 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungActionContainment.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungActionContainment.java @@ -24,9 +24,7 @@ public class ImpfungActionContainment extends Containment { public SelectAqlField<VerabreichteDosenCluster> VERABREICHTE_DOSEN = new AqlFieldImp<VerabreichteDosenCluster>(ImpfungAction.class, "/description[at0017]/items[openEHR-EHR-CLUSTER.dosage.v1]", "verabreichteDosen", VerabreichteDosenCluster.class, this); - public SelectAqlField<ImpfungGegenDefiningCode> IMPFUNG_GEGEN_DEFINING_CODE = new AqlFieldImp<ImpfungGegenDefiningCode>(ImpfungAction.class, "/description[at0017]/items[at0021]/value|defining_code", "impfungGegenDefiningCode", ImpfungGegenDefiningCode.class, this); - - public SelectAqlField<NullFlavour> IMPFUNG_GEGEN_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ImpfungAction.class, "/description[at0017]/items[at0021]/null_flavour|defining_code", "impfungGegenNullFlavourDefiningCode", NullFlavour.class, this); + public ListSelectAqlField<ImpfungImpfungGegenElement> IMPFUNG_GEGEN = new ListAqlFieldImp<ImpfungImpfungGegenElement>(ImpfungAction.class, "/description[at0017]/items[at0021]", "impfungGegen", ImpfungImpfungGegenElement.class, this); public ListSelectAqlField<Cluster> ZUSAETZLICHE_DETAILS = new ListAqlFieldImp<Cluster>(ImpfungAction.class, "/description[at0017]/items[at0053]", "zusaetzlicheDetails", Cluster.class, this); diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungGegenDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungGegenDefiningCode.java index 18393db38..01c7af19c 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungGegenDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungGegenDefiningCode.java @@ -5,7 +5,6 @@ import java.util.Map; import org.ehrbase.client.classgenerator.EnumValueSet; -import org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.InterpretationDefiningCode; public enum ImpfungGegenDefiningCode implements EnumValueSet { DISEASE_CAUSED_BY_SEVERE_ACUTE_RESPIRATORY_SYNDROME_CORONAVIRUS2_DISORDER("Disease caused by Severe acute respiratory syndrome coronavirus 2 (disorder)", "", "SNOMED Clinical Terms", "840539006"), diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungImpfungGegenElement.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungImpfungGegenElement.java new file mode 100644 index 000000000..3784e0369 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungImpfungGegenElement.java @@ -0,0 +1,60 @@ +package org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.LocatableEntity; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-05-04T14:02:53.969060+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +public class ImpfungImpfungGegenElement implements LocatableEntity { + /** + * Path: Impfstatus/Impfung/Impfung gegen + * Description: Begründung, warum der Prozessschritt für das identifizierte Arzneimittel durchgeführt wurde. + * Comment: Zum Beispiel: "Verschoben - Patient war zum Zeitpunkt der Arzneimittelgabe nicht verfügbar", "abgesagt - Nebenwirkung". Merke: Dies ist nicht der Grund für die Arzneimittelverordnung, sondern der spezifische Grund, warum ein Behandlungsschritt durchgeführt wurde. Wird oft verwendet, um Abweichungen von der ursprünglichen Verordnung zu dokumentieren. + */ + @Path("/value|defining_code") + private ImpfungGegenDefiningCode value; + + /** + * Path: Impfstatus/Impfung/Tree/Impfung gegen/null_flavour + */ + @Path("/null_flavour|defining_code") + private NullFlavour value2; + + /** + * Path: Impfstatus/Impfung/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setValue(ImpfungGegenDefiningCode value) { + this.value = value; + } + + public ImpfungGegenDefiningCode getValue() { + return this.value ; + } + + public void setValue2(NullFlavour value2) { + this.value2 = value2; + } + + public NullFlavour getValue2() { + return this.value2 ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluation.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluation.java index 081c32b23..0c898cf6b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluation.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluation.java @@ -16,8 +16,8 @@ @Archetype("openEHR-EHR-EVALUATION.absence.v2") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-04-29T13:40:23.919374+02:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-05-04T14:02:53.980889+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class UnbekannterImpfstatusEvaluation implements EntryEntity { /** diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenCluster.java index 6927eff2f..a3a77e122 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenCluster.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenCluster.java @@ -17,8 +17,8 @@ @Archetype("openEHR-EHR-CLUSTER.dosage.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-04-29T13:40:23.902029+02:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-05-04T14:02:53.963468+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class VerabreichteDosenCluster implements LocatableEntity { /** @@ -61,7 +61,7 @@ public class VerabreichteDosenCluster implements LocatableEntity { /** * Path: Impfstatus/Impfung/Verabreichte Dosen/Tägliche Verabreichungszeiten * Description: Strukturierte Details des Musters für Verabreichungszeiten innerhalb eines Tages. - * Comment: Zum Beispiel: 'Morgens', 'um 06:00, 14:00, 21:00'. + * Comment: Zum Beispiel: "Morgens", "Um 06:00, 14:00, 21:00"'. */ @Path("/items[at0037]") private List<Cluster> taeglicheVerabreichungszeiten; diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java b/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java index 010e42e01..8e8d8d199 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java @@ -42,11 +42,8 @@ public enum FhirBridgeEventType implements EventType, EnumeratedCodedValue<Event CreateQuestionnaireResponse("questionnaire-response-create", "Create Questionnaire Response"), - FindQuestionnaireResponse("questionnaire-response-find", "Find Questionnaire Response"), + FindQuestionnaireResponse("questionnaire-response-find", "Find Questionnaire Response"); - CreateImmunization("immunization-create", "Create Immunization"), - - FindImmunization("immunization-find", "Find Immunization"); private final EventType value; diff --git a/src/main/resources/opt/Impfstatus.opt b/src/main/resources/opt/Impfstatus.opt index 8b067ce34..640e977c7 100644 --- a/src/main/resources/opt/Impfstatus.opt +++ b/src/main/resources/opt/Impfstatus.opt @@ -25,9 +25,11 @@ <other_details id="Sign off"/> <other_details id="Speciality"/> <other_details id="User roles"/> - <other_details id="MD5-CAM-1.0.1">dede7b805905a1ff811408523dff835d</other_details> + <other_details id="MD5-CAM-1.0.1">fc002bbb4956b50235b9740dd4ef29c6</other_details> <other_details id="PARENT:MD5-CAM-1.0.1">8BD8D5F850A9DEE8A16075105D36FD32</other_details> <other_details id="original_language">ISO_639-1::de</other_details> + <other_details id="sem_ver">1.0.0</other_details> + <other_details id="build_uid"/> <other_details id="original_language">ISO_639-1::de</other_details> <details> <language> @@ -275,11 +277,9 @@ <rm_type_name>ACTION</rm_type_name> <occurrences> <lower_included>true</lower_included> - <upper_included>true</upper_included> <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> </occurrences> <node_id>at0000</node_id> <attributes xsi:type="C_SINGLE_ATTRIBUTE"> @@ -1022,7 +1022,7 @@ </occurrences> <node_id/> <terminology_id> - <value>local_terms</value> + <value>SNOMED Clinical Terms</value> </terminology_id> <code_list>421245007</code_list> <code_list>787859002</code_list> @@ -1586,7 +1586,7 @@ <items id="text">Dosierung</items> </term_definitions> <term_definitions code="at0037"> - <items id="comment">Zum Beispiel: 'Morgens', 'um 06:00, 14:00, 21:00'.</items> + <items id="comment">Zum Beispiel: "Morgens", "Um 06:00, 14:00, 21:00"'.</items> <items id="description">Strukturierte Details des Musters für Verabreichungszeiten innerhalb eines Tages.</items> <items id="text">Tägliche Verabreichungszeiten</items> </term_definitions> @@ -1633,18 +1633,16 @@ Wenn mehrere Dosierungen angegeben werden, gibt die 'Dosierungsreihenfolge' die <term_definitions code="at0178"> <items id="comment">Zum Beispiel: "Salbe auf die betroffene Stelle auftragen, bis sie glänzt". Dieses Element soll den Entwicklern ermöglichen, die Strukturen zum Erhöhen / Verringern von Dosierungen zu verwenden, ohne die Dosierungen notwendigerweise auf strukturierte Weise spezifizieren zu müssen.</items> <items id="description">Textbeschreibung der Dosis.</items> - <items id="text">Dosisberschreibung</items> + <items id="text">Dosisbeschreibung</items> </term_definitions> </children> <children xsi:type="C_COMPLEX_OBJECT"> <rm_type_name>ELEMENT</rm_type_name> <occurrences> <lower_included>true</lower_included> - <upper_included>true</upper_included> <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> </occurrences> <node_id>at0021</node_id> <attributes xsi:type="C_SINGLE_ATTRIBUTE"> From bf8eed5429b8237631d8fe3dd3a5c92a2b0b7093 Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Tue, 4 May 2021 14:32:23 +0200 Subject: [PATCH 042/141] added Time mapping --- .../ConsentToCompositionConverter.java | 2 +- .../ehr/converter/generic/TimeConverter.java | 24 +++++++++++++------ .../DnrAnordnungCompositionConverter.java | 3 --- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConsentToCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConsentToCompositionConverter.java index e14741829..cdcee163d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConsentToCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConsentToCompositionConverter.java @@ -11,7 +11,7 @@ public abstract class ConsentToCompositionConverter<C extends CompositionEntity> @Override public C convert(@NonNull Consent resource) { C composition = super.convert(resource); - //composition.setStartTimeValue(Instant.now()); + composition.setStartTimeValue(TimeConverter.convertConsentTime(resource)); return composition; } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java index 4e5b819c7..07342e3b9 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java @@ -2,13 +2,13 @@ import org.ehrbase.fhirbridge.ehr.converter.ConversionException; import org.hl7.fhir.r4.model.Condition; +import org.hl7.fhir.r4.model.Consent; import org.hl7.fhir.r4.model.DiagnosticReport; import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Procedure; import org.hl7.fhir.r4.model.QuestionnaireResponse; import java.time.OffsetDateTime; -import java.time.OffsetTime; import java.time.ZonedDateTime; import java.time.temporal.TemporalAccessor; import java.util.Optional; @@ -31,7 +31,7 @@ public static TemporalAccessor convertObservationTime(Observation observation) { .findFirst() .orElse(ZonedDateTime.now()); } else if (observation.hasEffectiveInstantType()) { // EffectiveInstant - return observation.getEffectiveDateTimeType().getValueAsCalendar().toZonedDateTime(); + return observation.getEffectiveInstantType().getValueAsCalendar().toZonedDateTime(); } else { throw new ConversionException("Start time is not defined in observation"); } @@ -84,12 +84,12 @@ public static Optional<TemporalAccessor> convertDiagnosticReportEndTime(Diagnost } public static Optional<TemporalAccessor> convertProcedureTime(Procedure resource) { - if (resource.hasPerformedDateTimeType() && resource.getPerformedDateTimeType().getExtension().size()==0) { // EffectiveDateTime + if (resource.hasPerformedDateTimeType() && resource.getPerformedDateTimeType().getExtension().size() == 0) { // EffectiveDateTime return Optional.ofNullable(resource.getPerformedDateTimeType().getValueAsCalendar().toZonedDateTime()); - } else if(resource.hasPerformedDateTimeType() && resource.getPerformedDateTimeType().hasExtension() && resource.getPerformedDateTimeType().getExtension().get(0).getValue().toString().equals("not-performed")){ - //TODO wait until Template is fixed return Optional.empty(); - return Optional.of(OffsetDateTime.now()); - }else if (resource.hasPerformedPeriod() && resource.getPerformedPeriod().hasStart()) { // EffectivePeriod + } else if (resource.hasPerformedDateTimeType() && resource.getPerformedDateTimeType().hasExtension() && resource.getPerformedDateTimeType().getExtension().get(0).getValue().toString().equals("not-performed")) { + //TODO wait until Template is fixed return Optional.empty(); + return Optional.of(OffsetDateTime.now()); + } else if (resource.hasPerformedPeriod() && resource.getPerformedPeriod().hasStart()) { // EffectivePeriod return Optional.ofNullable(resource.getPerformedPeriod().getStartElement().getValueAsCalendar().toZonedDateTime()); } else { throw new ConversionException("Start time is not defined in Procedure"); @@ -103,4 +103,14 @@ public static Optional<TemporalAccessor> convertProcedureEndTime(Procedure resou return Optional.empty(); } } + + public static TemporalAccessor convertConsentTime(Consent resource) { + if (resource.hasDateTime()) { + return resource.getDateTime().toInstant(); + } else { + return OffsetDateTime.now(); + } + } + + } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/DnrAnordnung/DnrAnordnungCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/DnrAnordnung/DnrAnordnungCompositionConverter.java index f93b11150..a80dc94f9 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/DnrAnordnung/DnrAnordnungCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/DnrAnordnung/DnrAnordnungCompositionConverter.java @@ -14,9 +14,7 @@ import org.hl7.fhir.r4.model.Consent; import org.springframework.lang.NonNull; -import java.time.Instant; import java.util.ArrayList; -import java.util.Date; import java.util.List; public class DnrAnordnungCompositionConverter extends ConsentToCompositionConverter<DNRAnordnungComposition> { @@ -27,7 +25,6 @@ public DNRAnordnungComposition convertInternal(@NonNull Consent resource) { composition.setStatusDefiningCode(createStatusDefiningCode(resource.getStatus())); composition.setKategorie(createDnrAnordnungKategorieElement()); composition.setDnrAnordnung(createDnrAnordnung(resource.getProvision())); - composition.setStartTimeValue(Instant.now());//TODO remove, just tested if this can stop the startTime error return composition; } From 49a5d91de31021afe7437f9011b43008775bb095 Mon Sep 17 00:00:00 2001 From: Erik Tute <eriktute@mx.de> Date: Tue, 4 May 2021 15:59:27 +0200 Subject: [PATCH 043/141] added Tests for mapping --- .../definition/BeschreibungDefiningCode.java | 1 - .../fhirbridge/fhir/consent/DnrIT.java | 17 +- .../Consent/paragon-consent-dnr-normal-2.json | 200 +++++++++++++++ .../Consent/paragon-consent-dnr-normal-3.json | 200 +++++++++++++++ .../Consent/paragon-consent-dnr-normal.json | 242 ++++++++++++++---- 5 files changed, 610 insertions(+), 50 deletions(-) create mode 100644 src/test/resources/Consent/paragon-consent-dnr-normal-2.json create mode 100644 src/test/resources/Consent/paragon-consent-dnr-normal-3.json diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/BeschreibungDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/BeschreibungDefiningCode.java index ac2e3189d..b1ef37bcd 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/BeschreibungDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/definition/BeschreibungDefiningCode.java @@ -37,7 +37,6 @@ public static BeschreibungDefiningCode get_by_SNOMED_code(List<CodeableConcept> return bc; } } - //TODO Test - hier gehts weiter: das oben scheint jetzt gefixed, schauen wo der nächste Fehler liegt throw new UnprocessableEntityException("Getting BeschreibungDefiningCode failed. Code not found for: " + fhir_code.getCoding().get(0).toString()); } diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/consent/DnrIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/DnrIT.java index 78b4cb41a..64ee179c5 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/consent/DnrIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/DnrIT.java @@ -4,6 +4,8 @@ import org.ehrbase.fhirbridge.ehr.converter.ConversionException; import org.ehrbase.fhirbridge.ehr.converter.specific.DnrAnordnung.DnrAnordnungCompositionConverter; import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.DNRAnordnungComposition; +import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.DnrAnordnungEvaluation; +import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.DnrAnordnungKategorieElement; import org.ehrbase.fhirbridge.fhir.AbstractMappingTestSetupIT; import org.hl7.fhir.r4.model.Consent; import org.javers.core.Javers; @@ -34,6 +36,18 @@ void mappingNormal() throws IOException { "paragon-consent-dnr-normal.json"); } + @Test + void mappingNormal_2() throws IOException { + testMapping("consent-example-duplicate-2.json", + "paragon-consent-dnr-normal-2.json"); + } + + @Test + void mappingNormal_3() throws IOException { + testMapping("consent-example-duplicate-3.json", + "paragon-consent-dnr-normal-3.json"); + } + // ##################################################################################### // check exceptions @@ -46,7 +60,8 @@ public Javers getJavers() { return JaversBuilder.javers() .registerValue(TemporalAccessor.class, new CustomTemporalAcessorComparator()) .registerValueObject(new ValueObjectDefinition(DNRAnordnungComposition.class, List.of("location", "feederAudit"))) - //.registerValueObject(GroesseLaengeObservation.class) + .registerValueObject(DnrAnordnungEvaluation.class) + .registerValueObject(DnrAnordnungKategorieElement.class) .build(); } diff --git a/src/test/resources/Consent/paragon-consent-dnr-normal-2.json b/src/test/resources/Consent/paragon-consent-dnr-normal-2.json new file mode 100644 index 000000000..4ae2e7fe6 --- /dev/null +++ b/src/test/resources/Consent/paragon-consent-dnr-normal-2.json @@ -0,0 +1,200 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "DNR-Anordnung" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "DNR-Anordnung" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Consent/1/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2021-05-04T15:16:37,2783706+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "aktiv", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "http://hl7.org/fhir/consent-state-codes" + }, + "code_string" : "aktiv" + } + }, + "archetype_node_id" : "at0004" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Kategorie" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Do Not Resuscitate", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "http://terminology.hl7.org/CodeSystem/consentcategorycodes" + }, + "code_string" : "dnr" + } + }, + "archetype_node_id" : "at0005" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "EVALUATION", + "name" : { + "_type" : "DV_TEXT", + "value" : "DNR-Anordnung" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Item tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Art der Richtlinie" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Do No Resusciate", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "http://terminology.hl7.org/CodeSystem/consentcategorycodes" + }, + "code_string" : "dnr" + } + }, + "archetype_node_id" : "at0005" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Beschreibung" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Not for resuscitation (finding)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "304253006" + } + }, + "archetype_node_id" : "at0006" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-EVALUATION.advance_care_directive.v1" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/test/resources/Consent/paragon-consent-dnr-normal-3.json b/src/test/resources/Consent/paragon-consent-dnr-normal-3.json new file mode 100644 index 000000000..7f60b6c59 --- /dev/null +++ b/src/test/resources/Consent/paragon-consent-dnr-normal-3.json @@ -0,0 +1,200 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "DNR-Anordnung" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "DNR-Anordnung" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Consent/3/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2021-05-04T15:17:39,3733223+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "aktiv", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "http://hl7.org/fhir/consent-state-codes" + }, + "code_string" : "aktiv" + } + }, + "archetype_node_id" : "at0004" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Kategorie" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Do Not Resuscitate", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "http://terminology.hl7.org/CodeSystem/consentcategorycodes" + }, + "code_string" : "dnr" + } + }, + "archetype_node_id" : "at0005" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "EVALUATION", + "name" : { + "_type" : "DV_TEXT", + "value" : "DNR-Anordnung" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Item tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Art der Richtlinie" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Do No Resusciate", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "http://terminology.hl7.org/CodeSystem/consentcategorycodes" + }, + "code_string" : "dnr" + } + }, + "archetype_node_id" : "at0005" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Beschreibung" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Unknown (qualifier value)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "261665006" + } + }, + "archetype_node_id" : "at0006" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-EVALUATION.advance_care_directive.v1" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/test/resources/Consent/paragon-consent-dnr-normal.json b/src/test/resources/Consent/paragon-consent-dnr-normal.json index 666acaaab..6aedcabf0 100644 --- a/src/test/resources/Consent/paragon-consent-dnr-normal.json +++ b/src/test/resources/Consent/paragon-consent-dnr-normal.json @@ -1,54 +1,200 @@ { - "resourceType": "Consent", - "id": "e1c90e84-aa7b-4999-8036-27f88dd7b60e", - "meta": { - "profile": [ - "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/do-not-resuscitate-order" - ] - }, - "status": "active", - "scope": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/consentscope", - "code": "adr", - "display": "Advanced Care Directive" - } - ] - }, - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/consentcategorycodes", - "code": "dnr", - "display": "Do Not Resuscitate" - } - ] + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "DNR-Anordnung" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "DNR-Anordnung" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Consent/1/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" } - ], - "patient": { - "identifier": { - "system": "urn:ietf:rfc:4122", - "value": "{{patientId}}" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" } }, - "policy": [ - { - "uri": "https://www.aerzteblatt.de/archiv/65440/DNR-Anordnungen-Das-fehlende-Bindeglied" + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2021-05-04T14:37:55,4500188+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "aktiv", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "http://hl7.org/fhir/consent-state-codes" + }, + "code_string" : "aktiv" + } + }, + "archetype_node_id" : "at0004" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Kategorie" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Do Not Resuscitate", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "http://terminology.hl7.org/CodeSystem/consentcategorycodes" + }, + "code_string" : "dnr" + } + }, + "archetype_node_id" : "at0005" + } ], + "archetype_node_id" : "at0001" } - ], - "provision": { - "code": [ - { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "304252001", - "display": "For resuscitation" + }, + "content" : [ { + "_type" : "EVALUATION", + "name" : { + "_type" : "DV_TEXT", + "value" : "DNR-Anordnung" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Item tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Art der Richtlinie" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Do No Resusciate", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "http://terminology.hl7.org/CodeSystem/consentcategorycodes" + }, + "code_string" : "dnr" } - ] - } - ] - } -} + }, + "archetype_node_id" : "at0005" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Beschreibung" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "For resuscitation (finding)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "304252001" + } + }, + "archetype_node_id" : "at0006" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-EVALUATION.advance_care_directive.v1" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file From 242a9dfccbb6bfd1f669402774dd9b90f336af26 Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Tue, 4 May 2021 16:00:53 +0200 Subject: [PATCH 044/141] added tests --- .../ImpfstatusCompositionConverter.java | 4 ++- .../impfstatus/ImpfungActionConverter.java | 24 ++++++++++++-- .../immunization/HistoryOfVaccinationIT.java | 31 +++++++++++++++++++ 3 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/immunization/HistoryOfVaccinationIT.java diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfstatusCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfstatusCompositionConverter.java index f60a6347b..8530454c6 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfstatusCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfstatusCompositionConverter.java @@ -4,13 +4,15 @@ import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.ImpfstatusComposition; import org.hl7.fhir.r4.model.Immunization; +import java.util.List; + public class ImpfstatusCompositionConverter extends ImmunizationToCompositionConverter<ImpfstatusComposition> { @Override protected ImpfstatusComposition convertInternal(Immunization resource) { ImpfstatusComposition impfstatusComposition = new ImpfstatusComposition(); if(!resource.getOccurrenceDateTimeType().hasExtension() || resource.getVaccineCode().getCoding().get(0).getSystem().equals("http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips")){ - impfstatusComposition.setImpfung(new ImpfungActionConverter().convert(resource)); + impfstatusComposition.setImpfung(List.of(new ImpfungActionConverter().convert(resource))); }else{ impfstatusComposition.setUnbekannterImpfstatus(new UnbekannterImpfstatusEvaluationConverter().convert(resource)); } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfungActionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfungActionConverter.java index d0666e8ec..93b737672 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfungActionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfungActionConverter.java @@ -3,9 +3,11 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.ehrbase.fhirbridge.ehr.converter.generic.ImmunizationToActionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem; +import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.CurrentStateDefiningCode; import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.ImpfstoffDefiningCode; import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.ImpfungAction; import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.ImpfungGegenDefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.ImpfungImpfungGegenElement; import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.VerabreichteDosenCluster; import org.hl7.fhir.r4.model.Immunization; @@ -20,10 +22,24 @@ public class ImpfungActionConverter extends ImmunizationToActionConverter<Impfun protected ImpfungAction convertInternal(Immunization resource) { ImpfungAction impfungAction = new ImpfungAction(); impfungAction.setImpfstoffDefiningCode(mapImpstoffDefiningCode(resource)); + impfungAction.setCurrentStateDefiningCode(mapCurentState(resource)); mapImpfungGegenAndDosis(resource, impfungAction); return impfungAction; } + private CurrentStateDefiningCode mapCurentState(Immunization resource) { + String statusCode = resource.getStatus().toCode(); + if (statusCode.equals(CurrentStateDefiningCode.ABORTED.getValue())) { + return CurrentStateDefiningCode.ABORTED; + }else if (statusCode.equals(CurrentStateDefiningCode.COMPLETED.getValue())) { + return CurrentStateDefiningCode.COMPLETED; + }else if (statusCode.equals(CurrentStateDefiningCode.ACTIVE.getValue())) { + return CurrentStateDefiningCode.ACTIVE; + }else{ + throw new UnprocessableEntityException("The status code" + statusCode+ " is wrong or not supported by the fhir-bridge. Supported are: aborted, completed and active"); + } + } + private void mapImpfungGegenAndDosis(Immunization resource, ImpfungAction impfungAction) { if (resource.hasProtocolApplied()) { determineAndSet(resource, impfungAction); @@ -48,14 +64,16 @@ private void setImfungGegen(ImpfungAction impfungAction, Immunization resource) && resource.getProtocolApplied().get(0).getTargetDisease().get(0).getCoding().get(0).getSystem().equals(CodeSystem.SNOMED.getUrl())) { impfungAction.setImpfungGegen(List.of(mapImpfungGegen(resource))); } else { - throw new UnprocessableEntityException("Target Disease code"); + throw new UnprocessableEntityException("Target Disease System is wrong, has to be SNOMED."); } } - private ImpfungGegenDefiningCode mapImpfungGegen(Immunization resource) { + private ImpfungImpfungGegenElement mapImpfungGegen(Immunization resource) { + ImpfungImpfungGegenElement impfungImpfungGegenElement = new ImpfungImpfungGegenElement(); String snomedCode = resource.getProtocolApplied().get(0).getTargetDisease().get(0).getCoding().get(0).getCode(); if (ImpfungGegenDefiningCode.getCodesAsMap().containsKey(snomedCode)) { - return ImpfungGegenDefiningCode.getCodesAsMap().get(snomedCode); + impfungImpfungGegenElement.setValue(ImpfungGegenDefiningCode.getCodesAsMap().get(snomedCode)); + return impfungImpfungGegenElement; } else { throw new UnprocessableEntityException("Invalid Snomed Code " + snomedCode + " entered"); } diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/immunization/HistoryOfVaccinationIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/immunization/HistoryOfVaccinationIT.java new file mode 100644 index 000000000..00ca01c84 --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/immunization/HistoryOfVaccinationIT.java @@ -0,0 +1,31 @@ +package org.ehrbase.fhirbridge.fhir.immunization; + +import org.ehrbase.fhirbridge.fhir.AbstractMappingTestSetupIT; +import org.hl7.fhir.r4.model.Immunization; +import org.javers.core.Javers; + +import java.io.IOException; + +/** + * Integration tests for {@link Immunization} using History of Vaccination profile. + */ +public class HistoryOfVaccinationIT extends AbstractMappingTestSetupIT { + public HistoryOfVaccinationIT(String directory, Class clazz) { + super("Immunization/", Immunization.class); + } + + @Override + public Javers getJavers() { + return null; + } + + @Override + public Exception executeMappingException(String resource) throws IOException { + return null; + } + + @Override + public void testMapping(String resourcePath, String paragonPath) throws IOException { + + } +} From 8a662be7921ce88ce4dba400258a176d31db88a4 Mon Sep 17 00:00:00 2001 From: Erik Tute <eriktute@mx.de> Date: Tue, 4 May 2021 16:16:32 +0200 Subject: [PATCH 045/141] fixed Tests for mapping --- .../org/ehrbase/fhirbridge/fhir/consent/DnrIT.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/consent/DnrIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/DnrIT.java index 64ee179c5..6f6c5a74c 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/consent/DnrIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/DnrIT.java @@ -65,6 +65,15 @@ public Javers getJavers() { .build(); } + public Javers getJaversIgnoreStartTime() { + return JaversBuilder.javers() + .registerValue(TemporalAccessor.class, new CustomTemporalAcessorComparator()) + .registerValueObject(new ValueObjectDefinition(DNRAnordnungComposition.class, List.of("location", "feederAudit", "startTimeValue"))) + .registerValueObject(DnrAnordnungEvaluation.class) + .registerValueObject(DnrAnordnungKategorieElement.class) + .build(); + } + @Override public Exception executeMappingException(String path) throws IOException { Consent csnt = (Consent) testFileLoader.loadResource(path); @@ -78,7 +87,7 @@ public void testMapping(String resourcePath, String paragonPath) throws IOExcept Consent consent = (Consent) super.testFileLoader.loadResource(resourcePath); DnrAnordnungCompositionConverter dnrAnordnungCompositionConverter = new DnrAnordnungCompositionConverter(); DNRAnordnungComposition mapped = dnrAnordnungCompositionConverter.convert(consent); - Diff diff = compareCompositions(getJavers(), paragonPath, mapped); + Diff diff = compareCompositions(getJaversIgnoreStartTime(), paragonPath, mapped); assertEquals(0, diff.getChanges().size()); } } From 37441dda907966b73688bec3352d62d01b604d33 Mon Sep 17 00:00:00 2001 From: uakoenig <urs.a.koenig@t-online.de> Date: Tue, 4 May 2021 16:42:42 +0200 Subject: [PATCH 046/141] mapping eCRF fehlt --- ...rialParticipationCompositionConverter.java | 2 + ...TrialParticipationEvaluationConverter.java | 2 + .../StudienteilnahmeDefiningCode.java | 2 + .../fhirbridge/fhir/common/Profile.java | 2 + ...terventionalClinicalTrialParticipation.xml | 7669 +++++++++++++++++ ...reate-clinical-trial-participation-no.json | 64 + ...cal-trial-participation-notapplicable.json | 64 + ...-clinical-trial-participation-unknown.json | 64 + ...l-trial-participation-yes-eudract-nct.json | 92 + ...nical-trial-participation-yes-eudract.json | 79 + ...-clinical-trial-participation-yes-nct.json | 79 + 11 files changed, 8119 insertions(+) create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationCompositionConverter.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeDefiningCode.java create mode 100644 src/main/resources/profiles/InterventionalClinicalTrialParticipation.xml create mode 100644 src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-no.json create mode 100644 src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-notapplicable.json create mode 100644 src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-unknown.json create mode 100644 src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-eudract-nct.json create mode 100644 src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-eudract.json create mode 100644 src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-nct.json diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationCompositionConverter.java new file mode 100644 index 000000000..f1da02ce5 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationCompositionConverter.java @@ -0,0 +1,2 @@ +package org.ehrbase.fhirbridge.ehr.converter.specific.clinicaltrialparticipation;public class ClinicalTrialParticipationCompositionConverter { +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java new file mode 100644 index 000000000..cde228ecd --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java @@ -0,0 +1,2 @@ +package org.ehrbase.fhirbridge.ehr.converter.specific.clinicaltrialparticipation;public class ClinicalTrialParticipationEvaluationConverter { +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeDefiningCode.java new file mode 100644 index 000000000..c7b2d8b35 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeDefiningCode.java @@ -0,0 +1,2 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition;public enum StudienteilnahmeDefiningCode { +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java index b834e74e6..aa22f0fae 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java @@ -72,6 +72,8 @@ public enum Profile { CLINICAL_FRAILTY_SCALE(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/frailty-score"), + CLINICAL_TRIAL_PARTICIPATION(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/interventional-clinical-trial-participation"), + CORONARIRUS_NACHWEIS_TEST(Observation.class, "https://charite.infectioncontrol.de/fhir/core/StructureDefinition/CoronavirusNachweisTest"), FIO2(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/inhaled-oxygen-concentration"), diff --git a/src/main/resources/profiles/InterventionalClinicalTrialParticipation.xml b/src/main/resources/profiles/InterventionalClinicalTrialParticipation.xml new file mode 100644 index 000000000..c43b74cf5 --- /dev/null +++ b/src/main/resources/profiles/InterventionalClinicalTrialParticipation.xml @@ -0,0 +1,7669 @@ +<StructureDefinition xmlns="http://hl7.org/fhir"> + <id value="gecco-observation-interventional-clinical-trial-participation" /> + <url value="https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/interventional-clinical-trial-participation" /> + <version value="1.0" /> + <name value="InterventionalClinicalTrialParticipation" /> + <title value="Interventional Clinical Trial Participation" /> + <status value="active" /> + <date value="2020-10-29" /> + <publisher value="Charité" /> + <contact> + <telecom> + <system value="url" /> + <value value="https://www.bihealth.org/en/research/core-facilities/interoperability/" /> + </telecom> + </contact> + <description value="This observation captures if the patient participated in one or more interventional clinical trials." /> + <fhirVersion value="4.0.1" /> + <mapping> + <identity value="workflow" /> + <uri value="http://hl7.org/fhir/workflow" /> + <name value="Workflow Pattern" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <uri value="http://snomed.info/conceptdomain" /> + <name value="SNOMED CT Concept Domain Binding" /> + </mapping> + <mapping> + <identity value="v2" /> + <uri value="http://hl7.org/v2" /> + <name value="HL7 v2 Mapping" /> + </mapping> + <mapping> + <identity value="rim" /> + <uri value="http://hl7.org/v3" /> + <name value="RIM Mapping" /> + </mapping> + <mapping> + <identity value="w5" /> + <uri value="http://hl7.org/fhir/fivews" /> + <name value="FiveWs Pattern Mapping" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <uri value="http://snomed.org/attributebinding" /> + <name value="SNOMED CT Attribute Binding" /> + </mapping> + <kind value="resource" /> + <abstract value="false" /> + <type value="Observation" /> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Observation" /> + <derivation value="constraint" /> + <snapshot> + <element id="Observation"> + <path value="Observation" /> + <short value="Measurements and simple assertions" /> + <definition value="Measurements and simple assertions made about a patient, device or other subject." /> + <comment value="Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc. Other resources are used to provide context for observations such as laboratory reports, etc." /> + <alias value="Vital Signs" /> + <alias value="Measurement" /> + <alias value="Results" /> + <alias value="Tests" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation" /> + <min value="0" /> + <max value="*" /> + </base> + <constraint> + <key value="dom-2" /> + <severity value="error" /> + <human value="If the resource is contained in another resource, it SHALL NOT contain nested Resources" /> + <expression value="contained.contained.empty()" /> + <xpath value="not(parent::f:contained and f:contained)" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="dom-4" /> + <severity value="error" /> + <human value="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated" /> + <expression value="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()" /> + <xpath value="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="dom-3" /> + <severity value="error" /> + <human value="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 value="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 value="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 value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice"> + <valueBoolean value="true" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation"> + <valueMarkdown value="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." /> + </extension> + <key value="dom-6" /> + <severity value="warning" /> + <human value="A resource should have narrative for robust management" /> + <expression value="text.`div`.exists()" /> + <xpath value="exists(f:text/h:div)" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="dom-5" /> + <severity value="error" /> + <human value="If a resource is contained in another resource, it SHALL NOT have a security label" /> + <expression value="contained.meta.security.empty()" /> + <xpath value="not(exists(f:contained/*/f:meta/f:security))" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="obs-7" /> + <severity value="error" /> + <human value="If Observation.code is the same as an Observation.component.code then the value element associated with the code SHALL NOT be present" /> + <expression value="value.empty() or component.code.where(coding.intersect(%resource.code.coding).exists()).empty()" /> + <xpath value="not(f:*[starts-with(local-name(.), 'value')] and (for $coding in f:code/f:coding return f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value] [f:system/@value=$coding/f:system/@value]))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <constraint> + <key value="obs-6" /> + <severity value="error" /> + <human value="dataAbsentReason SHALL only be present if Observation.value[x] is not present" /> + <expression value="dataAbsentReason.empty() or value.empty()" /> + <xpath value="not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="Entity. Role, or Act" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 363787002 |Observable entity|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Observation[classCode=OBS, moodCode=EVN]" /> + </mapping> + </element> + <element id="Observation.id"> + <path value="Observation.id" /> + <short value="Logical id of this artifact" /> + <definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <isSummary value="true" /> + </element> + <element id="Observation.meta"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.meta" /> + <short value="Metadata about the resource" /> + <definition value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.meta" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Meta" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.meta.id"> + <path value="Observation.meta.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.meta.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.meta.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.meta.versionId"> + <path value="Observation.meta.versionId" /> + <short value="Version specific identifier" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Meta.versionId" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.meta.lastUpdated"> + <path value="Observation.meta.lastUpdated" /> + <short value="When the resource version last changed" /> + <definition value="When the resource last changed - e.g. when the version changed." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Meta.lastUpdated" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="instant" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.meta.source"> + <path value="Observation.meta.source" /> + <short value="Identifies where the resource comes from" /> + <definition value="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 value="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. This 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 value="0" /> + <max value="1" /> + <base> + <path value="Meta.source" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.meta.profile"> + <path value="Observation.meta.profile" /> + <short value="Profiles this resource claims to conform to" /> + <definition value="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 value="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 value="0" /> + <max value="*" /> + <base> + <path value="Meta.profile" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="canonical" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/StructureDefinition" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.meta.security"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.meta.security" /> + <short value="Security Labels applied to this resource" /> + <definition value="Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure." /> + <comment value="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 value="0" /> + <max value="*" /> + <base> + <path value="Meta.security" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="SecurityLabels" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> + <valueBoolean value="true" /> + </extension> + <strength value="extensible" /> + <description value="Security Labels from the Healthcare Privacy and Security Classification System." /> + <valueSet value="http://hl7.org/fhir/ValueSet/security-labels" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + </element> + <element id="Observation.meta.tag"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.meta.tag" /> + <short value="Tags applied to this resource" /> + <definition value="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 value="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 value="0" /> + <max value="*" /> + <base> + <path value="Meta.tag" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="Tags" /> + </extension> + <strength value="example" /> + <description value="Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones"." /> + <valueSet value="http://hl7.org/fhir/ValueSet/common-tags" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + </element> + <element id="Observation.implicitRules"> + <path value="Observation.implicitRules" /> + <short value="A set of rules under which this content was created" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.implicitRules" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="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 value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.language"> + <path value="Observation.language" /> + <short value="Language of the resource content" /> + <definition value="The base language in which the resource is written." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.language" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"> + <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="Language" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> + <valueBoolean value="true" /> + </extension> + <strength value="preferred" /> + <description value="A human language." /> + <valueSet value="http://hl7.org/fhir/ValueSet/languages" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.text" /> + <short value="Text summary of the resource, for human interpretation" /> + <definition value="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 value="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 value="narrative" /> + <alias value="html" /> + <alias value="xhtml" /> + <alias value="display" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="DomainResource.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Narrative" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Act.text?" /> + </mapping> + </element> + <element id="Observation.contained"> + <path value="Observation.contained" /> + <short value="Contained, inline Resources" /> + <definition value="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 value="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 value="inline resources" /> + <alias value="anonymous resources" /> + <alias value="contained resources" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.contained" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Resource" /> + </type> + <mapping> + <identity value="rim" /> + <map value="Entity. Role, or Act" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.modifierExtension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Extensions that cannot be ignored" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.identifier"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.identifier" /> + <short value="Business Identifier for observation" /> + <definition value="A unique identifier assigned to this observation." /> + <requirements value="Allows observations to be distinguished and referenced." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.identifier" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Identifier" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="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]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="Identifier" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.identifier" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.identifier" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.21 For OBX segments from systems without OBX-21 support a combination of ORC/OBR and OBX must be negotiated between trading partners to uniquely identify the OBX segment. Depending on how V2 has been implemented each of these may be an option: 1) OBR-3 + OBX-3 + OBX-4 or 2) OBR-3 + OBR-4 + OBX-3 + OBX-4 or 2) some other way to uniquely ID the OBR/ORC + OBX-3 + OBX-4." /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="id" /> + </mapping> + </element> + <element id="Observation.basedOn"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.basedOn" /> + <short value="Fulfills plan, proposal or order" /> + <definition value="A plan, proposal or order that is fulfilled in whole or in part by this event. For example, a MedicationRequest may require a patient to have laboratory test performed before it is dispensed." /> + <comment value="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." /> + <requirements value="Allows tracing of authorization for the event and tracking whether proposals/recommendations were acted upon." /> + <alias value="Fulfills" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.basedOn" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/CarePlan" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/DeviceRequest" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationRequest" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/NutritionOrder" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/ServiceRequest" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.basedOn" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="ORC" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".inboundRelationship[typeCode=COMP].source[moodCode=EVN]" /> + </mapping> + </element> + <element id="Observation.partOf"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.partOf" /> + <short value="Part of referenced event" /> + <definition value="A larger event of which this particular Observation is a component or step. For example, an observation as part of a procedure." /> + <comment value="To link an Observation to an Encounter use `encounter`. See the [Notes](observation.html#obsgrouping) below for guidance on referencing another Observation." /> + <alias value="Container" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.partOf" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationDispense" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationStatement" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Procedure" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImagingStudy" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.partOf" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Varies by domain" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".outboundRelationship[typeCode=FLFS].target" /> + </mapping> + </element> + <element id="Observation.status"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint"> + <valueString value="default: final" /> + </extension> + <path value="Observation.status" /> + <short value="registered | preliminary | final | amended +" /> + <definition value="The status of the result value." /> + <comment value="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." /> + <requirements value="Need to track the status of individual results. Some results are finalized before the whole report is finalized." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Observation.status" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="This element is labeled 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 value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationStatus" /> + </extension> + <strength value="required" /> + <description value="Codes providing the status of an observation." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-status|4.0.1" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.status" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.status" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 445584004 |Report by finality status|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-11" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="status Amended & Final are differentiated by whether it is the subject of a ControlAct event with a type of "revise"" /> + </mapping> + </element> + <element id="Observation.category"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.category" /> + <short value="Classification of type of observation" /> + <definition value="A code that classifies the general type of observation being made." /> + <comment value="In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once. The level of granularity is defined by the category concepts in the value set." /> + <requirements value="Used for filtering what observations are retrieved and displayed." /> + <min value="1" /> + <max value="*" /> + <base> + <path value="Observation.category" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationCategory" /> + </extension> + <strength value="preferred" /> + <description value="Codes for high level observation categories." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-category" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.class" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".outboundRelationship[typeCode="COMP].target[classCode="LIST", moodCode="EVN"].code" /> + </mapping> + </element> + <element id="Observation.category.id"> + <path value="Observation.category.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.category.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.category.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.category.coding"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.category.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Observation.category.coding:observationCategory"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.category.coding" /> + <sliceName value="observationCategory" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="http://terminology.hl7.org/CodeSystem/observation-category" /> + <code value="survey" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Observation.category.coding:observationCategory.id"> + <path value="Observation.category.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.category.coding:observationCategory.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.category.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.category.coding:observationCategory.system"> + <path value="Observation.category.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Observation.category.coding:observationCategory.version"> + <path value="Observation.category.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Observation.category.coding:observationCategory.code"> + <path value="Observation.category.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Observation.category.coding:observationCategory.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Observation.category.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Observation.category.coding:observationCategory.userSelected"> + <path value="Observation.category.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Observation.category.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Observation.category.text" /> + <short value="Plain text representation of the concept" /> + <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="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 value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element id="Observation.code"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.code" /> + <short value="Type of observation (code / type)" /> + <definition value="Describes what was observed. Sometimes this is called the observation "name"." /> + <comment value="*All* code-value and, if present, component.code-component.value pairs need to be taken into account to correctly understand the meaning of the observation." /> + <requirements value="Knowing what kind of observation is being made is essential to understanding the observation." /> + <alias value="Name" /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Observation.code" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationCode" /> + </extension> + <strength value="example" /> + <description value="Codes identifying names of simple observations." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-codes" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.code" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.what[x]" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 363787002 |Observable entity| OR < 386053000 |Evaluation procedure|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="code" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="116680003 |Is a|" /> + </mapping> + </element> + <element id="Observation.code.id"> + <path value="Observation.code.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.code.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.code.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.code.coding"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.code.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Observation.code.coding:trialParticipation"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.code.coding" /> + <sliceName value="trialParticipation" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes" /> + <code value="03" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Observation.code.coding:trialParticipation.id"> + <path value="Observation.code.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.code.coding:trialParticipation.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.code.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.code.coding:trialParticipation.system"> + <path value="Observation.code.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Observation.code.coding:trialParticipation.version"> + <path value="Observation.code.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Observation.code.coding:trialParticipation.code"> + <path value="Observation.code.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Observation.code.coding:trialParticipation.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Observation.code.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Observation.code.coding:trialParticipation.userSelected"> + <path value="Observation.code.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Observation.code.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Observation.code.text" /> + <short value="Plain text representation of the concept" /> + <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="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 value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element id="Observation.subject"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.subject" /> + <short value="Who and/or what the observation is about" /> + <definition value="The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation." /> + <comment value="One would expect this element to be a cardinality of 1..1. The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated." /> + <requirements value="Observations have no value if you don't know who or what they're about." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Observation.subject" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Group" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.subject" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.subject[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="participation[typeCode=RTGT]" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.subject" /> + </mapping> + </element> + <element id="Observation.focus"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="trial-use" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.focus" /> + <short value="What the observation is about, when it is not about the subject of record" /> + <definition value="The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record. The focus of an observation could also be an existing condition, an intervention, the subject's diet, another observation of the subject, or a body structure such as tumor or implanted device. An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus." /> + <comment value="Typically, an observation is made about the subject - a patient, or group of patients, location, or device - and the distinction between the subject and what is directly measured for an observation is specified in the observation code itself ( e.g., "Blood Glucose") and does not need to be represented separately using this element. Use `specimen` if a reference to a specimen is required. If a code is required instead of a resource use either `bodysite` for bodysites or the standard extension [focusCode](extension-observation-focuscode.html)." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.focus" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.subject[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="participation[typeCode=SBJ]" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.subject" /> + </mapping> + </element> + <element id="Observation.encounter"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.encounter" /> + <short value="Healthcare event during which this observation is made" /> + <definition value="The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made." /> + <comment value="This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter (e.g. pre-admission laboratory tests)." /> + <requirements value="For some observations it may be important to know the link between an observation and a particular encounter." /> + <alias value="Context" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.encounter" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.context" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.context" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN]" /> + </mapping> + </element> + <element id="Observation.effective[x]"> + <path value="Observation.effective[x]" /> + <short value="Clinically relevant time/time-period for observation" /> + <definition value="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself." /> + <comment value="At least a date should be present unless this observation is a historical report. For recording imprecise or "fuzzy" times (For example, a blood glucose measurement taken "after breakfast") use the [Timing](datatypes.html#timing) datatype which allow the measurement to be tied to regular life events." /> + <requirements value="Knowing when an observation was deemed true is important to its relevance as well as determining trends." /> + <alias value="Occurrence" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.effective[x]" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <type> + <code value="Period" /> + </type> + <type> + <code value="Timing" /> + </type> + <type> + <code value="instant" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.occurrence[x]" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.done[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-14, and/or OBX-19 after v2.4 (depends on who observation made)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="effectiveTime" /> + </mapping> + </element> + <element id="Observation.issued"> + <path value="Observation.issued" /> + <short value="Date/Time this version was made available" /> + <definition value="The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified." /> + <comment value="For Observations that don’t require review and verification, it may be the same as the [`lastUpdated` ](resource-definitions.html#Meta.lastUpdated) time of the resource itself. For Observations that do require review and verification for certain updates, it might not be the same as the `lastUpdated` time of the resource itself due to a non-clinically significant update that doesn’t require the new version to be reviewed and verified again." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.issued" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="instant" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.recorded" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBR.22 (or MSH.7), or perhaps OBX-19 (depends on who observation made)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="participation[typeCode=AUT].time" /> + </mapping> + </element> + <element id="Observation.performer"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.performer" /> + <short value="Who is responsible for the observation" /> + <definition value="Who was responsible for asserting the observed value as "true"." /> + <comment value="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." /> + <requirements value="May give a degree of confidence in the observation and also indicates where follow-up questions should be directed." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.performer" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/CareTeam" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.performer.actor" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.actor" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.15 / (Practitioner) OBX-16, PRT-5:PRT-4='RO' / (Device) OBX-18 , PRT-10:PRT-4='EQUIP' / (Organization) OBX-23, PRT-8:PRT-4='PO'" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="participation[typeCode=PRF]" /> + </mapping> + </element> + <element id="Observation.value[x]"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.value[x]" /> + <slicing> + <discriminator> + <type value="type" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Actual result" /> + <definition value="The information determined as a result of making the observation, if the information has a simple value." /> + <comment value="An observation may have; 1) a single value here, 2) both a value and a set of related or component values, or 3) only a set of related or component values. If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value. For additional guidance, see the [Notes section](observation.html#notes) below." /> + <requirements value="An observation exists to have a value, though it might not if it is in error, or if it represents a group of observations." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Observation.value[x]" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <condition value="obs-7" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 441742003 |Evaluation finding|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.2, OBX.5, OBX.6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="363714003 |Interprets|" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.value[x]" /> + <sliceName value="valueCodeableConcept" /> + <short value="Actual result" /> + <definition value="The information determined as a result of making the observation, if the information has a simple value." /> + <comment value="An observation may have; 1) a single value here, 2) both a value and a set of related or component values, or 3) only a set of related or component values. If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value. For additional guidance, see the [Notes section](observation.html#notes) below." /> + <requirements value="An observation exists to have a value, though it might not if it is in error, or if it represents a group of observations." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.value[x]" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <condition value="obs-7" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 441742003 |Evaluation finding|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.2, OBX.5, OBX.6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="363714003 |Interprets|" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.id"> + <path value="Observation.value[x].id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.value[x].extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.value[x].coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.value[x].coding" /> + <sliceName value="snomed" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="http://snomed.info/sct" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="Yes | No | Unknown" /> + <valueSet value="https://www.netzwerk-universitaetsmedizin.de/fhir/ValueSet/yes-no-unknown-other-na" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed.id"> + <path value="Observation.value[x].coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.value[x].coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed.system"> + <path value="Observation.value[x].coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed.version"> + <path value="Observation.value[x].coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed.code"> + <path value="Observation.value[x].coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Observation.value[x].coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed.userSelected"> + <path value="Observation.value[x].coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Observation.value[x]:valueCodeableConcept.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Observation.value[x].text" /> + <short value="Plain text representation of the concept" /> + <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="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 value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element id="Observation.dataAbsentReason"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.dataAbsentReason" /> + <short value="Why the result is missing" /> + <definition value="Provides a reason why the expected value in the element Observation.value[x] is missing." /> + <comment value="Null or exceptional values can be represented two ways in FHIR Observations. One way is to simply include them in the value set and represent the exceptions in the value. For example, measurement values for a serology test could be "detected", "not detected", "inconclusive", or "specimen unsatisfactory". The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values. For example, the dataAbsentReason code "error" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0. Because of these options, use-case agreements are required to interpret general observations for null or exceptional values." /> + <requirements value="For many results it is necessary to handle exceptional values in measurements." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.dataAbsentReason" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <condition value="obs-6" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationValueAbsentReason" /> + </extension> + <strength value="extensible" /> + <description value="Codes specifying why the result (`Observation.value[x]`) is missing." /> + <valueSet value="http://hl7.org/fhir/ValueSet/data-absent-reason" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value.nullFlavor" /> + </mapping> + </element> + <element id="Observation.interpretation"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.interpretation" /> + <short value="High, low, normal, etc." /> + <definition value="A categorical assessment of an observation value. For example, high, low, normal." /> + <comment value="Historically used for laboratory results (known as 'abnormal flag' ), its use extends to other use cases where coded interpretations are relevant. Often reported as one or more simple compact codes this element is often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result." /> + <requirements value="For some results, particularly numeric results, an interpretation is necessary to fully understand the significance of a result." /> + <alias value="Abnormal Flag" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.interpretation" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationInterpretation" /> + </extension> + <strength value="extensible" /> + <description value="Codes identifying interpretations of observations." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-interpretation" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 260245000 |Findings values|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-8" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="interpretationCode" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="363713009 |Has interpretation|" /> + </mapping> + </element> + <element id="Observation.note"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.note" /> + <short value="Comments about the observation" /> + <definition value="Comments about the observation or the results." /> + <comment value="May include general statements about the observation, or statements about significant, unexpected or unreliable results values, or information about its source when relevant to its interpretation." /> + <requirements value="Need to be able to provide free text additional information." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.note" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Annotation" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Act" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="NTE.3 (partner NTE to OBX, or sometimes another (child?) OBX)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="subjectOf.observationEvent[code="annotation"].value" /> + </mapping> + </element> + <element id="Observation.bodySite"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.bodySite" /> + <short value="Observed body part" /> + <definition value="Indicates the site on the subject's body where the observation was made (i.e. the target site)." /> + <comment value="Only used if not implicit in code found in Observation.code. In many systems, this may be represented as a related observation instead of an inline component. If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ bodySite](extension-bodysite.html)." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="Observation.bodySite" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="BodySite" /> + </extension> + <strength value="example" /> + <description value="Codes describing anatomical locations. May include laterality." /> + <valueSet value="http://hl7.org/fhir/ValueSet/body-site" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 123037004 |Body structure|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-20" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="targetSiteCode" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="718497002 |Inherent location|" /> + </mapping> + </element> + <element id="Observation.method"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.method" /> + <short value="How it was done" /> + <definition value="Indicates the mechanism used to perform the observation." /> + <comment value="Only used if not implicit in code for Observation.code." /> + <requirements value="In some cases, method can impact results and is thus used for determining whether results can be compared or determining significance of results." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.method" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationMethod" /> + </extension> + <strength value="example" /> + <description value="Methods for simple observations." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-methods" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-17" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="methodCode" /> + </mapping> + </element> + <element id="Observation.specimen"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.specimen" /> + <short value="Specimen used for this observation" /> + <definition value="The specimen that was used when this observation was made." /> + <comment value="Should only be used if not implicit in code found in `Observation.code`. Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report)." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="Observation.specimen" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Specimen" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 123038009 |Specimen|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SPM segment" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="participation[typeCode=SPC].specimen" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="704319004 |Inherent in|" /> + </mapping> + </element> + <element id="Observation.device"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.device" /> + <short value="(Measurement) Device" /> + <definition value="The device used to generate the observation data." /> + <comment value="Note that this is not meant to represent a device involved in the transmission of the result, e.g., a gateway. Such devices may be documented using the Provenance resource where relevant." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.device" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/DeviceMetric" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 49062001 |Device|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-17 / PRT -10" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="participation[typeCode=DEV]" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="424226004 |Using device|" /> + </mapping> + </element> + <element id="Observation.referenceRange"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange" /> + <short value="Provides guide for interpretation" /> + <definition value="Guidance on how to interpret the value by comparison to a normal or recommended range. Multiple reference ranges are interpreted as an "OR". In other words, to represent two distinct target populations, two `referenceRange` elements would be used." /> + <comment value="Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this might not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties." /> + <requirements value="Knowing what values are considered "normal" can help evaluate the significance of a particular result. Need to be able to provide multiple reference ranges for different contexts." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.referenceRange" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="obs-3" /> + <severity value="error" /> + <human value="Must have at least a low or a high or text" /> + <expression value="low.exists() or high.exists() or text.exists()" /> + <xpath value="(exists(f:low) or exists(f:high)or exists(f:text))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="outboundRelationship[typeCode=REFV]/target[classCode=OBS, moodCode=EVN]" /> + </mapping> + </element> + <element id="Observation.referenceRange.id"> + <path value="Observation.referenceRange.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.referenceRange.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.referenceRange.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.referenceRange.low"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange.low" /> + <short value="Low Range, if relevant" /> + <definition value="The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3)." /> + <comment value="The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.referenceRange.low" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Quantity" /> + <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity" /> + </type> + <condition value="ele-1" /> + <condition value="obs-3" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <constraint> + <key value="sqty-1" /> + <severity value="error" /> + <human value="The comparator is not used on a SimpleQuantity" /> + <expression value="comparator.empty()" /> + <xpath value="not(exists(f:comparator))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isModifier value="false" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value:IVL_PQ.low" /> + </mapping> + </element> + <element id="Observation.referenceRange.high"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange.high" /> + <short value="High Range, if relevant" /> + <definition value="The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3)." /> + <comment value="The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.referenceRange.high" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Quantity" /> + <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity" /> + </type> + <condition value="ele-1" /> + <condition value="obs-3" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <constraint> + <key value="sqty-1" /> + <severity value="error" /> + <human value="The comparator is not used on a SimpleQuantity" /> + <expression value="comparator.empty()" /> + <xpath value="not(exists(f:comparator))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isModifier value="false" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value:IVL_PQ.high" /> + </mapping> + </element> + <element id="Observation.referenceRange.type"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange.type" /> + <short value="Reference range qualifier" /> + <definition value="Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range." /> + <comment value="This SHOULD be populated if there is more than one range. If this element is not present then the normal range is assumed." /> + <requirements value="Need to be able to say what kind of reference range this is - normal, recommended, therapeutic, etc., - for proper interpretation." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.referenceRange.type" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationRangeMeaning" /> + </extension> + <strength value="preferred" /> + <description value="Code for the meaning of a reference range." /> + <valueSet value="http://hl7.org/fhir/ValueSet/referencerange-meaning" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 260245000 |Findings values| OR < 365860008 |General clinical state finding| OR < 250171008 |Clinical history or observation findings| OR < 415229000 |Racial group| OR < 365400002 |Finding of puberty stage| OR < 443938003 |Procedure carried out on subject|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-10" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="interpretationCode" /> + </mapping> + </element> + <element id="Observation.referenceRange.appliesTo"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange.appliesTo" /> + <short value="Reference range population" /> + <definition value="Codes to indicate the target population this reference range applies to. For example, a reference range may be based on the normal population or a particular sex or race. Multiple `appliesTo` are interpreted as an "AND" of the target populations. For example, to represent a target population of African American females, both a code of female and a code for African American would be used." /> + <comment value="This SHOULD be populated if there is more than one range. If this element is not present then the normal population is assumed." /> + <requirements value="Need to be able to identify the target population for proper interpretation." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.referenceRange.appliesTo" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationRangeType" /> + </extension> + <strength value="example" /> + <description value="Codes identifying the population the reference range applies to." /> + <valueSet value="http://hl7.org/fhir/ValueSet/referencerange-appliesto" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 260245000 |Findings values| OR < 365860008 |General clinical state finding| OR < 250171008 |Clinical history or observation findings| OR < 415229000 |Racial group| OR < 365400002 |Finding of puberty stage| OR < 443938003 |Procedure carried out on subject|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-10" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="interpretationCode" /> + </mapping> + </element> + <element id="Observation.referenceRange.age"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange.age" /> + <short value="Applicable age range, if relevant" /> + <definition value="The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so." /> + <comment value="The stated low and high value are assumed to have arbitrarily high precision when it comes to determining which values are in the range. I.e. 1.99 is not in the range 2 -> 3." /> + <requirements value="Some analytes vary greatly over age." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.referenceRange.age" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Range" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="rng-2" /> + <severity value="error" /> + <human value="If present, low SHALL have a lower value than high" /> + <expression value="low.empty() or high.empty() or (low <= high)" /> + <xpath value="not(exists(f:low/f:value/@value)) or not(exists(f:high/f:value/@value)) or (number(f:low/f:value/@value) <= number(f:high/f:value/@value))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="NR and also possibly SN (but see also quantity)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<QTY[not(type="TS")]> [lowClosed="true" and highClosed="true"]or URG<QTY[not(type="TS")]>" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="outboundRelationship[typeCode=PRCN].targetObservationCriterion[code="age"].value" /> + </mapping> + </element> + <element id="Observation.referenceRange.text"> + <path value="Observation.referenceRange.text" /> + <short value="Text based reference range in an observation" /> + <definition value="Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of "Negative" or a list or table of "normals"." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.referenceRange.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value:ST" /> + </mapping> + </element> + <element id="Observation.hasMember"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.hasMember" /> + <short value="Related resource that belongs to the Observation group" /> + <definition value="This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group." /> + <comment value="When using this element, an observation will typically have either a value or a set of related resources, although both may be present in some cases. For a discussion on the ways Observations can assembled in groups together, see [Notes](observation.html#obsgrouping) below. Note that a system may calculate results from [QuestionnaireResponse](questionnaireresponse.html) into a final score and represent the score as an Observation." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.hasMember" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/MolecularSequence" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Relationships established by OBX-4 usage" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="outBoundRelationship" /> + </mapping> + </element> + <element id="Observation.derivedFrom"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.derivedFrom" /> + <short value="Related measurements the observation is made from" /> + <definition value="The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image." /> + <comment value="All the reference choices that are listed in this element can represent clinical observations and other measurements that may be the source for a derived value. The most common reference will be another Observation. For a discussion on the ways Observations can assembled in groups together, see [Notes](observation.html#obsgrouping) below." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.derivedFrom" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/DocumentReference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImagingStudy" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Media" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/MolecularSequence" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Relationships established by OBX-4 usage" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".targetObservation" /> + </mapping> + </element> + <element id="Observation.component"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="code" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Component results" /> + <definition value="Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations." /> + <comment value="For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below." /> + <requirements value="Component observations share the same attributes in the Observation resource as the primary observation and are always treated a part of a single observation (they are not separable). However, the reference range for the primary observation value is not inherited by the component values and is required when appropriate for each component observation." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.component" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="containment by OBX-4?" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="outBoundRelationship[typeCode=COMP]" /> + </mapping> + </element> + <element id="Observation.component.id"> + <path value="Observation.component.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.component.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.component.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.component.code"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.code" /> + <short value="Type of component observation (code / type)" /> + <definition value="Describes what was observed. Sometimes this is called the observation "code"." /> + <comment value="*All* code-value and component.code-component.value pairs need to be taken into account to correctly understand the meaning of the observation." /> + <requirements value="Knowing what kind of observation is being made is essential to understanding the observation." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Observation.component.code" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationCode" /> + </extension> + <strength value="example" /> + <description value="Codes identifying names of simple observations." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-codes" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.what[x]" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 363787002 |Observable entity| OR < 386053000 |Evaluation procedure|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="code" /> + </mapping> + </element> + <element id="Observation.component.value[x]"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.value[x]" /> + <short value="Actual component result" /> + <definition value="The information determined as a result of making the observation, if the information has a simple value." /> + <comment value="Used when observation has a set of component observations. An observation may have both a value (e.g. an Apgar score) and component observations (the observations from which the Apgar score was derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value. For additional guidance, see the [Notes section](observation.html#notes) below." /> + <requirements value="An observation exists to have a value, though it might not if it is in error, or if it represents a group of observations." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.component.value[x]" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Quantity" /> + </type> + <type> + <code value="CodeableConcept" /> + </type> + <type> + <code value="string" /> + </type> + <type> + <code value="boolean" /> + </type> + <type> + <code value="integer" /> + </type> + <type> + <code value="Range" /> + </type> + <type> + <code value="Ratio" /> + </type> + <type> + <code value="SampledData" /> + </type> + <type> + <code value="time" /> + </type> + <type> + <code value="dateTime" /> + </type> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="363714003 |Interprets| < 441742003 |Evaluation finding|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.2, OBX.5, OBX.6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="363714003 |Interprets|" /> + </mapping> + </element> + <element id="Observation.component.dataAbsentReason"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.dataAbsentReason" /> + <short value="Why the component result is missing" /> + <definition value="Provides a reason why the expected value in the element Observation.component.value[x] is missing." /> + <comment value=""Null" or exceptional values can be represented two ways in FHIR Observations. One way is to simply include them in the value set and represent the exceptions in the value. For example, measurement values for a serology test could be "detected", "not detected", "inconclusive", or "test not done". The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values. For example, the dataAbsentReason code "error" could be used when the measurement was not completed. Because of these options, use-case agreements are required to interpret general observations for exceptional values." /> + <requirements value="For many results it is necessary to handle exceptional values in measurements." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.component.dataAbsentReason" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <condition value="obs-6" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationValueAbsentReason" /> + </extension> + <strength value="extensible" /> + <description value="Codes specifying why the result (`Observation.value[x]`) is missing." /> + <valueSet value="http://hl7.org/fhir/ValueSet/data-absent-reason" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value.nullFlavor" /> + </mapping> + </element> + <element id="Observation.component.interpretation"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.interpretation" /> + <short value="High, low, normal, etc." /> + <definition value="A categorical assessment of an observation value. For example, high, low, normal." /> + <comment value="Historically used for laboratory results (known as 'abnormal flag' ), its use extends to other use cases where coded interpretations are relevant. Often reported as one or more simple compact codes this element is often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result." /> + <requirements value="For some results, particularly numeric results, an interpretation is necessary to fully understand the significance of a result." /> + <alias value="Abnormal Flag" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.component.interpretation" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationInterpretation" /> + </extension> + <strength value="extensible" /> + <description value="Codes identifying interpretations of observations." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-interpretation" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 260245000 |Findings values|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-8" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="interpretationCode" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="363713009 |Has interpretation|" /> + </mapping> + </element> + <element id="Observation.component.referenceRange"> + <path value="Observation.component.referenceRange" /> + <short value="Provides guide for interpretation of component result" /> + <definition value="Guidance on how to interpret the value by comparison to a normal or recommended range." /> + <comment value="Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this might not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties." /> + <requirements value="Knowing what values are considered "normal" can help evaluate the significance of a particular result. Need to be able to provide multiple reference ranges for different contexts." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.component.referenceRange" /> + <min value="0" /> + <max value="*" /> + </base> + <contentReference value="#Observation.referenceRange" /> + <mapping> + <identity value="v2" /> + <map value="OBX.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="outboundRelationship[typeCode=REFV]/target[classCode=OBS, moodCode=EVN]" /> + </mapping> + </element> + <element id="Observation.component:eudraCT"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component" /> + <sliceName value="eudraCT" /> + <short value="EudraCT number" /> + <definition value="EudraCT (European Union Drug Regulating Authorities Clinical Trials) registration number" /> + <comment value="For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below." /> + <requirements value="Component observations share the same attributes in the Observation resource as the primary observation and are always treated a part of a single observation (they are not separable). However, the reference range for the primary observation value is not inherited by the component values and is required when appropriate for each component observation." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.component" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="containment by OBX-4?" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="outBoundRelationship[typeCode=COMP]" /> + </mapping> + </element> + <element id="Observation.component:eudraCT.id"> + <path value="Observation.component.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.component:eudraCT.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.component:eudraCT.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.component:eudraCT.code"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.code" /> + <short value="Type of component observation (code / type)" /> + <definition value="Describes what was observed. Sometimes this is called the observation "code"." /> + <comment value="*All* code-value and component.code-component.value pairs need to be taken into account to correctly understand the meaning of the observation." /> + <requirements value="Knowing what kind of observation is being made is essential to understanding the observation." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Observation.component.code" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <patternCodeableConcept> + <coding> + <system value="https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes" /> + <code value="04" /> + </coding> + </patternCodeableConcept> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationCode" /> + </extension> + <strength value="example" /> + <description value="Codes identifying names of simple observations." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-codes" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.what[x]" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 363787002 |Observable entity| OR < 386053000 |Evaluation procedure|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="code" /> + </mapping> + </element> + <element id="Observation.component:eudraCT.code.id"> + <path value="Observation.component.code.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.component:eudraCT.code.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.code.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.component:eudraCT.code.coding"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.code.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Observation.component:eudraCT.code.coding:eudraCT"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.code.coding" /> + <sliceName value="eudraCT" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes" /> + <code value="04" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Observation.component:eudraCT.code.coding:eudraCT.id"> + <path value="Observation.component.code.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.component:eudraCT.code.coding:eudraCT.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.code.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.component:eudraCT.code.coding:eudraCT.system"> + <path value="Observation.component.code.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Observation.component:eudraCT.code.coding:eudraCT.version"> + <path value="Observation.component.code.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Observation.component:eudraCT.code.coding:eudraCT.code"> + <path value="Observation.component.code.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Observation.component:eudraCT.code.coding:eudraCT.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Observation.component.code.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Observation.component:eudraCT.code.coding:eudraCT.userSelected"> + <path value="Observation.component.code.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Observation.component:eudraCT.code.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Observation.component.code.text" /> + <short value="Plain text representation of the concept" /> + <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="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 value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element id="Observation.component:eudraCT.value[x]"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.value[x]" /> + <slicing> + <discriminator> + <type value="type" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Actual component result" /> + <definition value="The information determined as a result of making the observation, if the information has a simple value." /> + <comment value="Used when observation has a set of component observations. An observation may have both a value (e.g. an Apgar score) and component observations (the observations from which the Apgar score was derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value. For additional guidance, see the [Notes section](observation.html#notes) below." /> + <requirements value="An observation exists to have a value, though it might not if it is in error, or if it represents a group of observations." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Observation.component.value[x]" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Quantity" /> + </type> + <type> + <code value="CodeableConcept" /> + </type> + <type> + <code value="string" /> + </type> + <type> + <code value="boolean" /> + </type> + <type> + <code value="integer" /> + </type> + <type> + <code value="Range" /> + </type> + <type> + <code value="Ratio" /> + </type> + <type> + <code value="SampledData" /> + </type> + <type> + <code value="time" /> + </type> + <type> + <code value="dateTime" /> + </type> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="363714003 |Interprets| < 441742003 |Evaluation finding|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.2, OBX.5, OBX.6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="363714003 |Interprets|" /> + </mapping> + </element> + <element id="Observation.component:eudraCT.value[x]:valueString"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.value[x]" /> + <sliceName value="valueString" /> + <short value="Actual component result" /> + <definition value="The information determined as a result of making the observation, if the information has a simple value." /> + <comment value="Used when observation has a set of component observations. An observation may have both a value (e.g. an Apgar score) and component observations (the observations from which the Apgar score was derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value. For additional guidance, see the [Notes section](observation.html#notes) below." /> + <requirements value="An observation exists to have a value, though it might not if it is in error, or if it represents a group of observations." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Observation.component.value[x]" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="363714003 |Interprets| < 441742003 |Evaluation finding|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.2, OBX.5, OBX.6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="363714003 |Interprets|" /> + </mapping> + </element> + <element id="Observation.component:eudraCT.dataAbsentReason"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.dataAbsentReason" /> + <short value="Why the component result is missing" /> + <definition value="Provides a reason why the expected value in the element Observation.component.value[x] is missing." /> + <comment value=""Null" or exceptional values can be represented two ways in FHIR Observations. One way is to simply include them in the value set and represent the exceptions in the value. For example, measurement values for a serology test could be "detected", "not detected", "inconclusive", or "test not done". The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values. For example, the dataAbsentReason code "error" could be used when the measurement was not completed. Because of these options, use-case agreements are required to interpret general observations for exceptional values." /> + <requirements value="For many results it is necessary to handle exceptional values in measurements." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.component.dataAbsentReason" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <condition value="obs-6" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationValueAbsentReason" /> + </extension> + <strength value="extensible" /> + <description value="Codes specifying why the result (`Observation.value[x]`) is missing." /> + <valueSet value="http://hl7.org/fhir/ValueSet/data-absent-reason" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value.nullFlavor" /> + </mapping> + </element> + <element id="Observation.component:eudraCT.interpretation"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.interpretation" /> + <short value="High, low, normal, etc." /> + <definition value="A categorical assessment of an observation value. For example, high, low, normal." /> + <comment value="Historically used for laboratory results (known as 'abnormal flag' ), its use extends to other use cases where coded interpretations are relevant. Often reported as one or more simple compact codes this element is often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result." /> + <requirements value="For some results, particularly numeric results, an interpretation is necessary to fully understand the significance of a result." /> + <alias value="Abnormal Flag" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.component.interpretation" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationInterpretation" /> + </extension> + <strength value="extensible" /> + <description value="Codes identifying interpretations of observations." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-interpretation" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 260245000 |Findings values|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-8" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="interpretationCode" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="363713009 |Has interpretation|" /> + </mapping> + </element> + <element id="Observation.component:eudraCT.referenceRange"> + <path value="Observation.component.referenceRange" /> + <short value="Provides guide for interpretation of component result" /> + <definition value="Guidance on how to interpret the value by comparison to a normal or recommended range." /> + <comment value="Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this might not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties." /> + <requirements value="Knowing what values are considered "normal" can help evaluate the significance of a particular result. Need to be able to provide multiple reference ranges for different contexts." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.component.referenceRange" /> + <min value="0" /> + <max value="*" /> + </base> + <contentReference value="#Observation.referenceRange" /> + <mapping> + <identity value="v2" /> + <map value="OBX.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="outboundRelationship[typeCode=REFV]/target[classCode=OBS, moodCode=EVN]" /> + </mapping> + </element> + <element id="Observation.component:nct"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component" /> + <sliceName value="nct" /> + <short value="NCT number" /> + <definition value="A unique identification code given to each clinical study registered on ClinicalTrials.gov." /> + <comment value="For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below." /> + <requirements value="Component observations share the same attributes in the Observation resource as the primary observation and are always treated a part of a single observation (they are not separable). However, the reference range for the primary observation value is not inherited by the component values and is required when appropriate for each component observation." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.component" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="containment by OBX-4?" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="outBoundRelationship[typeCode=COMP]" /> + </mapping> + </element> + <element id="Observation.component:nct.id"> + <path value="Observation.component.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.component:nct.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.component:nct.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.component:nct.code"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.code" /> + <short value="Type of component observation (code / type)" /> + <definition value="Describes what was observed. Sometimes this is called the observation "code"." /> + <comment value="*All* code-value and component.code-component.value pairs need to be taken into account to correctly understand the meaning of the observation." /> + <requirements value="Knowing what kind of observation is being made is essential to understanding the observation." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Observation.component.code" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <patternCodeableConcept> + <coding> + <system value="https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes" /> + <code value="05" /> + </coding> + </patternCodeableConcept> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationCode" /> + </extension> + <strength value="example" /> + <description value="Codes identifying names of simple observations." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-codes" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.what[x]" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 363787002 |Observable entity| OR < 386053000 |Evaluation procedure|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="code" /> + </mapping> + </element> + <element id="Observation.component:nct.code.id"> + <path value="Observation.component.code.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.component:nct.code.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.code.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.component:nct.code.coding"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.code.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Observation.component:nct.code.coding:nctNumber"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.code.coding" /> + <sliceName value="nctNumber" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes" /> + <code value="05" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Observation.component:nct.code.coding:nctNumber.id"> + <path value="Observation.component.code.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.component:nct.code.coding:nctNumber.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.code.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.component:nct.code.coding:nctNumber.system"> + <path value="Observation.component.code.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Observation.component:nct.code.coding:nctNumber.version"> + <path value="Observation.component.code.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Observation.component:nct.code.coding:nctNumber.code"> + <path value="Observation.component.code.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Observation.component:nct.code.coding:nctNumber.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Observation.component.code.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Observation.component:nct.code.coding:nctNumber.userSelected"> + <path value="Observation.component.code.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Observation.component:nct.code.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Observation.component.code.text" /> + <short value="Plain text representation of the concept" /> + <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="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 value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element id="Observation.component:nct.value[x]"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.value[x]" /> + <slicing> + <discriminator> + <type value="type" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Actual component result" /> + <definition value="The information determined as a result of making the observation, if the information has a simple value." /> + <comment value="Used when observation has a set of component observations. An observation may have both a value (e.g. an Apgar score) and component observations (the observations from which the Apgar score was derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value. For additional guidance, see the [Notes section](observation.html#notes) below." /> + <requirements value="An observation exists to have a value, though it might not if it is in error, or if it represents a group of observations." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Observation.component.value[x]" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Quantity" /> + </type> + <type> + <code value="CodeableConcept" /> + </type> + <type> + <code value="string" /> + </type> + <type> + <code value="boolean" /> + </type> + <type> + <code value="integer" /> + </type> + <type> + <code value="Range" /> + </type> + <type> + <code value="Ratio" /> + </type> + <type> + <code value="SampledData" /> + </type> + <type> + <code value="time" /> + </type> + <type> + <code value="dateTime" /> + </type> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="363714003 |Interprets| < 441742003 |Evaluation finding|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.2, OBX.5, OBX.6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="363714003 |Interprets|" /> + </mapping> + </element> + <element id="Observation.component:nct.value[x]:valueString"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.value[x]" /> + <sliceName value="valueString" /> + <short value="Actual component result" /> + <definition value="The information determined as a result of making the observation, if the information has a simple value." /> + <comment value="Used when observation has a set of component observations. An observation may have both a value (e.g. an Apgar score) and component observations (the observations from which the Apgar score was derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value. For additional guidance, see the [Notes section](observation.html#notes) below." /> + <requirements value="An observation exists to have a value, though it might not if it is in error, or if it represents a group of observations." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.component.value[x]" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="363714003 |Interprets| < 441742003 |Evaluation finding|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.2, OBX.5, OBX.6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="363714003 |Interprets|" /> + </mapping> + </element> + <element id="Observation.component:nct.dataAbsentReason"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.dataAbsentReason" /> + <short value="Why the component result is missing" /> + <definition value="Provides a reason why the expected value in the element Observation.component.value[x] is missing." /> + <comment value=""Null" or exceptional values can be represented two ways in FHIR Observations. One way is to simply include them in the value set and represent the exceptions in the value. For example, measurement values for a serology test could be "detected", "not detected", "inconclusive", or "test not done". The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values. For example, the dataAbsentReason code "error" could be used when the measurement was not completed. Because of these options, use-case agreements are required to interpret general observations for exceptional values." /> + <requirements value="For many results it is necessary to handle exceptional values in measurements." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.component.dataAbsentReason" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <condition value="obs-6" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationValueAbsentReason" /> + </extension> + <strength value="extensible" /> + <description value="Codes specifying why the result (`Observation.value[x]`) is missing." /> + <valueSet value="http://hl7.org/fhir/ValueSet/data-absent-reason" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value.nullFlavor" /> + </mapping> + </element> + <element id="Observation.component:nct.interpretation"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.interpretation" /> + <short value="High, low, normal, etc." /> + <definition value="A categorical assessment of an observation value. For example, high, low, normal." /> + <comment value="Historically used for laboratory results (known as 'abnormal flag' ), its use extends to other use cases where coded interpretations are relevant. Often reported as one or more simple compact codes this element is often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result." /> + <requirements value="For some results, particularly numeric results, an interpretation is necessary to fully understand the significance of a result." /> + <alias value="Abnormal Flag" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.component.interpretation" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationInterpretation" /> + </extension> + <strength value="extensible" /> + <description value="Codes identifying interpretations of observations." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-interpretation" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 260245000 |Findings values|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-8" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="interpretationCode" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="363713009 |Has interpretation|" /> + </mapping> + </element> + <element id="Observation.component:nct.referenceRange"> + <path value="Observation.component.referenceRange" /> + <short value="Provides guide for interpretation of component result" /> + <definition value="Guidance on how to interpret the value by comparison to a normal or recommended range." /> + <comment value="Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this might not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties." /> + <requirements value="Knowing what values are considered "normal" can help evaluate the significance of a particular result. Need to be able to provide multiple reference ranges for different contexts." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.component.referenceRange" /> + <min value="0" /> + <max value="*" /> + </base> + <contentReference value="#Observation.referenceRange" /> + <mapping> + <identity value="v2" /> + <map value="OBX.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="outboundRelationship[typeCode=REFV]/target[classCode=OBS, moodCode=EVN]" /> + </mapping> + </element> + </snapshot> + <differential> + <element id="Observation.meta"> + <path value="Observation.meta" /> + <mustSupport value="true" /> + </element> + <element id="Observation.meta.profile"> + <path value="Observation.meta.profile" /> + <mustSupport value="true" /> + </element> + <element id="Observation.category"> + <path value="Observation.category" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Observation.category.coding"> + <path value="Observation.category.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <min value="1" /> + </element> + <element id="Observation.category.coding:observationCategory"> + <path value="Observation.category.coding" /> + <sliceName value="observationCategory" /> + <min value="1" /> + <max value="1" /> + <patternCoding> + <system value="http://terminology.hl7.org/CodeSystem/observation-category" /> + <code value="survey" /> + </patternCoding> + </element> + <element id="Observation.category.coding:observationCategory.system"> + <path value="Observation.category.coding.system" /> + <min value="1" /> + </element> + <element id="Observation.category.coding:observationCategory.code"> + <path value="Observation.category.coding.code" /> + <min value="1" /> + </element> + <element id="Observation.code"> + <path value="Observation.code" /> + <mustSupport value="true" /> + </element> + <element id="Observation.code.coding"> + <path value="Observation.code.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Observation.code.coding:trialParticipation"> + <path value="Observation.code.coding" /> + <sliceName value="trialParticipation" /> + <min value="1" /> + <max value="1" /> + <patternCoding> + <system value="https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes" /> + <code value="03" /> + </patternCoding> + </element> + <element id="Observation.code.coding:trialParticipation.system"> + <path value="Observation.code.coding.system" /> + <min value="1" /> + </element> + <element id="Observation.code.coding:trialParticipation.code"> + <path value="Observation.code.coding.code" /> + <min value="1" /> + </element> + <element id="Observation.subject"> + <path value="Observation.subject" /> + <min value="1" /> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Group" /> + </type> + <mustSupport value="true" /> + </element> + <element id="Observation.effective[x]"> + <path value="Observation.effective[x]" /> + <mustSupport value="true" /> + </element> + <element id="Observation.value[x]"> + <path value="Observation.value[x]" /> + <slicing> + <discriminator> + <type value="type" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <min value="1" /> + <type> + <code value="CodeableConcept" /> + </type> + <mustSupport value="true" /> + </element> + <element id="Observation.value[x]:valueCodeableConcept"> + <path value="Observation.value[x]" /> + <sliceName value="valueCodeableConcept" /> + <type> + <code value="CodeableConcept" /> + </type> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding"> + <path value="Observation.value[x].coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <min value="1" /> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed"> + <path value="Observation.value[x].coding" /> + <sliceName value="snomed" /> + <min value="1" /> + <max value="1" /> + <patternCoding> + <system value="http://snomed.info/sct" /> + </patternCoding> + <binding> + <strength value="required" /> + <description value="Yes | No | Unknown" /> + <valueSet value="https://www.netzwerk-universitaetsmedizin.de/fhir/ValueSet/yes-no-unknown-other-na" /> + </binding> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed.system"> + <path value="Observation.value[x].coding.system" /> + <min value="1" /> + </element> + <element id="Observation.value[x]:valueCodeableConcept.coding:snomed.code"> + <path value="Observation.value[x].coding.code" /> + <min value="1" /> + </element> + <element id="Observation.bodySite"> + <path value="Observation.bodySite" /> + <max value="0" /> + </element> + <element id="Observation.specimen"> + <path value="Observation.specimen" /> + <max value="0" /> + </element> + <element id="Observation.component"> + <path value="Observation.component" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="code" /> + </discriminator> + <rules value="open" /> + </slicing> + <mustSupport value="true" /> + </element> + <element id="Observation.component:eudraCT"> + <path value="Observation.component" /> + <sliceName value="eudraCT" /> + <short value="EudraCT number" /> + <definition value="EudraCT (European Union Drug Regulating Authorities Clinical Trials) registration number" /> + <mustSupport value="true" /> + </element> + <element id="Observation.component:eudraCT.code"> + <path value="Observation.component.code" /> + <patternCodeableConcept> + <coding> + <system value="https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes" /> + <code value="04" /> + </coding> + </patternCodeableConcept> + <mustSupport value="true" /> + </element> + <element id="Observation.component:eudraCT.code.coding"> + <path value="Observation.component.code.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Observation.component:eudraCT.code.coding:eudraCT"> + <path value="Observation.component.code.coding" /> + <sliceName value="eudraCT" /> + <min value="1" /> + <max value="1" /> + <patternCoding> + <system value="https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes" /> + <code value="04" /> + </patternCoding> + </element> + <element id="Observation.component:eudraCT.code.coding:eudraCT.system"> + <path value="Observation.component.code.coding.system" /> + <min value="1" /> + </element> + <element id="Observation.component:eudraCT.code.coding:eudraCT.code"> + <path value="Observation.component.code.coding.code" /> + <min value="1" /> + </element> + <element id="Observation.component:eudraCT.value[x]"> + <path value="Observation.component.value[x]" /> + <slicing> + <discriminator> + <type value="type" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Observation.component:eudraCT.value[x]:valueString"> + <path value="Observation.component.value[x]" /> + <sliceName value="valueString" /> + <min value="1" /> + <type> + <code value="string" /> + </type> + </element> + <element id="Observation.component:nct"> + <path value="Observation.component" /> + <sliceName value="nct" /> + <short value="NCT number" /> + <definition value="A unique identification code given to each clinical study registered on ClinicalTrials.gov." /> + <mustSupport value="true" /> + </element> + <element id="Observation.component:nct.code"> + <path value="Observation.component.code" /> + <patternCodeableConcept> + <coding> + <system value="https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes" /> + <code value="05" /> + </coding> + </patternCodeableConcept> + <mustSupport value="true" /> + </element> + <element id="Observation.component:nct.code.coding"> + <path value="Observation.component.code.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Observation.component:nct.code.coding:nctNumber"> + <path value="Observation.component.code.coding" /> + <sliceName value="nctNumber" /> + <min value="1" /> + <max value="1" /> + <patternCoding> + <system value="https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes" /> + <code value="05" /> + </patternCoding> + </element> + <element id="Observation.component:nct.code.coding:nctNumber.system"> + <path value="Observation.component.code.coding.system" /> + <min value="1" /> + </element> + <element id="Observation.component:nct.code.coding:nctNumber.code"> + <path value="Observation.component.code.coding.code" /> + <min value="1" /> + </element> + <element id="Observation.component:nct.value[x]"> + <path value="Observation.component.value[x]" /> + <slicing> + <discriminator> + <type value="type" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <min value="1" /> + </element> + <element id="Observation.component:nct.value[x]:valueString"> + <path value="Observation.component.value[x]" /> + <sliceName value="valueString" /> + <type> + <code value="string" /> + </type> + </element> + </differential> +</StructureDefinition> \ No newline at end of file diff --git a/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-no.json b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-no.json new file mode 100644 index 000000000..5faac7352 --- /dev/null +++ b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-no.json @@ -0,0 +1,64 @@ +{ + "resourceType": "Observation", + "id": "9cd9ca09-3b1f-41eb-bd07-c8c78c236ab6", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/interventional-clinical-trial-participation" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "OBI" + } + ] + }, + "system": "https://www.charite.de/fhir/CodeSystem/observation-identifiers", + "value": "ecrf_03_InterventionalClinicalTrialsParticipation", + "assigner": { + "reference": "Organization/Charité" + } + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "survey" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes", + "code": "03", + "display": "Participation in interventional clinical trials" + } + ], + "text": "Has the patient participated in one or more interventional clinical trials?" + }, + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-10-16T08:49:21+02:00", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "373067005", + "display": "No (qualifier value)" + } + ], + "text": "Patient is not enrolled in other studies" + } +} \ No newline at end of file diff --git a/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-notapplicable.json b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-notapplicable.json new file mode 100644 index 000000000..dff995560 --- /dev/null +++ b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-notapplicable.json @@ -0,0 +1,64 @@ +{ + "resourceType": "Observation", + "id": "7c183344-72a2-48f3-97aa-18f871ca32f5", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/interventional-clinical-trial-participation" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "OBI" + } + ] + }, + "system": "https://www.charite.de/fhir/CodeSystem/observation-identifiers", + "value": "ecrf_03_InterventionalClinicalTrialsParticipation", + "assigner": { + "reference": "Organization/Charité" + } + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "survey" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes", + "code": "03", + "display": "Participation in interventional clinical trials" + } + ], + "text": "Has the patient participated in one or more interventional clinical trials?" + }, + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-10-16T08:49:21+02:00", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "385432009", + "display": "Not applicable (qualifier value)" + } + ], + "text": "Not applicable" + } +} \ No newline at end of file diff --git a/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-unknown.json b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-unknown.json new file mode 100644 index 000000000..d50c1ce63 --- /dev/null +++ b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-unknown.json @@ -0,0 +1,64 @@ +{ + "resourceType": "Observation", + "id": "d15919ca-5407-4a10-857b-88d123d8e609", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/interventional-clinical-trial-participation" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "OBI" + } + ] + }, + "system": "https://www.charite.de/fhir/CodeSystem/observation-identifiers", + "value": "ecrf_03_InterventionalClinicalTrialsParticipation", + "assigner": { + "reference": "Organization/Charité" + } + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "survey" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes", + "code": "03", + "display": "Participation in interventional clinical trials" + } + ], + "text": "Has the patient participated in one or more interventional clinical trials?" + }, + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-10-16T08:49:21+02:00", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "261665006", + "display": "Unknown (qualifier value)" + } + ], + "text": "Unknown if patient is enrolled in other studies" + } +} \ No newline at end of file diff --git a/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-eudract-nct.json b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-eudract-nct.json new file mode 100644 index 000000000..308f16003 --- /dev/null +++ b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-eudract-nct.json @@ -0,0 +1,92 @@ +{ + "resourceType": "Observation", + "id": "571c047d-3689-4fb7-9292-c1d71faecf72", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/interventional-clinical-trial-participation" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "OBI" + } + ] + }, + "system": "https://www.charite.de/fhir/CodeSystem/observation-identifiers", + "value": "ecrf_03_InterventionalClinicalTrialsParticipation", + "assigner": { + "reference": "Organization/Charité" + } + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "survey" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes", + "code": "03", + "display": "Participation in interventional clinical trials" + } + ], + "text": "Has the patient participated in one or more interventional clinical trials?" + }, + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-10-16T08:49:21+02:00", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "373066001", + "display": "Yes (qualifier value)" + } + ], + "text": "Patient is enrolled in other studies" + }, + "component": [ + { + "code": { + "coding": [ + { + "system": "https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes", + "code": "04", + "display": "EudraCT Number" + } + ], + "text": "EudraCT (European Union Drug Regulating Authorities Clinical Trials) registration number" + }, + "valueString": "2020-042169-13" + }, + { + "code": { + "coding": [ + { + "system": "https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes", + "code": "05", + "display": "NCT number" + } + ], + "text": "A unique identification code given to each clinical study registered on ClinicalTrials.gov" + }, + "valueString": "NCT00001016" + } + ] +} \ No newline at end of file diff --git a/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-eudract.json b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-eudract.json new file mode 100644 index 000000000..4a8a90d6b --- /dev/null +++ b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-eudract.json @@ -0,0 +1,79 @@ +{ + "resourceType": "Observation", + "id": "ee7afc8a-77fd-4394-a475-6171865f7119", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/interventional-clinical-trial-participation" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "OBI" + } + ] + }, + "system": "https://www.charite.de/fhir/CodeSystem/observation-identifiers", + "value": "ecrf_03_InterventionalClinicalTrialsParticipation", + "assigner": { + "reference": "Organization/Charité" + } + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "survey" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes", + "code": "03", + "display": "Participation in interventional clinical trials" + } + ], + "text": "Has the patient participated in one or more interventional clinical trials?" + }, + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-10-16T08:49:21+02:00", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "373066001", + "display": "Yes (qualifier value)" + } + ], + "text": "Patient is enrolled in other studies" + }, + "component": [ + { + "code": { + "coding": [ + { + "system": "https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes", + "code": "04", + "display": "EudraCT Number" + } + ], + "text": "EudraCT (European Union Drug Regulating Authorities Clinical Trials) registration number" + }, + "valueString": "2020-042169-13" + } + ] +} \ No newline at end of file diff --git a/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-nct.json b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-nct.json new file mode 100644 index 000000000..aac73da2d --- /dev/null +++ b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-nct.json @@ -0,0 +1,79 @@ +{ + "resourceType": "Observation", + "id": "ff5b2de8-cd99-49e3-b667-42c22248a1f4", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/interventional-clinical-trial-participation" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "OBI" + } + ] + }, + "system": "https://www.charite.de/fhir/CodeSystem/observation-identifiers", + "value": "ecrf_03_InterventionalClinicalTrialsParticipation", + "assigner": { + "reference": "Organization/Charité" + } + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "survey" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes", + "code": "03", + "display": "Participation in interventional clinical trials" + } + ], + "text": "Has the patient participated in one or more interventional clinical trials?" + }, + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-10-16T08:49:21+02:00", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "373066001", + "display": "Yes (qualifier value)" + } + ], + "text": "Patient is enrolled in other studies" + }, + "component": [ + { + "code": { + "coding": [ + { + "system": "https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes", + "code": "05", + "display": "NCT number" + } + ], + "text": "A unique identification code given to each clinical study registered on ClinicalTrials.gov" + }, + "valueString": "NCT00001016" + } + ] +} \ No newline at end of file From 400a732632a1bccdfd883472ddd893c62991acb5 Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Tue, 4 May 2021 16:50:06 +0200 Subject: [PATCH 047/141] tests edited --- .attach_pid15295 | 0 .attach_pid15520 | 0 .../ImpfstatusComposition.java | 5 ++- .../definition/ImpfstoffDefiningCode.java | 8 ++-- .../definition/ImpfungAction.java | 2 +- .../definition/ImpfungGegenDefiningCode.java | 15 +++---- .../ImpfungImpfungGegenElement.java | 2 +- .../UnbekannterImpfstatusEvaluation.java | 2 +- .../definition/VerabreichteDosenCluster.java | 2 +- src/main/resources/opt/Impfstatus.opt | 10 ++--- .../immunization/HistoryOfVaccinationIT.java | 41 ++++++++++++++++--- 11 files changed, 59 insertions(+), 28 deletions(-) create mode 100644 .attach_pid15295 create mode 100644 .attach_pid15520 diff --git a/.attach_pid15295 b/.attach_pid15295 new file mode 100644 index 000000000..e69de29bb diff --git a/.attach_pid15520 b/.attach_pid15520 new file mode 100644 index 000000000..e69de29bb diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java index 1015a2384..3a8aaac42 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java @@ -20,6 +20,7 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; +import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.ImpfungAction; import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.UnbekannterImpfstatusEvaluation; @@ -27,11 +28,11 @@ @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T14:02:53.881839+02:00", + date = "2021-05-04T16:32:17.077142+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @Template("Impfstatus") -public class ImpfstatusComposition implements CompositionEntity { +public class ImpfstatusComposition implements CompositionEntity, Composition { /** * Path: Impfstatus/category */ diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfstoffDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfstoffDefiningCode.java index f16c130ad..4fadc7f67 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfstoffDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfstoffDefiningCode.java @@ -502,6 +502,10 @@ public enum ImpfstoffDefiningCode implements EnumValueSet { this.code = code; } + public String getValue() { + return this.value ; + } + public static Map<String, ImpfstoffDefiningCode> getCodesAsMap(){ Map<String, ImpfstoffDefiningCode> impfstoffDefiningCodeHashMap = new HashMap<>(); for (ImpfstoffDefiningCode impfstoffDefiningCode : ImpfstoffDefiningCode.values()) { @@ -510,10 +514,6 @@ public static Map<String, ImpfstoffDefiningCode> getCodesAsMap(){ return impfstoffDefiningCodeHashMap; } - public String getValue() { - return this.value ; - } - public String getDescription() { return this.description ; } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungAction.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungAction.java index bf1454c29..b614f275a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungAction.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungAction.java @@ -18,7 +18,7 @@ @Archetype("openEHR-EHR-ACTION.medication.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T14:02:53.930005+02:00", + date = "2021-05-04T16:32:17.107654+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class ImpfungAction implements EntryEntity { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungGegenDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungGegenDefiningCode.java index 01c7af19c..3ecf0d664 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungGegenDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungGegenDefiningCode.java @@ -94,6 +94,14 @@ public enum ImpfungGegenDefiningCode implements EnumValueSet { this.code = code; } + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + public static Map<String, ImpfungGegenDefiningCode> getCodesAsMap(){ Map<String, ImpfungGegenDefiningCode> impfungGegenDefiningCodeHashMap = new HashMap<>(); for (ImpfungGegenDefiningCode impfungGegenDefiningCode : ImpfungGegenDefiningCode.values()) { @@ -102,13 +110,6 @@ public static Map<String, ImpfungGegenDefiningCode> getCodesAsMap(){ return impfungGegenDefiningCodeHashMap; } - public String getValue() { - return this.value ; - } - - public String getDescription() { - return this.description ; - } public String getTerminologyId() { return this.terminologyId ; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungImpfungGegenElement.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungImpfungGegenElement.java index 3784e0369..8ab94101e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungImpfungGegenElement.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungImpfungGegenElement.java @@ -10,7 +10,7 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T14:02:53.969060+02:00", + date = "2021-05-04T16:32:17.155064+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class ImpfungImpfungGegenElement implements LocatableEntity { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluation.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluation.java index 0c898cf6b..104e9a269 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluation.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluation.java @@ -16,7 +16,7 @@ @Archetype("openEHR-EHR-EVALUATION.absence.v2") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T14:02:53.980889+02:00", + date = "2021-05-04T16:32:17.170805+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class UnbekannterImpfstatusEvaluation implements EntryEntity { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenCluster.java index a3a77e122..209ac01ff 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenCluster.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenCluster.java @@ -17,7 +17,7 @@ @Archetype("openEHR-EHR-CLUSTER.dosage.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T14:02:53.963468+02:00", + date = "2021-05-04T16:32:17.149315+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class VerabreichteDosenCluster implements LocatableEntity { diff --git a/src/main/resources/opt/Impfstatus.opt b/src/main/resources/opt/Impfstatus.opt index 640e977c7..2609c555a 100644 --- a/src/main/resources/opt/Impfstatus.opt +++ b/src/main/resources/opt/Impfstatus.opt @@ -25,10 +25,10 @@ <other_details id="Sign off"/> <other_details id="Speciality"/> <other_details id="User roles"/> - <other_details id="MD5-CAM-1.0.1">fc002bbb4956b50235b9740dd4ef29c6</other_details> + <other_details id="MD5-CAM-1.0.1">8c7a42798bb1bad99ec062b723c014ca</other_details> <other_details id="PARENT:MD5-CAM-1.0.1">8BD8D5F850A9DEE8A16075105D36FD32</other_details> <other_details id="original_language">ISO_639-1::de</other_details> - <other_details id="sem_ver">1.0.0</other_details> + <other_details id="sem_ver">3.0.0</other_details> <other_details id="build_uid"/> <other_details id="original_language">ISO_639-1::de</other_details> <details> @@ -279,7 +279,7 @@ <lower_included>true</lower_included> <lower_unbounded>false</lower_unbounded> <upper_unbounded>true</upper_unbounded> - <lower>0</lower> + <lower>1</lower> </occurrences> <node_id>at0000</node_id> <attributes xsi:type="C_SINGLE_ATTRIBUTE"> @@ -975,7 +975,7 @@ <upper_included>true</upper_included> <lower_unbounded>false</lower_unbounded> <upper_unbounded>false</upper_unbounded> - <lower>0</lower> + <lower>1</lower> <upper>1</upper> </occurrences> <node_id>at0020</node_id> @@ -1356,7 +1356,7 @@ <upper_included>true</upper_included> <lower_unbounded>false</lower_unbounded> <upper_unbounded>false</upper_unbounded> - <lower>1</lower> + <lower>0</lower> <upper>1</upper> </occurrences> <node_id>at0000</node_id> diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/immunization/HistoryOfVaccinationIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/immunization/HistoryOfVaccinationIT.java index 00ca01c84..9eb37b17a 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/immunization/HistoryOfVaccinationIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/immunization/HistoryOfVaccinationIT.java @@ -1,10 +1,27 @@ package org.ehrbase.fhirbridge.fhir.immunization; +import org.ehrbase.fhirbridge.comparators.CustomTemporalAcessorComparator; +import org.ehrbase.fhirbridge.ehr.converter.ConversionException; +import org.ehrbase.fhirbridge.ehr.converter.specific.impfstatus.ImpfstatusCompositionConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.radiologischerBefund.RadiologischerBefundCompositionConverter; +import org.ehrbase.fhirbridge.ehr.opt.geccoradiologischerbefundcomposition.GECCORadiologischerBefundComposition; +import org.ehrbase.fhirbridge.ehr.opt.geccoradiologischerbefundcomposition.definition.BildgebendesUntersuchungsergebnisObservation; +import org.ehrbase.fhirbridge.ehr.opt.geccoradiologischerbefundcomposition.definition.RadiologischerBefundKategorieElement; +import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.ImpfstatusComposition; import org.ehrbase.fhirbridge.fhir.AbstractMappingTestSetupIT; +import org.hl7.fhir.r4.model.DiagnosticReport; import org.hl7.fhir.r4.model.Immunization; import org.javers.core.Javers; +import org.javers.core.JaversBuilder; +import org.javers.core.diff.Diff; +import org.javers.core.metamodel.clazz.ValueObjectDefinition; import java.io.IOException; +import java.time.temporal.TemporalAccessor; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; /** * Integration tests for {@link Immunization} using History of Vaccination profile. @@ -14,18 +31,30 @@ public HistoryOfVaccinationIT(String directory, Class clazz) { super("Immunization/", Immunization.class); } - @Override - public Javers getJavers() { - return null; - } @Override - public Exception executeMappingException(String resource) throws IOException { - return null; + public Exception executeMappingException(String path) throws IOException { + Immunization immunization = (Immunization) testFileLoader.loadResource(path); + return assertThrows(ConversionException.class, () -> { + new ImpfstatusCompositionConverter().convert(immunization); + }); } @Override public void testMapping(String resourcePath, String paragonPath) throws IOException { + Immunization immunization = (Immunization) super.testFileLoader.loadResource(resourcePath); + ImpfstatusCompositionConverter impfstatusCompositionConverter = new ImpfstatusCompositionConverter(); + ImpfstatusComposition mappedImpfstatusComposition = impfstatusCompositionConverter.convert(immunization); + Diff diff = compareCompositions(getJavers(), paragonPath, mappedImpfstatusComposition); + assertEquals(diff.getChanges().size(), 0); + } + @Override + public Javers getJavers() { + return JaversBuilder.javers() + .registerValue(TemporalAccessor.class, new CustomTemporalAcessorComparator()) + .registerValueObject(new ValueObjectDefinition(ImpfstatusComposition.class, List.of("location", "feederAudit"))) + .build(); } + } From e919b397eed4d51db29e412599307fed51792e23 Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Tue, 4 May 2021 16:56:35 +0200 Subject: [PATCH 048/141] generated codes --- ...TrialParticipationEvaluationConverter.java | 5 +- .../GECCOStudienteilnahmeComposition.java | 7 +- ...ischenStudienTeilgenommenDefiningCode.java | 48 + .../GeccoStudienteilnahmeEvaluation.java | 19 +- ...StudienteilnahmeEvaluationContainment.java | 3 +- ...GeccoStudienteilnahmeKategorieElement.java | 2 +- .../definition/RegisternameDefiningCode.java | 41 + .../definition/StudiePruefungCluster.java | 20 +- .../StudiePruefungClusterContainment.java | 3 +- .../StudiePruefungRegistrierungCluster.java | 15 +- .../definition/StudienteilnahmeCluster.java | 20 +- .../StudienteilnahmeClusterContainment.java | 3 +- .../TitelDerStudiePruefungDefiningCode.java | 40 + .../resources/opt/GECCO_Studienteilnahme.opt | 2435 +++++++++-------- 14 files changed, 1399 insertions(+), 1262 deletions(-) create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/RegisternameDefiningCode.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/TitelDerStudiePruefungDefiningCode.java diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java index cde228ecd..23774ae09 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java @@ -1,2 +1,5 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.clinicaltrialparticipation;public class ClinicalTrialParticipationEvaluationConverter { +package org.ehrbase.fhirbridge.ehr.converter.specific.clinicaltrialparticipation; + +public class ClinicalTrialParticipationEvaluationConverter { + } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeComposition.java index 73cfb78a4..2928d71ed 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeComposition.java @@ -21,6 +21,7 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; +import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.GeccoStudienteilnahmeEvaluation; import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.GeccoStudienteilnahmeKategorieElement; import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.StatusDefiningCode; @@ -29,11 +30,11 @@ @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T11:17:24.205349500+02:00", + date = "2021-05-04T16:51:43.036290+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @Template("GECCO_Studienteilnahme") -public class GECCOStudienteilnahmeComposition implements CompositionEntity { +public class GECCOStudienteilnahmeComposition implements CompositionEntity, Composition { /** * Path: GECCO_Studienteilnahme/category */ @@ -42,7 +43,7 @@ public class GECCOStudienteilnahmeComposition implements CompositionEntity { /** * Path: GECCO_Studienteilnahme/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. + * Description: Ergänzende Angaben zum Registereintrag. */ @Path("/context/other_context[at0001]/items[at0002]") private List<Cluster> erweiterung; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.java new file mode 100644 index 000000000..fffdb8f7e --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.java @@ -0,0 +1,48 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition; + +import java.lang.String; +import org.ehrbase.client.classgenerator.EnumValueSet; + +public enum BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode implements EnumValueSet { + OTHER_QUALIFIER_VALUE("Other (qualifier value)", "", "SNOMED Clinical Terms", "74964007"), + + NO_QUALIFIER_VALUE("No (qualifier value)", "", "SNOMED Clinical Terms", "373067005"), + + UNKNOWN_QUALIFIER_VALUE("Unknown (qualifier value)", "", "SNOMED Clinical Terms", "261665006"), + + YES_QUALIFIER_VALUE("Yes (qualifier value)", "", "SNOMED Clinical Terms", "373066001"), + + NOT_APPLICABLE_QUALIFIER_VALUE("Not applicable (qualifier value)", "", "SNOMED Clinical Terms", "385432009"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode(String value, + String description, String terminologyId, String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeEvaluation.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeEvaluation.java index 53b24c35b..73596c07e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeEvaluation.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeEvaluation.java @@ -1,7 +1,6 @@ package org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition; import com.nedap.archie.rm.archetyped.FeederAudit; -import com.nedap.archie.rm.datavalues.DvCodedText; import com.nedap.archie.rm.generic.PartyProxy; import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; @@ -15,15 +14,16 @@ @Archetype("openEHR-EHR-EVALUATION.gecco_study_participation.v0") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T11:17:24.266245900+02:00", + date = "2021-05-04T16:51:43.100661+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class GeccoStudienteilnahmeEvaluation implements EntryEntity { /** * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Bereits an interventionellen klinischen Studien teilgenommen? + * Description: * */ - @Path("/data[at0001]/items[at0002]/value") - private DvCodedText bereitsAnInterventionellenKlinischenStudienTeilgenommen; + @Path("/data[at0001]/items[at0002]/value|defining_code") + private BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode bereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode; /** * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Item tree/Bereits an interventionellen klinischen Studien teilgenommen?/null_flavour @@ -56,13 +56,14 @@ public class GeccoStudienteilnahmeEvaluation implements EntryEntity { @Path("/feeder_audit") private FeederAudit feederAudit; - public void setBereitsAnInterventionellenKlinischenStudienTeilgenommen( - DvCodedText bereitsAnInterventionellenKlinischenStudienTeilgenommen) { - this.bereitsAnInterventionellenKlinischenStudienTeilgenommen = bereitsAnInterventionellenKlinischenStudienTeilgenommen; + public void setBereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode( + BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode bereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode) { + this.bereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode = bereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode; } - public DvCodedText getBereitsAnInterventionellenKlinischenStudienTeilgenommen() { - return this.bereitsAnInterventionellenKlinischenStudienTeilgenommen ; + public BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode getBereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode( + ) { + return this.bereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode ; } public void setBereitsAnInterventionellenKlinischenStudienTeilgenommenNullFlavourDefiningCode( diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeEvaluationContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeEvaluationContainment.java index b89eb420f..e1f7cfa2e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeEvaluationContainment.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeEvaluationContainment.java @@ -1,7 +1,6 @@ package org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition; import com.nedap.archie.rm.archetyped.FeederAudit; -import com.nedap.archie.rm.datavalues.DvCodedText; import com.nedap.archie.rm.generic.PartyProxy; import org.ehrbase.client.aql.containment.Containment; import org.ehrbase.client.aql.field.AqlFieldImp; @@ -12,7 +11,7 @@ public class GeccoStudienteilnahmeEvaluationContainment extends Containment { public SelectAqlField<GeccoStudienteilnahmeEvaluation> GECCO_STUDIENTEILNAHME_EVALUATION = new AqlFieldImp<GeccoStudienteilnahmeEvaluation>(GeccoStudienteilnahmeEvaluation.class, "", "GeccoStudienteilnahmeEvaluation", GeccoStudienteilnahmeEvaluation.class, this); - public SelectAqlField<DvCodedText> BEREITS_AN_INTERVENTIONELLEN_KLINISCHEN_STUDIEN_TEILGENOMMEN = new AqlFieldImp<DvCodedText>(GeccoStudienteilnahmeEvaluation.class, "/data[at0001]/items[at0002]/value", "bereitsAnInterventionellenKlinischenStudienTeilgenommen", DvCodedText.class, this); + public SelectAqlField<BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode> BEREITS_AN_INTERVENTIONELLEN_KLINISCHEN_STUDIEN_TEILGENOMMEN_DEFINING_CODE = new AqlFieldImp<BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode>(GeccoStudienteilnahmeEvaluation.class, "/data[at0001]/items[at0002]/value|defining_code", "bereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode", BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.class, this); public SelectAqlField<NullFlavour> BEREITS_AN_INTERVENTIONELLEN_KLINISCHEN_STUDIEN_TEILGENOMMEN_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(GeccoStudienteilnahmeEvaluation.class, "/data[at0001]/items[at0002]/null_flavour|defining_code", "bereitsAnInterventionellenKlinischenStudienTeilgenommenNullFlavourDefiningCode", NullFlavour.class, this); diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeKategorieElement.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeKategorieElement.java index 1df5a71cf..f0ffdc668 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeKategorieElement.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeKategorieElement.java @@ -11,7 +11,7 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T11:17:24.242245500+02:00", + date = "2021-05-04T16:51:43.075078+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class GeccoStudienteilnahmeKategorieElement implements LocatableEntity { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/RegisternameDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/RegisternameDefiningCode.java new file mode 100644 index 000000000..65734de86 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/RegisternameDefiningCode.java @@ -0,0 +1,41 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition; + +import java.lang.String; +import org.ehrbase.client.classgenerator.EnumValueSet; + +public enum RegisternameDefiningCode implements EnumValueSet { + NCT_NUMBER("NCT number", "", "eCRF", "05"), + + EUDRACT_NUMBER("EudraCT Number‎", "", "eCRF", "04"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + RegisternameDefiningCode(String value, String description, String terminologyId, String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungCluster.java index 663fb266b..681169de7 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungCluster.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungCluster.java @@ -2,7 +2,6 @@ import com.nedap.archie.rm.archetyped.FeederAudit; import com.nedap.archie.rm.datastructures.Cluster; -import com.nedap.archie.rm.datavalues.DvCodedText; import java.lang.String; import java.util.List; import javax.annotation.processing.Generated; @@ -16,7 +15,7 @@ @Archetype("openEHR-EHR-CLUSTER.study_details.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T11:17:24.280244800+02:00", + date = "2021-05-04T16:51:43.112959+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class StudiePruefungCluster implements LocatableEntity { @@ -25,8 +24,8 @@ public class StudiePruefungCluster implements LocatableEntity { * Description: Titel des Forschungsvorhabens. * Comment: Zum Beispiel: "Eine randomisierte Phase-II-Studie mit nal-Iri plus 5-Fluorouracil im Vergleich zu 5-Fluorouracil bei stationären Patienten mit Cholangio- und Gallenblasenkarzinom, die zuvor mit Gemcitabin oder Gemcitabin-haltigen Therapien behandelt wurden." */ - @Path("/items[at0001]/value") - private DvCodedText titelDerStudiePruefung; + @Path("/items[at0001]/value|defining_code") + private TitelDerStudiePruefungDefiningCode titelDerStudiePruefungDefiningCode; /** * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Item tree/Studienteilnahme/Studie/Prüfung/Titel der Studie/Prüfung/null_flavour @@ -52,7 +51,7 @@ public class StudiePruefungCluster implements LocatableEntity { * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Studienteilnahme/Studie/Prüfung/Registrierung * Description: Registrierung der Studie in Registern. * Comment: Wenn die Studie auf der Webseite Clinicaltrials.gov registriert ist, besitzt sie eine US NCT-Nummer. Zum Beispiel: NCT03772405. - * Eine EudraCT Nummer wird von der Europäischen Arzneimittelagentur vergeben. Wenn die klinische Prüfung auf der Webseite Current Controlled Trials registriert ist, besitzt sie eine ISRCTN-Nummer (International Standard Randomised Controlled Trial Number). + * Eine EudraCT Nummer wird von der Europäischen Arzneimittelagentur vergeben. Wenn die klinische Prüfung auf der Webseite Current Controlled Trials registriert ist, besitzt sie eine ISRCTN-Nummer (International Standard Randomised Controlled Trial Number). */ @Path("/items[at0033]") private List<StudiePruefungRegistrierungCluster> registrierung; @@ -60,7 +59,7 @@ public class StudiePruefungCluster implements LocatableEntity { /** * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Studienteilnahme/Studie/Prüfung/Studienzentrum * Description: Detailangaben über die teilnehmende medizinische Einrichtung wie Klinik oder Praxis, die Patienten gemäß den Studienvorgaben rekrutiert und die Daten erhebt. - * Comment: Zum Beispiel: Name der Einrichtung, Adresse, Name des Prüfers, Kontaktdetails, zuständige Ethikkommission, Datum der Genehmigung der Teilnahme, beteiligte Personen und weitere Details. Hier können auch demographische Archetypen eingefügt werden. + * Comment: Zum Beispiel: Name der Einrichtung, Adresse, Name des Prüfers, Kontaktdetails, zuständige Ethikkommission, Datum der Genehmigung der Teilnahme, beteiligte Personen und weitere Details. Hier können auch demographische Archetypen eingefügt werden. */ @Path("/items[at0023]") private List<Cluster> studienzentrum; @@ -79,12 +78,13 @@ public class StudiePruefungCluster implements LocatableEntity { @Path("/feeder_audit") private FeederAudit feederAudit; - public void setTitelDerStudiePruefung(DvCodedText titelDerStudiePruefung) { - this.titelDerStudiePruefung = titelDerStudiePruefung; + public void setTitelDerStudiePruefungDefiningCode( + TitelDerStudiePruefungDefiningCode titelDerStudiePruefungDefiningCode) { + this.titelDerStudiePruefungDefiningCode = titelDerStudiePruefungDefiningCode; } - public DvCodedText getTitelDerStudiePruefung() { - return this.titelDerStudiePruefung ; + public TitelDerStudiePruefungDefiningCode getTitelDerStudiePruefungDefiningCode() { + return this.titelDerStudiePruefungDefiningCode ; } public void setTitelDerStudiePruefungNullFlavourDefiningCode( diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungClusterContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungClusterContainment.java index 62182ad0a..7d7e05f4d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungClusterContainment.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungClusterContainment.java @@ -2,7 +2,6 @@ import com.nedap.archie.rm.archetyped.FeederAudit; import com.nedap.archie.rm.datastructures.Cluster; -import com.nedap.archie.rm.datavalues.DvCodedText; import java.lang.String; import org.ehrbase.client.aql.containment.Containment; import org.ehrbase.client.aql.field.AqlFieldImp; @@ -14,7 +13,7 @@ public class StudiePruefungClusterContainment extends Containment { public SelectAqlField<StudiePruefungCluster> STUDIE_PRUEFUNG_CLUSTER = new AqlFieldImp<StudiePruefungCluster>(StudiePruefungCluster.class, "", "StudiePruefungCluster", StudiePruefungCluster.class, this); - public SelectAqlField<DvCodedText> TITEL_DER_STUDIE_PRUEFUNG = new AqlFieldImp<DvCodedText>(StudiePruefungCluster.class, "/items[at0001]/value", "titelDerStudiePruefung", DvCodedText.class, this); + public SelectAqlField<TitelDerStudiePruefungDefiningCode> TITEL_DER_STUDIE_PRUEFUNG_DEFINING_CODE = new AqlFieldImp<TitelDerStudiePruefungDefiningCode>(StudiePruefungCluster.class, "/items[at0001]/value|defining_code", "titelDerStudiePruefungDefiningCode", TitelDerStudiePruefungDefiningCode.class, this); public SelectAqlField<NullFlavour> TITEL_DER_STUDIE_PRUEFUNG_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(StudiePruefungCluster.class, "/items[at0001]/null_flavour|defining_code", "titelDerStudiePruefungNullFlavourDefiningCode", NullFlavour.class, this); diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungRegistrierungCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungRegistrierungCluster.java index 2b111f8a8..c98f2b27c 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungRegistrierungCluster.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungRegistrierungCluster.java @@ -1,7 +1,6 @@ package org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition; import com.nedap.archie.rm.archetyped.FeederAudit; -import com.nedap.archie.rm.datavalues.DvCodedText; import java.lang.String; import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Entity; @@ -12,7 +11,7 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T11:17:24.286246+02:00", + date = "2021-05-04T16:51:43.121198+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class StudiePruefungRegistrierungCluster implements LocatableEntity { @@ -21,8 +20,8 @@ public class StudiePruefungRegistrierungCluster implements LocatableEntity { * Description: Studienregister, wo die Studie registriert ist und eine eindeutige Identifikationsnummer besitzt. * Comment: Zum Beispiel: Europäischen Arzneimittelagentur (EudraCT) oder Webseite Clinicaltrials.gov (US NCT-Nummer). */ - @Path("/items[at0035]/value") - private DvCodedText registername; + @Path("/items[at0035]/value|defining_code") + private RegisternameDefiningCode registernameDefiningCode; /** * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Item tree/Studienteilnahme/Studie/Prüfung/Registrierung/Registername/null_flavour @@ -51,12 +50,12 @@ public class StudiePruefungRegistrierungCluster implements LocatableEntity { @Path("/feeder_audit") private FeederAudit feederAudit; - public void setRegistername(DvCodedText registername) { - this.registername = registername; + public void setRegisternameDefiningCode(RegisternameDefiningCode registernameDefiningCode) { + this.registernameDefiningCode = registernameDefiningCode; } - public DvCodedText getRegistername() { - return this.registername ; + public RegisternameDefiningCode getRegisternameDefiningCode() { + return this.registernameDefiningCode ; } public void setRegisternameNullFlavourDefiningCode( diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeCluster.java index 61c1de7f8..0bde3efe6 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeCluster.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeCluster.java @@ -2,7 +2,6 @@ import com.nedap.archie.rm.archetyped.FeederAudit; import com.nedap.archie.rm.datastructures.Cluster; -import com.nedap.archie.rm.datavalues.DvCodedText; import java.util.List; import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; @@ -15,7 +14,7 @@ @Archetype("openEHR-EHR-CLUSTER.study_participation.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T11:17:24.274245200+02:00", + date = "2021-05-04T16:51:43.109206+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class StudienteilnahmeCluster implements LocatableEntity { @@ -29,7 +28,7 @@ public class StudienteilnahmeCluster implements LocatableEntity { /** * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Studienteilnahme/Studienzentrum * Description: Detailangaben über das Studienzentrum, das für den Patienten zuständig ist. - * Comment: Zum Beispiel: Name der Einrichtung, Adresse, Name des Prüfers, Kontaktdetails und weitere Details. Hier können Demographische Archetypen eingefügt werden. + * Comment: Zum Beispiel: Name der Einrichtung, Adresse, Name des Prüfers, Kontaktdetails und weitere Details. Hier können Demographische Archetypen eingefügt werden. */ @Path("/items[at0015]") private List<Cluster> studienzentrum; @@ -38,8 +37,8 @@ public class StudienteilnahmeCluster implements LocatableEntity { * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Studienteilnahme/Bestätigte Covid-19-Diagnose als Hauptursache für Aufnahme in Studie * Description: Zusätzliche Informationen zu der Studienteilnahme. */ - @Path("/items[at0014 and name/value='Bestätigte Covid-19-Diagnose als Hauptursache für Aufnahme in Studie']/value") - private DvCodedText bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudie; + @Path("/items[at0014 and name/value='Bestätigte Covid-19-Diagnose als Hauptursache für Aufnahme in Studie']/value|defining_code") + private BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieDefiningCode; /** * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme/Item tree/Studienteilnahme/Bestätigte Covid-19-Diagnose als Hauptursache für Aufnahme in Studie/null_flavour @@ -69,13 +68,14 @@ public List<Cluster> getStudienzentrum() { return this.studienzentrum ; } - public void setBestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudie( - DvCodedText bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudie) { - this.bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudie = bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudie; + public void setBestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieDefiningCode( + BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieDefiningCode) { + this.bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieDefiningCode = bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieDefiningCode; } - public DvCodedText getBestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudie() { - return this.bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudie ; + public BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode getBestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieDefiningCode( + ) { + return this.bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieDefiningCode ; } public void setBestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieNullFlavourDefiningCode( diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeClusterContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeClusterContainment.java index 9f1e9ee96..64a740f04 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeClusterContainment.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeClusterContainment.java @@ -2,7 +2,6 @@ import com.nedap.archie.rm.archetyped.FeederAudit; import com.nedap.archie.rm.datastructures.Cluster; -import com.nedap.archie.rm.datavalues.DvCodedText; import org.ehrbase.client.aql.containment.Containment; import org.ehrbase.client.aql.field.AqlFieldImp; import org.ehrbase.client.aql.field.ListAqlFieldImp; @@ -17,7 +16,7 @@ public class StudienteilnahmeClusterContainment extends Containment { public ListSelectAqlField<Cluster> STUDIENZENTRUM = new ListAqlFieldImp<Cluster>(StudienteilnahmeCluster.class, "/items[at0015]", "studienzentrum", Cluster.class, this); - public SelectAqlField<DvCodedText> BESTAETIGTE_COVID19_DIAGNOSE_ALS_HAUPTURSACHE_FUER_AUFNAHME_IN_STUDIE = new AqlFieldImp<DvCodedText>(StudienteilnahmeCluster.class, "/items[at0014]/value", "bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudie", DvCodedText.class, this); + public SelectAqlField<BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode> BESTAETIGTE_COVID19_DIAGNOSE_ALS_HAUPTURSACHE_FUER_AUFNAHME_IN_STUDIE_DEFINING_CODE = new AqlFieldImp<BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode>(StudienteilnahmeCluster.class, "/items[at0014]/value|defining_code", "bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieDefiningCode", BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.class, this); public SelectAqlField<NullFlavour> BESTAETIGTE_COVID19_DIAGNOSE_ALS_HAUPTURSACHE_FUER_AUFNAHME_IN_STUDIE_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(StudienteilnahmeCluster.class, "/items[at0014]/null_flavour|defining_code", "bestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieNullFlavourDefiningCode", NullFlavour.class, this); diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/TitelDerStudiePruefungDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/TitelDerStudiePruefungDefiningCode.java new file mode 100644 index 000000000..34b5ea632 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/TitelDerStudiePruefungDefiningCode.java @@ -0,0 +1,40 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition; + +import java.lang.String; +import org.ehrbase.client.classgenerator.EnumValueSet; + +public enum TitelDerStudiePruefungDefiningCode implements EnumValueSet { + PARTICIPATION_IN_INTERVENTIONAL_CLINICAL_TRIALS("Participation in interventional clinical trials", "", "eCRF", "03"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + TitelDerStudiePruefungDefiningCode(String value, String description, String terminologyId, + String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/resources/opt/GECCO_Studienteilnahme.opt b/src/main/resources/opt/GECCO_Studienteilnahme.opt index 5bd0e4138..ae62db5c8 100644 --- a/src/main/resources/opt/GECCO_Studienteilnahme.opt +++ b/src/main/resources/opt/GECCO_Studienteilnahme.opt @@ -1,1345 +1,1352 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<template xmlns="http://schemas.openehr.org/v1"> - <language> +<?xml version="1.0" encoding="utf-8"?> +<!--Operational template XML automatically generated by Ocean OPT Generator webservice --> +<template xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.openehr.org/v1"> + <language> + <terminology_id> + <value>ISO_639-1</value> + </terminology_id> + <code_string>de</code_string> + </language> + <description> + <original_author id="Name">Sarah Ballout</original_author> + <original_author id="Email">ballout.sarah@mh-hannover.de</original_author> + <original_author id="Organisation">Peter L. Reichertz Institut für Medizinische Informatik</original_author> + <other_contributors>Antje Wulff</other_contributors> + <lifecycle_state>published</lifecycle_state> + <other_details id="MetaDataSet:Sample Set ">Template metadata sample set</other_details> + <other_details id="Acknowledgements"/> + <other_details id="Business Process Level"/> + <other_details id="Care setting"/> + <other_details id="Client group"/> + <other_details id="Clinical Record Element"/> + <other_details id="Copyright"/> + <other_details id="Issues"/> + <other_details id="Owner"/> + <other_details id="Sign off"/> + <other_details id="Speciality"/> + <other_details id="User roles"/> + <other_details id="MD5-CAM-1.0.1">6d363db61d2440034fe4c34c462a143a</other_details> + <other_details id="PARENT:MD5-CAM-1.0.1">8BD8D5F850A9DEE8A16075105D36FD32</other_details> + <other_details id="original_language">ISO_639-1::de</other_details> + <details> + <language> <terminology_id> - <value>ISO_639-1</value> + <value>ISO_639-1</value> </terminology_id> <code_string>de</code_string> - </language> - <description> - <original_author id="Name">Sarah Ballout</original_author> - <original_author id="Email">ballout.sarah@mh-hannover.de</original_author> - <original_author id="Organisation">Peter L. Reichertz Institut für Medizinische Informatik</original_author> - <other_contributors>Antje Wulff</other_contributors> - <lifecycle_state>published</lifecycle_state> - <other_details id="MetaDataSet:Sample Set ">Template metadata sample set </other_details> - <other_details id="Acknowledgements"></other_details> - <other_details id="Business Process Level"></other_details> - <other_details id="Care setting"></other_details> - <other_details id="Client group"></other_details> - <other_details id="Clinical Record Element"></other_details> - <other_details id="Copyright"></other_details> - <other_details id="Issues"></other_details> - <other_details id="Owner"></other_details> - <other_details id="Sign off"></other_details> - <other_details id="Speciality"></other_details> - <other_details id="User roles"></other_details> - <other_details id="MD5-CAM-1.0.1">6d363db61d2440034fe4c34c462a143a</other_details> - <other_details id="PARENT:MD5-CAM-1.0.1">8BD8D5F850A9DEE8A16075105D36FD32</other_details> - <other_details id="build_uid">f8e06c79-0e80-31be-987b-2eb2975e7abf</other_details> - <other_details id="Generated By">Archetype Designer v1.18.6, user=test, repositoryId=gecco-num</other_details> - <details> - <language> - <terminology_id> - <value>ISO_639-1</value> - </terminology_id> - <code_string>de</code_string> - </language> - <purpose>Zur Repräsentation von Informationen, über die Teilnahme an einer klinischen Prüfung, Beobachtungs-, Register-, Diagnostik-, Therapiestudie oder an einem anderen medizinischen Forschungsvorhaben im Rahmen des FoDaPl-Projektes / GECCO-Datensatzes.</purpose> - <keywords>Studie</keywords> - <keywords>Studienteilnahme</keywords> - <keywords>Einverständniserklärung</keywords> - <keywords>Prüfung</keywords> - <keywords>Clinical Trial</keywords> - <keywords>GECCO</keywords> - <keywords>NUM</keywords> - <keywords>FoDaPl</keywords> - <use>Für die Abbildung von Informationen, über die Teilnahme an einer klinischen Prüfung, Beobachtungs-, Register-, Diagnostik-, Therapiestudie oder an einem anderen medizinischen Forschungsvorhaben im Rahmen des FoDaPl-Projektes / GECCO-Datensatzes.</use> - <misuse>Nicht zur Repräsentation von Personendaten verwenden.</misuse> - </details> - </description> - <uid> - <value>ff1e5cae-775e-459c-8a0f-e504d0145365</value> - </uid> - <template_id> - <value>GECCO_Studienteilnahme</value> - </template_id> - <concept>GECCO_Studienteilnahme</concept> - <definition> - <rm_type_name>COMPOSITION</rm_type_name> + </language> + <purpose>Zur Repräsentation von Informationen, über die Teilnahme an einer klinischen Prüfung, Beobachtungs-, Register-, Diagnostik-, Therapiestudie oder an einem anderen medizinischen Forschungsvorhaben im Rahmen des FoDaPl-Projektes / GECCO-Datensatzes.</purpose> + <keywords>Studie</keywords> + <keywords>Studienteilnahme</keywords> + <keywords>Einverständniserklärung</keywords> + <keywords>Prüfung</keywords> + <keywords>Clinical Trial</keywords> + <keywords>GECCO</keywords> + <keywords>NUM</keywords> + <keywords>FoDaPl</keywords> + <use>Für die Abbildung von Informationen, über die Teilnahme an einer klinischen Prüfung, Beobachtungs-, Register-, Diagnostik-, Therapiestudie oder an einem anderen medizinischen Forschungsvorhaben im Rahmen des FoDaPl-Projektes / GECCO-Datensatzes.</use> + <misuse>Nicht zur Repräsentation von Personendaten verwenden.</misuse> + </details> + </description> + <uid> + <value>ff1e5cae-775e-459c-8a0f-e504d0145365</value> + </uid> + <template_id> + <value>GECCO_Studienteilnahme</value> + </template_id> + <concept>GECCO_Studienteilnahme</concept> + <definition> + <rm_type_name>COMPOSITION</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>category</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> <lower_included>true</lower_included> <upper_included>true</upper_included> <lower_unbounded>false</lower_unbounded> <upper_unbounded>false</upper_unbounded> <lower>1</lower> <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>openehr</value> + </terminology_id> + <code_list>433</code_list> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>context</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>EVENT_CONTEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> </occurrences> - <node_id>at0000</node_id> - <attributes xsi:type="C_SINGLE_ATTRIBUTE" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <rm_attribute_name>category</rm_attribute_name> - <existence> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>other_context</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ITEM_TREE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0001</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> <lower_included>true</lower_included> <upper_included>true</upper_included> <lower_unbounded>false</lower_unbounded> <upper_unbounded>false</upper_unbounded> - <lower>1</lower> + <lower>0</lower> <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>DV_CODED_TEXT</rm_type_name> + </existence> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0002</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0004</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> <lower_included>true</lower_included> <upper_included>true</upper_included> <lower_unbounded>false</lower_unbounded> <upper_unbounded>false</upper_unbounded> - <lower>1</lower> + <lower>0</lower> <upper>1</upper> - </occurrences> - <node_id></node_id> - <attributes xsi:type="C_SINGLE_ATTRIBUTE"> - <rm_attribute_name>defining_code</rm_attribute_name> - <existence> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> <lower_included>true</lower_included> <upper_included>true</upper_included> <lower_unbounded>false</lower_unbounded> <upper_unbounded>false</upper_unbounded> <lower>1</lower> <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_CODE_PHRASE"> + </existence> + <children xsi:type="C_CODE_PHRASE"> <rm_type_name>CODE_PHRASE</rm_type_name> <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> </occurrences> - <node_id></node_id> + <node_id/> <terminology_id> - <value>openehr</value> + <value>local</value> </terminology_id> - <code_list>433</code_list> - </children> + <code_list>at0010</code_list> + <code_list>at0011</code_list> + <code_list>at0012</code_list> + <code_list>at0013</code_list> + </children> + </attributes> + </children> </attributes> - </children> - </attributes> - <attributes xsi:type="C_SINGLE_ATTRIBUTE" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <rm_attribute_name>context</rm_attribute_name> - <existence> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>EVENT_CONTEXT</rm_type_name> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0005</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> <lower_included>true</lower_included> <upper_included>true</upper_included> <lower_unbounded>false</lower_unbounded> <upper_unbounded>false</upper_unbounded> - <lower>1</lower> + <lower>0</lower> <upper>1</upper> - </occurrences> - <node_id></node_id> - <attributes xsi:type="C_SINGLE_ATTRIBUTE"> - <rm_attribute_name>other_context</rm_attribute_name> - <existence> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> <lower_included>true</lower_included> <upper_included>true</upper_included> <lower_unbounded>false</lower_unbounded> <upper_unbounded>false</upper_unbounded> - <lower>0</lower> + <lower>1</lower> <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>ITEM_TREE</rm_type_name> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> </occurrences> - <node_id>at0001</node_id> - <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> - <rm_attribute_name>items</rm_attribute_name> - <existence> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="ARCHETYPE_SLOT"> - <rm_type_name>CLUSTER</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>false</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>true</upper_unbounded> - <lower>0</lower> - </occurrences> - <node_id>at0002</node_id> - <includes> - <string_expression>archetype_id/value matches {/.*/}</string_expression> - <expression xsi:type="EXPR_BINARY_OPERATOR"> - <type>Boolean</type> - <operator>2007</operator> - <precedence_overridden>false</precedence_overridden> - <left_operand xsi:type="EXPR_LEAF"> - <type>String</type> - <item xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">archetype_id/value</item> - <reference_type>attribute</reference_type> - </left_operand> - <right_operand xsi:type="EXPR_LEAF"> - <type>String</type> - <item xsi:type="C_STRING"> - <pattern>.*</pattern> - </item> - <reference_type>constraint</reference_type> - </right_operand> - </expression> - </includes> - </children> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>ELEMENT</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> - </occurrences> - <node_id>at0004</node_id> - <attributes xsi:type="C_SINGLE_ATTRIBUTE"> - <rm_attribute_name>value</rm_attribute_name> - <existence> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>DV_CODED_TEXT</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </occurrences> - <node_id></node_id> - <attributes xsi:type="C_SINGLE_ATTRIBUTE"> - <rm_attribute_name>defining_code</rm_attribute_name> - <existence> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_CODE_PHRASE"> - <rm_type_name>CODE_PHRASE</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </occurrences> - <node_id></node_id> - <terminology_id> - <value>local</value> - </terminology_id> - <code_list>at0010</code_list> - <code_list>at0011</code_list> - <code_list>at0012</code_list> - <code_list>at0013</code_list> - </children> - </attributes> - </children> - </attributes> - </children> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>ELEMENT</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>false</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>true</upper_unbounded> - <lower>0</lower> - </occurrences> - <node_id>at0005</node_id> - <attributes xsi:type="C_SINGLE_ATTRIBUTE"> - <rm_attribute_name>value</rm_attribute_name> - <existence> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>DV_TEXT</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </occurrences> - <node_id></node_id> - <attributes xsi:type="C_SINGLE_ATTRIBUTE"> - <rm_attribute_name>value</rm_attribute_name> - <existence> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_PRIMITIVE_OBJECT"> - <rm_type_name>STRING</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> - </occurrences> - <node_id></node_id> - <item xsi:type="C_STRING"> - <list>survey</list> - <list_open>true</list_open> - </item> - </children> - </attributes> - </children> - </attributes> - </children> - <cardinality> - <is_ordered>false</is_ordered> - <is_unique>false</is_unique> - <interval> - <lower_included>true</lower_included> - <upper_included>false</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>true</upper_unbounded> - <lower>0</lower> - </interval> - </cardinality> - </attributes> - </children> + <node_id/> + <item xsi:type="C_STRING"> + <list>survey</list> + <list_open>true</list_open> + </item> + </children> + </attributes> + </children> </attributes> - </children> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </interval> + </cardinality> + </attributes> + </children> </attributes> - <attributes xsi:type="C_MULTIPLE_ATTRIBUTE" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <rm_attribute_name>content</rm_attribute_name> - <existence> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>GECCO_Studienteilnahme</list> + </item> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>content</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>EVALUATION</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>data</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ITEM_TREE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0001</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> <lower_included>true</lower_included> <upper_included>true</upper_included> <lower_unbounded>false</lower_unbounded> <upper_unbounded>false</upper_unbounded> <lower>0</lower> <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_ARCHETYPE_ROOT"> - <rm_type_name>EVALUATION</rm_type_name> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0002</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> <lower_included>true</lower_included> <upper_included>true</upper_included> <lower_unbounded>false</lower_unbounded> <upper_unbounded>false</upper_unbounded> <lower>0</lower> <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>SNOMED Clinical Terms</value> + </terminology_id> + <code_list>373066001</code_list> + <code_list>373067005</code_list> + <code_list>261665006</code_list> + <code_list>74964007</code_list> + <code_list>385432009</code_list> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> </occurrences> <node_id>at0000</node_id> - <attributes xsi:type="C_SINGLE_ATTRIBUTE"> - <rm_attribute_name>data</rm_attribute_name> - <existence> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> <lower_included>true</lower_included> <upper_included>true</upper_included> <lower_unbounded>false</lower_unbounded> <upper_unbounded>false</upper_unbounded> <lower>1</lower> <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>ITEM_TREE</rm_type_name> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0001</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> <lower_included>true</lower_included> <upper_included>true</upper_included> <lower_unbounded>false</lower_unbounded> <upper_unbounded>false</upper_unbounded> - <lower>1</lower> + <lower>0</lower> <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>eCRF</value> + </terminology_id> + <code_list>03</code_list> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> </occurrences> - <node_id>at0001</node_id> + <node_id>at0004</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0033</node_id> <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> - <rm_attribute_name>items</rm_attribute_name> - <existence> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0035</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> <lower_included>true</lower_included> <upper_included>true</upper_included> <lower_unbounded>false</lower_unbounded> <upper_unbounded>false</upper_unbounded> <lower>0</lower> <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>ELEMENT</rm_type_name> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> </occurrences> - <node_id>at0002</node_id> + <node_id/> <attributes xsi:type="C_SINGLE_ATTRIBUTE"> - <rm_attribute_name>value</rm_attribute_name> - <existence> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>DV_CODED_TEXT</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </occurrences> - <node_id></node_id> - <attributes xsi:type="C_SINGLE_ATTRIBUTE"> - <rm_attribute_name>defining_code</rm_attribute_name> - <existence> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_CODE_PHRASE"> - <rm_type_name>CODE_PHRASE</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> - </occurrences> - <node_id></node_id> - <terminology_id> - <value>SNOMED Clinical Terms</value> - </terminology_id> - <code_list>373066001</code_list> - <code_list>373067005</code_list> - <code_list>261665006</code_list> - <code_list>74964007</code_list> - <code_list>385432009</code_list> - </children> - </attributes> - </children> - </attributes> - </children> - <children xsi:type="C_ARCHETYPE_ROOT"> - <rm_type_name>CLUSTER</rm_type_name> - <occurrences> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> <lower_included>true</lower_included> <upper_included>true</upper_included> <lower_unbounded>false</lower_unbounded> <upper_unbounded>false</upper_unbounded> - <lower>0</lower> + <lower>1</lower> <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>eCRF</value> + </terminology_id> + <code_list>04</code_list> + <code_list>05</code_list> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0034</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> </occurrences> - <node_id>at0000</node_id> - <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> - <rm_attribute_name>items</rm_attribute_name> - <existence> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_ARCHETYPE_ROOT"> - <rm_type_name>CLUSTER</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> - </occurrences> - <node_id>at0000</node_id> - <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> - <rm_attribute_name>items</rm_attribute_name> - <existence> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>ELEMENT</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </occurrences> - <node_id>at0001</node_id> - <attributes xsi:type="C_SINGLE_ATTRIBUTE"> - <rm_attribute_name>value</rm_attribute_name> - <existence> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>DV_CODED_TEXT</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </occurrences> - <node_id></node_id> - <attributes xsi:type="C_SINGLE_ATTRIBUTE"> - <rm_attribute_name>defining_code</rm_attribute_name> - <existence> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_CODE_PHRASE"> - <rm_type_name>CODE_PHRASE</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> - </occurrences> - <node_id></node_id> - <terminology_id> - <value>eCRF</value> - </terminology_id> - <code_list>03</code_list> - </children> - </attributes> - </children> - </attributes> - </children> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>ELEMENT</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> - </occurrences> - <node_id>at0004</node_id> - <attributes xsi:type="C_SINGLE_ATTRIBUTE"> - <rm_attribute_name>value</rm_attribute_name> - <existence> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>DV_TEXT</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </occurrences> - <node_id></node_id> - </children> - </attributes> - </children> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>CLUSTER</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>false</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>true</upper_unbounded> - <lower>0</lower> - </occurrences> - <node_id>at0033</node_id> - <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> - <rm_attribute_name>items</rm_attribute_name> - <existence> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>ELEMENT</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> - </occurrences> - <node_id>at0035</node_id> - <attributes xsi:type="C_SINGLE_ATTRIBUTE"> - <rm_attribute_name>value</rm_attribute_name> - <existence> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>DV_CODED_TEXT</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </occurrences> - <node_id></node_id> - <attributes xsi:type="C_SINGLE_ATTRIBUTE"> - <rm_attribute_name>defining_code</rm_attribute_name> - <existence> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_CODE_PHRASE"> - <rm_type_name>CODE_PHRASE</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> - </occurrences> - <node_id></node_id> - <terminology_id> - <value>eCRF</value> - </terminology_id> - <code_list>04</code_list> - <code_list>05</code_list> - </children> - </attributes> - </children> - </attributes> - </children> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>ELEMENT</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> - </occurrences> - <node_id>at0034</node_id> - <attributes xsi:type="C_SINGLE_ATTRIBUTE"> - <rm_attribute_name>value</rm_attribute_name> - <existence> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>DV_TEXT</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </occurrences> - <node_id></node_id> - </children> - </attributes> - </children> - <cardinality> - <is_ordered>false</is_ordered> - <is_unique>false</is_unique> - <interval> - <lower_included>true</lower_included> - <upper_included>false</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>true</upper_unbounded> - <lower>1</lower> - </interval> - </cardinality> - </attributes> - </children> - <children xsi:type="ARCHETYPE_SLOT"> - <rm_type_name>CLUSTER</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>false</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>true</upper_unbounded> - <lower>0</lower> - </occurrences> - <node_id>at0023</node_id> - <includes> - <string_expression>archetype_id/value matches {/.*/}</string_expression> - <expression xsi:type="EXPR_BINARY_OPERATOR"> - <type>Boolean</type> - <operator>2007</operator> - <precedence_overridden>false</precedence_overridden> - <left_operand xsi:type="EXPR_LEAF"> - <type>String</type> - <item xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">archetype_id/value</item> - <reference_type>attribute</reference_type> - </left_operand> - <right_operand xsi:type="EXPR_LEAF"> - <type>String</type> - <item xsi:type="C_STRING"> - <pattern>.*</pattern> - </item> - <reference_type>constraint</reference_type> - </right_operand> - </expression> - </includes> - </children> - <children xsi:type="ARCHETYPE_SLOT"> - <rm_type_name>CLUSTER</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>false</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>true</upper_unbounded> - <lower>0</lower> - </occurrences> - <node_id>at0014</node_id> - <includes> - <string_expression>archetype_id/value matches {/.*/}</string_expression> - <expression xsi:type="EXPR_BINARY_OPERATOR"> - <type>Boolean</type> - <operator>2007</operator> - <precedence_overridden>false</precedence_overridden> - <left_operand xsi:type="EXPR_LEAF"> - <type>String</type> - <item xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">archetype_id/value</item> - <reference_type>attribute</reference_type> - </left_operand> - <right_operand xsi:type="EXPR_LEAF"> - <type>String</type> - <item xsi:type="C_STRING"> - <pattern>.*</pattern> - </item> - <reference_type>constraint</reference_type> - </right_operand> - </expression> - </includes> - </children> - <cardinality> - <is_ordered>false</is_ordered> - <is_unique>false</is_unique> - <interval> - <lower_included>true</lower_included> - <upper_included>false</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>true</upper_unbounded> - <lower>1</lower> - </interval> - </cardinality> - </attributes> - <archetype_id> - <value>openEHR-EHR-CLUSTER.study_details.v1</value> - </archetype_id> - <term_definitions code="at0000"> - <items id="text">Studie/Prüfung</items> - <items id="description">Detaillierte Informationen über eine klinische Prüfung, Beobachtungs-, Register-, Diagnostik-, Therapiestudie oder ein anderes medizinisches Forschungsvorhaben an Menschen.</items> - </term_definitions> - <term_definitions code="at0001"> - <items id="text">Titel der Studie/Prüfung</items> - <items id="description">Titel des Forschungsvorhabens.</items> - <items id="comment">Zum Beispiel: "Eine randomisierte Phase-II-Studie mit nal-Iri plus 5-Fluorouracil im Vergleich zu 5-Fluorouracil bei stationären Patienten mit Cholangio- und Gallenblasenkarzinom, die zuvor mit Gemcitabin oder Gemcitabin-haltigen Therapien behandelt wurden."</items> - </term_definitions> - <term_definitions code="at0002"> - <items id="text">Studien Code</items> - <items id="description">Die eindeutige Bezeichnung der Studie, welche der Sponsor (Studienverantwortliche) vergeben hat.</items> - <items id="comment">Jedes Studienvorhaben wird nach einem Prüfplan (Studienprotokoll) durchgeführt, der durch den Verantwortlichen der Studie eindeutig bezeichnet wird, z. B. AIO-HEP-0116.</items> - </term_definitions> - <term_definitions code="at0003"> - <items id="text">Studientyp</items> - <items id="description">Beschreibt die Art einer Studie.</items> - <items id="comment">Zum Beispiel: Interventionelle klinische Prüfung, Observationsstudie, Registerstudie, Bioäquivalenz-Studie, Medizinproduktestudie oder andere.</items> - </term_definitions> - <term_definitions code="at0004"> - <items id="text">Beschreibung</items> - <items id="description">Kurze Beschreibung des Forschungsvorhabens.</items> - <items id="comment">Beschreibung des Forschungsvorhabens in leicht verständlicher Formulierung für Laien.</items> - </term_definitions> - <term_definitions code="at0005"> - <items id="text">Status</items> - <items id="description">Status der Studie.</items> - <items id="comment">Der Stand der Studie im zeitlichen Prozessverlauf.</items> - </term_definitions> - <term_definitions code="at0010"> - <items id="text">Beginn der Studie</items> - <items id="description">Genaues oder geschätztes Datum, wann die Studie beginnt oder begonnen hat.</items> - <items id="comment">Das Datum, an dem der erste Teilnehmer in die Studie eingeschlossen wird.</items> - </term_definitions> - <term_definitions code="at0012"> - <items id="text">Sponsor</items> - <items id="description">Name des Sponsors.</items> - <items id="comment">Angaben über eine natürliche oder juristische Person, die die Verantwortung für die Veranlassung, Organisation und Finanzierung eines Forschungsvorhabens bei Menschen übernimmt. + <node_id/> + </children> + </attributes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </interval> + </cardinality> + </attributes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0023</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0014</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </interval> + </cardinality> + </attributes> + <archetype_id> + <value>openEHR-EHR-CLUSTER.study_details.v1</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="description">Detaillierte Informationen über eine klinische Prüfung, Beobachtungs-, Register-, Diagnostik-, Therapiestudie oder ein anderes medizinisches Forschungsvorhaben an Menschen.</items> + <items id="text">Studie/Prüfung</items> + </term_definitions> + <term_definitions code="at0001"> + <items id="comment">Zum Beispiel: "Eine randomisierte Phase-II-Studie mit nal-Iri plus 5-Fluorouracil im Vergleich zu 5-Fluorouracil bei stationären Patienten mit Cholangio- und Gallenblasenkarzinom, die zuvor mit Gemcitabin oder Gemcitabin-haltigen Therapien behandelt wurden."</items> + <items id="description">Titel des Forschungsvorhabens.</items> + <items id="text">Titel der Studie/Prüfung</items> + </term_definitions> + <term_definitions code="at0002"> + <items id="comment">Jedes Studienvorhaben wird nach einem Prüfplan (Studienprotokoll) durchgeführt, der durch den Verantwortlichen der Studie eindeutig bezeichnet wird, z. B. AIO-HEP-0116.</items> + <items id="description">Die eindeutige Bezeichnung der Studie, welche der Sponsor (Studienverantwortliche) vergeben hat.</items> + <items id="text">Studien Code</items> + </term_definitions> + <term_definitions code="at0003"> + <items id="comment">Zum Beispiel: Interventionelle klinische Prüfung, Observationsstudie, Registerstudie, Bioäquivalenz-Studie, Medizinproduktestudie oder andere.</items> + <items id="description">Beschreibt die Art einer Studie.</items> + <items id="text">Studientyp</items> + </term_definitions> + <term_definitions code="at0004"> + <items id="comment">Beschreibung des Forschungsvorhabens in leicht verständlicher Formulierung für Laien.</items> + <items id="description">Kurze Beschreibung des Forschungsvorhabens.</items> + <items id="text">Beschreibung</items> + </term_definitions> + <term_definitions code="at0005"> + <items id="comment">Der Stand der Studie im zeitlichen Prozessverlauf.</items> + <items id="description">Status der Studie.</items> + <items id="text">Status</items> + </term_definitions> + <term_definitions code="at0010"> + <items id="comment">Das Datum, an dem der erste Teilnehmer in die Studie eingeschlossen wird.</items> + <items id="description">Genaues oder geschätztes Datum, wann die Studie beginnt oder begonnen hat.</items> + <items id="text">Beginn der Studie</items> + </term_definitions> + <term_definitions code="at0012"> + <items id="comment">Angaben über eine natürliche oder juristische Person, die die Verantwortung für die Veranlassung, Organisation und Finanzierung eines Forschungsvorhabens bei Menschen übernimmt. Zum Beispiel: Novartis AG.</items> - </term_definitions> - <term_definitions code="at0013"> - <items id="text">Studienleiter</items> - <items id="description">Name des ärztlichen Leiters des Studienvorhabens.</items> - <items id="comment">Name einer Person, die die ärztliche Leitung der Studie übernimmt.</items> - </term_definitions> - <term_definitions code="at0014"> - <items id="text">Zusätzliche Details</items> - <items id="description">Zusätzliche strukturierte Angaben zur Studie.</items> - <items id="comment">Zum Beispiel detaillierte Angaben über die Genehmigungsbehörde, zum Studiendesign oder -plan, zum Sponsor, zu den Therapiearmen und/oder zum Studienmedikament oder Ein-/Ausschlusskriterien als Voraussetzung für eine Studienteilnahme.</items> - </term_definitions> - <term_definitions code="at0015"> - <items id="text">Ende der Studie</items> - <items id="description">Genaues oder geschätztes Datum für das Ende des Studienvorhabens.</items> - <items id="comment">Das Datum, an dem der zuletzt verbleibende Teilnehmer die Studie beendet hat.</items> - </term_definitions> - <term_definitions code="at0016"> - <items id="text">Phase 0</items> - <items id="description">Angabe, ob es sich um eine klinische Prüfung der Phase 0 handelt.</items> - <items id="comment">Eine Forschungsphase, die vor traditionellen Phase-I-Studien durchgeführt wird, um zu untersuchen, wie oder ob ein Medikament den menschlichen Körper beeinflusst. Explorative Studie ohne therapeutische oder diagnostische Ziele (z. B. Screening-Studie, Mikrodosis-Studie).</items> - </term_definitions> - <term_definitions code="at0017"> - <items id="text">Phase I</items> - <items id="description">Angabe, ob es sich um eine klinische Prüfung der Phase I handelt.</items> - <items id="comment">Eine Forschungsphase, die sich mit der Sicherheit eines Arzneimittels befasst. Die Studie wird in der Regel mit gesunden Freiwilligen durchgeführt.</items> - </term_definitions> - <term_definitions code="at0018"> - <items id="text">Phase II</items> - <items id="description">Angabe, ob es sich um eine klinische Prüfung der Phase II handelt.</items> - <items id="comment">In dieser Phase wird vor allem untersucht, ob das Prüfpräparat wirksam und verträglich ist. Außerdem dient diese Phase dazu, die richtige Dosis zu finden.</items> - </term_definitions> - <term_definitions code="at0019"> - <items id="text">Phase III</items> - <items id="description">Angabe, ob es sich um eine klinische Prüfung der Phase III handelt.</items> - <items id="comment">Eine Forschungsphase, in der mehr Informationen über die Sicherheit und Wirksamkeit eines Arzneimittels gesammelt werden, indem verschiedene Populationen und unterschiedliche Dosierungen untersucht werden und das Arzneimittel in Kombination mit anderen Arzneimitteln angewendet wird.</items> - </term_definitions> - <term_definitions code="at0020"> - <items id="text">Phase IV</items> - <items id="description">Angabe, ob es sich um eine klinische Prüfung der Phase IV handelt.</items> - <items id="comment">Eine Phase der Forschung mit einem bereits zugelassenem Medikament. Dazu gehört z. B. eine Post-Marketing-Studie. In dieser Studie werden zusätzliche Informationen zur Sicherheit, Wirksamkeit oder optimalen Verwendung eines Arzneimittels gesammelt.</items> - </term_definitions> - <term_definitions code="at0023"> - <items id="text">Studienzentrum</items> - <items id="description">Detailangaben über die teilnehmende medizinische Einrichtung wie Klinik oder Praxis, die Patienten gemäß den Studienvorgaben rekrutiert und die Daten erhebt.</items> - <items id="comment">Zum Beispiel: Name der Einrichtung, Adresse, Name des Prüfers, Kontaktdetails, zuständige Ethikkommission, Datum der Genehmigung der Teilnahme, beteiligte Personen und weitere Details. Hier können auch demographische Archetypen eingefügt werden. </items> - </term_definitions> - <term_definitions code="at0024"> - <items id="text">In Vorbereitung</items> - <items id="description">Es wurde mit der Rekrutierung der Teilnehmer noch nicht begonnen.</items> - </term_definitions> - <term_definitions code="at0025"> - <items id="text">Rekrutierung</items> - <items id="description">Derzeit werden Teilnehmer für die Studie rekrutiert.</items> - </term_definitions> - <term_definitions code="at0026"> - <items id="text">Einladung zum Screening</items> - <items id="description">Die künftigen Teilnehmer für die Studie werden derzeit aus einer Population oder einer Gruppe von Personen ausgewählt und zur Überprüfung der Eignungskriterien eingeladen.</items> - </term_definitions> - <term_definitions code="at0027"> - <items id="text">Aktiv, keine Rekrutierung</items> - <items id="description">Die Studie läuft, aber potenzielle Teilnehmer werden derzeit nicht rekrutiert oder eingeschrieben.</items> - </term_definitions> - <term_definitions code="at0028"> - <items id="text">Vorübergehend unterbrochen</items> - <items id="description">Die Studie wurde vorzeitig gestoppt, kann jedoch erneut gestartet werden.</items> - </term_definitions> - <term_definitions code="at0029"> - <items id="text">Abgeschlossen</items> - <items id="description">Die Studie wurde regulär beendet.</items> - </term_definitions> - <term_definitions code="at0030"> - <items id="text">Vorzeitiges Ende</items> - <items id="description">Die Studie wurde vorzeitig beendet und wird nicht erneut gestartet. Teilnehmer werden nicht mehr untersucht oder behandelt.</items> - </term_definitions> - <term_definitions code="at0031"> - <items id="text">Widerrufen</items> - <items id="description">Die Studie wurde vorzeitig abgebrochen, bevor der erste Teilnehmer eingeschlossen wurde.</items> - </term_definitions> - <term_definitions code="at0032"> - <items id="text">Unbekannt</items> - <items id="description">Der Status der Studie kann nicht ermittelt werden.</items> - </term_definitions> - <term_definitions code="at0033"> - <items id="text">Registrierung</items> - <items id="description">Registrierung der Studie in Registern.</items> - <items id="comment">Wenn die Studie auf der Webseite Clinicaltrials.gov registriert ist, besitzt sie eine US NCT-Nummer. Zum Beispiel: NCT03772405. -Eine EudraCT Nummer wird von der Europäischen Arzneimittelagentur vergeben. Wenn die klinische Prüfung auf der Webseite Current Controlled Trials registriert ist, besitzt sie eine ISRCTN-Nummer (International Standard Randomised Controlled Trial Number). </items> - </term_definitions> - <term_definitions code="at0034"> - <items id="text">Registrierungsnummer</items> - <items id="description">Eindeutige Identifikationsnummer an dem angezeigten Register.</items> - <items id="comment">Zum Beispiel die EudraCT Nummer, die von der Europäischen Arzneimittelagentur vergeben wird, oder ISRCTN (International Standard Randomised Controlled Trial Number). + <items id="description">Name des Sponsors.</items> + <items id="text">Sponsor</items> + </term_definitions> + <term_definitions code="at0013"> + <items id="comment">Name einer Person, die die ärztliche Leitung der Studie übernimmt.</items> + <items id="description">Name des ärztlichen Leiters des Studienvorhabens.</items> + <items id="text">Studienleiter</items> + </term_definitions> + <term_definitions code="at0014"> + <items id="comment">Zum Beispiel detaillierte Angaben über die Genehmigungsbehörde, zum Studiendesign oder -plan, zum Sponsor, zu den Therapiearmen und/oder zum Studienmedikament oder Ein-/Ausschlusskriterien als Voraussetzung für eine Studienteilnahme.</items> + <items id="description">Zusätzliche strukturierte Angaben zur Studie.</items> + <items id="text">Zusätzliche Details</items> + </term_definitions> + <term_definitions code="at0015"> + <items id="comment">Das Datum, an dem der zuletzt verbleibende Teilnehmer die Studie beendet hat.</items> + <items id="description">Genaues oder geschätztes Datum für das Ende des Studienvorhabens.</items> + <items id="text">Ende der Studie</items> + </term_definitions> + <term_definitions code="at0016"> + <items id="comment">Eine Forschungsphase, die vor traditionellen Phase-I-Studien durchgeführt wird, um zu untersuchen, wie oder ob ein Medikament den menschlichen Körper beeinflusst. Explorative Studie ohne therapeutische oder diagnostische Ziele (z. B. Screening-Studie, Mikrodosis-Studie).</items> + <items id="description">Angabe, ob es sich um eine klinische Prüfung der Phase 0 handelt.</items> + <items id="text">Phase 0</items> + </term_definitions> + <term_definitions code="at0017"> + <items id="comment">Eine Forschungsphase, die sich mit der Sicherheit eines Arzneimittels befasst. Die Studie wird in der Regel mit gesunden Freiwilligen durchgeführt.</items> + <items id="description">Angabe, ob es sich um eine klinische Prüfung der Phase I handelt.</items> + <items id="text">Phase I</items> + </term_definitions> + <term_definitions code="at0018"> + <items id="comment">In dieser Phase wird vor allem untersucht, ob das Prüfpräparat wirksam und verträglich ist. Außerdem dient diese Phase dazu, die richtige Dosis zu finden.</items> + <items id="description">Angabe, ob es sich um eine klinische Prüfung der Phase II handelt.</items> + <items id="text">Phase II</items> + </term_definitions> + <term_definitions code="at0019"> + <items id="comment">Eine Forschungsphase, in der mehr Informationen über die Sicherheit und Wirksamkeit eines Arzneimittels gesammelt werden, indem verschiedene Populationen und unterschiedliche Dosierungen untersucht werden und das Arzneimittel in Kombination mit anderen Arzneimitteln angewendet wird.</items> + <items id="description">Angabe, ob es sich um eine klinische Prüfung der Phase III handelt.</items> + <items id="text">Phase III</items> + </term_definitions> + <term_definitions code="at0020"> + <items id="comment">Eine Phase der Forschung mit einem bereits zugelassenem Medikament. Dazu gehört z. B. eine Post-Marketing-Studie. In dieser Studie werden zusätzliche Informationen zur Sicherheit, Wirksamkeit oder optimalen Verwendung eines Arzneimittels gesammelt.</items> + <items id="description">Angabe, ob es sich um eine klinische Prüfung der Phase IV handelt.</items> + <items id="text">Phase IV</items> + </term_definitions> + <term_definitions code="at0023"> + <items id="comment">Zum Beispiel: Name der Einrichtung, Adresse, Name des Prüfers, Kontaktdetails, zuständige Ethikkommission, Datum der Genehmigung der Teilnahme, beteiligte Personen und weitere Details. Hier können auch demographische Archetypen eingefügt werden.</items> + <items id="description">Detailangaben über die teilnehmende medizinische Einrichtung wie Klinik oder Praxis, die Patienten gemäß den Studienvorgaben rekrutiert und die Daten erhebt.</items> + <items id="text">Studienzentrum</items> + </term_definitions> + <term_definitions code="at0024"> + <items id="description">Es wurde mit der Rekrutierung der Teilnehmer noch nicht begonnen.</items> + <items id="text">In Vorbereitung</items> + </term_definitions> + <term_definitions code="at0025"> + <items id="description">Derzeit werden Teilnehmer für die Studie rekrutiert.</items> + <items id="text">Rekrutierung</items> + </term_definitions> + <term_definitions code="at0026"> + <items id="description">Die künftigen Teilnehmer für die Studie werden derzeit aus einer Population oder einer Gruppe von Personen ausgewählt und zur Überprüfung der Eignungskriterien eingeladen.</items> + <items id="text">Einladung zum Screening</items> + </term_definitions> + <term_definitions code="at0027"> + <items id="description">Die Studie läuft, aber potenzielle Teilnehmer werden derzeit nicht rekrutiert oder eingeschrieben.</items> + <items id="text">Aktiv, keine Rekrutierung</items> + </term_definitions> + <term_definitions code="at0028"> + <items id="description">Die Studie wurde vorzeitig gestoppt, kann jedoch erneut gestartet werden.</items> + <items id="text">Vorübergehend unterbrochen</items> + </term_definitions> + <term_definitions code="at0029"> + <items id="description">Die Studie wurde regulär beendet.</items> + <items id="text">Abgeschlossen</items> + </term_definitions> + <term_definitions code="at0030"> + <items id="description">Die Studie wurde vorzeitig beendet und wird nicht erneut gestartet. Teilnehmer werden nicht mehr untersucht oder behandelt.</items> + <items id="text">Vorzeitiges Ende</items> + </term_definitions> + <term_definitions code="at0031"> + <items id="description">Die Studie wurde vorzeitig abgebrochen, bevor der erste Teilnehmer eingeschlossen wurde.</items> + <items id="text">Widerrufen</items> + </term_definitions> + <term_definitions code="at0032"> + <items id="description">Der Status der Studie kann nicht ermittelt werden.</items> + <items id="text">Unbekannt</items> + </term_definitions> + <term_definitions code="at0033"> + <items id="comment">Wenn die Studie auf der Webseite Clinicaltrials.gov registriert ist, besitzt sie eine US NCT-Nummer. Zum Beispiel: NCT03772405. +Eine EudraCT Nummer wird von der Europäischen Arzneimittelagentur vergeben. Wenn die klinische Prüfung auf der Webseite Current Controlled Trials registriert ist, besitzt sie eine ISRCTN-Nummer (International Standard Randomised Controlled Trial Number).</items> + <items id="description">Registrierung der Studie in Registern.</items> + <items id="text">Registrierung</items> + </term_definitions> + <term_definitions code="at0034"> + <items id="comment">Zum Beispiel die EudraCT Nummer, die von der Europäischen Arzneimittelagentur vergeben wird, oder ISRCTN (International Standard Randomised Controlled Trial Number). Wenn die klinische Prüfung auf der Webseite Current Controlled Trials registriert ist, besitzt sie eine ISRCTN-Nummer.</items> - </term_definitions> - <term_definitions code="at0035"> - <items id="text">Registername</items> - <items id="description">Studienregister, wo die Studie registriert ist und eine eindeutige Identifikationsnummer besitzt.</items> - <items id="comment">Zum Beispiel: Europäischen Arzneimittelagentur (EudraCT) oder Webseite Clinicaltrials.gov (US NCT-Nummer).</items> - </term_definitions> - <term_definitions code="eCRF::03"> - <items id="text">Participation in interventional clinical trials</items> - </term_definitions> - <term_definitions code="eCRF::04"> - <items id="text">EudraCT Number‎</items> - </term_definitions> - <term_definitions code="eCRF::05"> - <items id="text">NCT number</items> - </term_definitions> - </children> - <children xsi:type="ARCHETYPE_SLOT"> - <rm_type_name>CLUSTER</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>false</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>true</upper_unbounded> - <lower>0</lower> - </occurrences> - <node_id>at0015</node_id> - <includes> - <string_expression>archetype_id/value matches {/.*/}</string_expression> - <expression xsi:type="EXPR_BINARY_OPERATOR"> - <type>Boolean</type> - <operator>2007</operator> - <precedence_overridden>false</precedence_overridden> - <left_operand xsi:type="EXPR_LEAF"> - <type>String</type> - <item xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">archetype_id/value</item> - <reference_type>attribute</reference_type> - </left_operand> - <right_operand xsi:type="EXPR_LEAF"> - <type>String</type> - <item xsi:type="C_STRING"> - <pattern>.*</pattern> - </item> - <reference_type>constraint</reference_type> - </right_operand> - </expression> - </includes> - </children> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>ELEMENT</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> - </occurrences> - <node_id>at0014</node_id> - <attributes xsi:type="C_SINGLE_ATTRIBUTE"> - <rm_attribute_name>value</rm_attribute_name> - <existence> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>DV_CODED_TEXT</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </occurrences> - <node_id></node_id> - <attributes xsi:type="C_SINGLE_ATTRIBUTE"> - <rm_attribute_name>defining_code</rm_attribute_name> - <existence> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_CODE_PHRASE"> - <rm_type_name>CODE_PHRASE</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>0</lower> - <upper>1</upper> - </occurrences> - <node_id></node_id> - <terminology_id> - <value>SNOMED Clinical Terms</value> - </terminology_id> - <code_list>373066001</code_list> - <code_list>373067005</code_list> - <code_list>261665006</code_list> - <code_list>74964007</code_list> - <code_list>385432009</code_list> - </children> - </attributes> - </children> - </attributes> - <attributes xsi:type="C_SINGLE_ATTRIBUTE"> - <rm_attribute_name>name</rm_attribute_name> - <existence> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_COMPLEX_OBJECT"> - <rm_type_name>DV_TEXT</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </occurrences> - <node_id></node_id> - <attributes xsi:type="C_SINGLE_ATTRIBUTE"> - <rm_attribute_name>value</rm_attribute_name> - <existence> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </existence> - <match_negated>false</match_negated> - <children xsi:type="C_PRIMITIVE_OBJECT"> - <rm_type_name>STRING</rm_type_name> - <occurrences> - <lower_included>true</lower_included> - <upper_included>true</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> - <lower>1</lower> - <upper>1</upper> - </occurrences> - <node_id></node_id> - <item xsi:type="C_STRING"> - <list>Bestätigte Covid-19-Diagnose als Hauptursache für Aufnahme in Studie</list> - </item> - </children> - </attributes> - </children> - </attributes> - </children> - <cardinality> - <is_ordered>false</is_ordered> - <is_unique>false</is_unique> - <interval> - <lower_included>true</lower_included> - <upper_included>false</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>true</upper_unbounded> - <lower>1</lower> - </interval> - </cardinality> - </attributes> - <archetype_id> - <value>openEHR-EHR-CLUSTER.study_participation.v1</value> - </archetype_id> - <term_definitions code="at0000"> - <items id="text">Studienteilnahme</items> - <items id="description">Detaillierte Informationen über die Teilnahme an einer klinischen Prüfung, Beobachtungs-, Register-, Diagnostik-, Therapiestudie oder an einem anderen medizinischen Forschungsvorhaben in der Rolle eines Studienpatienten oder Probanden.</items> - </term_definitions> - <term_definitions code="at0001"> - <items id="text">Name der Studie</items> - <items id="description">Bezeichnung der Studie bzw. der klinischen Prüfung, an welcher der Patient teilnimmt.</items> - <items id="comment">Der Titel oder Studiencode der Studie, z. B. AIO-HEP-0116.</items> - </term_definitions> - <term_definitions code="at0002"> - <items id="text">Studie</items> - <items id="description">Strukturierte Angaben zur Studie, an welcher der Patient teilnimmt.</items> - <items id="comment">Zum Beispiel: Studienbeschreibung, Typ der Studie, Sponsor, Studienzentrum, Dauer der Studie usw.</items> - </term_definitions> - <term_definitions code="at0003"> - <items id="text">Beginn der Teilnahme</items> - <items id="description">Datum, wann der Patient in die Studie eingeschlossen wurde.</items> - <items id="comment">Das Datumfeld kann leer bleiben, wenn der Teilnahmestatus auf "Informiert" oder "Eingewilligt" gesetzt ist.</items> - </term_definitions> - <term_definitions code="at0004"> - <items id="text">Ende der Teilnahme</items> - <items id="description">Datum, wann der Patient die Studie beendet hat.</items> - <items id="comment">Das Datumfeld kann leer bleiben, wenn der Teilnahmestatus auf "Informiert", "Eingewilligt", "Screening-Phase", "Eingeschlossen" oder "Follow-up" gesetzt ist.</items> - </term_definitions> - <term_definitions code="at0005"> - <items id="text">Status</items> - <items id="description">Status der Teilnahme.</items> - <items id="comment">Ab dem Zeitpunkt, wann ein Patient für eine Studie als Teilnehmer in Frage kommt und darüber informiert wird, kann seine Teilnahme verschiedene Status durchlaufen.</items> - </term_definitions> - <term_definitions code="at0006"> - <items id="text">Informiert</items> - <items id="description">Der Patient wurde über die Studie informiert, aber es wurde noch keine Einwilligung zur Teilnahme erteilt.</items> - </term_definitions> - <term_definitions code="at0007"> - <items id="text">Eingewilligt</items> - <items id="description">Die Einwilligung zur Teilnahme wurde vom Patienten erteilt, aber er wurde in die Studie noch nicht eingeschlossen.</items> - </term_definitions> - <term_definitions code="at0008"> - <items id="text">Screening-Phase</items> - <items id="description">Die Eignungskriterien des Patienten werden derzeit überprüft, bevor eine Intervention stattfindet.</items> - </term_definitions> - <term_definitions code="at0009"> - <items id="text">Eingeschlossen</items> - <items id="description">Der Patient wurde in die Studie eingeschlossen.</items> - </term_definitions> - <term_definitions code="at0010"> - <items id="text">Widerrufen</items> - <items id="description">Der Patient hat seine Einwilligung zurückgezogen, nachdem er bereits eingeschlossen wurde.</items> - </term_definitions> - <term_definitions code="at0011"> - <items id="text">Abgebrochen/Ausgeschlossen</items> - <items id="description">Der Patient hat die Studie aus diversen Gründen von sich aus abgebrochen oder er wurde von Studienverantwortlichen ausgeschlossen.</items> - </term_definitions> - <term_definitions code="at0012"> - <items id="text">Abgeschlossen</items> - <items id="description">Der Patient hat seine Teilnahme regulär beendet.</items> - </term_definitions> - <term_definitions code="at0014"> - <items id="text">Bestätigte Covid-19-Diagnose als Hauptursache für Aufnahme in Studie</items> - <items id="description">Zusätzliche Informationen zu der Studienteilnahme.</items> - </term_definitions> - <term_definitions code="at0015"> - <items id="text">Studienzentrum</items> - <items id="description">Detailangaben über das Studienzentrum, das für den Patienten zuständig ist.</items> - <items id="comment">Zum Beispiel: Name der Einrichtung, Adresse, Name des Prüfers, Kontaktdetails und weitere Details. Hier können Demographische Archetypen eingefügt werden. </items> - </term_definitions> - <term_definitions code="at0016"> - <items id="text">Identifikation</items> - <items id="description">Die Bezeichnung oder Kennung des Patienten in der Studie.</items> - <items id="comment">Eine eindeutige Bezeichnung des Patienten in der Studie, meist als Patienten-/Probandennummer oder Patienten ID/Probanden ID genannt.</items> - </term_definitions> - <term_definitions code="at0017"> - <items id="text">Follow-Up</items> - <items id="description">Der Patient befindet sich in der Nachbeobachtungsphase.</items> - </term_definitions> - <term_definitions code="at0018"> - <items id="text">Rechtsgrundlage</items> - <items id="description">Rechtliche Rahmen oder Regeln für die Teilnahme.</items> - <items id="comment">Zur Sicherheit der Patienten dürfen Forschungen am Menschen nur durchgeführt werden, wenn zahlreiche Gesetze und Richtlinien eingehalten werden. Hier können Gesetze und Richtlinien, nach welchen die Teilnahme an der Studie geregelt wird, benannt werden, z.B. das Arzneimittelgesetz (AMG) und die GCP-Verordnung bei einer in Deutschland durchgeführten klinischen Arzneimittelstudie.</items> - </term_definitions> - <term_definitions code="SNOMED Clinical Terms::373066001"> - <items id="text">Yes (qualifier value)</items> - </term_definitions> - <term_definitions code="SNOMED Clinical Terms::373067005"> - <items id="text">No (qualifier value)</items> - </term_definitions> - <term_definitions code="SNOMED Clinical Terms::261665006"> - <items id="text">Unknown (qualifier value)</items> - </term_definitions> - <term_definitions code="SNOMED Clinical Terms::74964007"> - <items id="text">Other (qualifier value)</items> - </term_definitions> - <term_definitions code="SNOMED Clinical Terms::385432009"> - <items id="text">Not applicable (qualifier value)</items> - </term_definitions> - </children> - <cardinality> - <is_ordered>false</is_ordered> - <is_unique>false</is_unique> - <interval> - <lower_included>true</lower_included> - <upper_included>false</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>true</upper_unbounded> - <lower>0</lower> - </interval> - </cardinality> + <items id="description">Eindeutige Identifikationsnummer an dem angezeigten Register.</items> + <items id="text">Registrierungsnummer</items> + </term_definitions> + <term_definitions code="at0035"> + <items id="comment">Zum Beispiel: Europäischen Arzneimittelagentur (EudraCT) oder Webseite Clinicaltrials.gov (US NCT-Nummer).</items> + <items id="description">Studienregister, wo die Studie registriert ist und eine eindeutige Identifikationsnummer besitzt.</items> + <items id="text">Registername</items> + </term_definitions> + <term_definitions code="03"> + <items id="text">Participation in interventional clinical trials</items> + </term_definitions> + <term_definitions code="04"> + <items id="text">EudraCT Number‎</items> + </term_definitions> + <term_definitions code="05"> + <items id="text">NCT number</items> + </term_definitions> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0015</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0014</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>SNOMED Clinical Terms</value> + </terminology_id> + <code_list>373066001</code_list> + <code_list>373067005</code_list> + <code_list>261665006</code_list> + <code_list>74964007</code_list> + <code_list>385432009</code_list> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Bestätigte Covid-19-Diagnose als Hauptursache für Aufnahme in Studie</list> + </item> + </children> </attributes> - </children> + </children> + </attributes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </interval> + </cardinality> </attributes> <archetype_id> - <value>openEHR-EHR-EVALUATION.gecco_study_participation.v0</value> + <value>openEHR-EHR-CLUSTER.study_participation.v1</value> </archetype_id> <term_definitions code="at0000"> - <items id="text">GECCO_Studienteilnahme</items> - <items id="description">GECCO_Studienteilnahme</items> + <items id="description">Detaillierte Informationen über die Teilnahme an einer klinischen Prüfung, Beobachtungs-, Register-, Diagnostik-, Therapiestudie oder an einem anderen medizinischen Forschungsvorhaben in der Rolle eines Studienpatienten oder Probanden.</items> + <items id="text">Studienteilnahme</items> </term_definitions> <term_definitions code="at0001"> - <items id="text">Item tree</items> - <items id="description">@ internal @</items> + <items id="comment">Der Titel oder Studiencode der Studie, z. B. AIO-HEP-0116.</items> + <items id="description">Bezeichnung der Studie bzw. der klinischen Prüfung, an welcher der Patient teilnimmt.</items> + <items id="text">Name der Studie</items> </term_definitions> <term_definitions code="at0002"> - <items id="text">Bereits an interventionellen klinischen Studien teilgenommen?</items> - <items id="description"></items> + <items id="comment">Zum Beispiel: Studienbeschreibung, Typ der Studie, Sponsor, Studienzentrum, Dauer der Studie usw.</items> + <items id="description">Strukturierte Angaben zur Studie, an welcher der Patient teilnimmt.</items> + <items id="text">Studie</items> </term_definitions> <term_definitions code="at0003"> - <items id="text">Studiendetails</items> - <items id="description"></items> + <items id="comment">Das Datumfeld kann leer bleiben, wenn der Teilnahmestatus auf "Informiert" oder "Eingewilligt" gesetzt ist.</items> + <items id="description">Datum, wann der Patient in die Studie eingeschlossen wurde.</items> + <items id="text">Beginn der Teilnahme</items> + </term_definitions> + <term_definitions code="at0004"> + <items id="comment">Das Datumfeld kann leer bleiben, wenn der Teilnahmestatus auf "Informiert", "Eingewilligt", "Screening-Phase", "Eingeschlossen" oder "Follow-up" gesetzt ist.</items> + <items id="description">Datum, wann der Patient die Studie beendet hat.</items> + <items id="text">Ende der Teilnahme</items> + </term_definitions> + <term_definitions code="at0005"> + <items id="comment">Ab dem Zeitpunkt, wann ein Patient für eine Studie als Teilnehmer in Frage kommt und darüber informiert wird, kann seine Teilnahme verschiedene Status durchlaufen.</items> + <items id="description">Status der Teilnahme.</items> + <items id="text">Status</items> + </term_definitions> + <term_definitions code="at0006"> + <items id="description">Der Patient wurde über die Studie informiert, aber es wurde noch keine Einwilligung zur Teilnahme erteilt.</items> + <items id="text">Informiert</items> + </term_definitions> + <term_definitions code="at0007"> + <items id="description">Die Einwilligung zur Teilnahme wurde vom Patienten erteilt, aber er wurde in die Studie noch nicht eingeschlossen.</items> + <items id="text">Eingewilligt</items> + </term_definitions> + <term_definitions code="at0008"> + <items id="description">Die Eignungskriterien des Patienten werden derzeit überprüft, bevor eine Intervention stattfindet.</items> + <items id="text">Screening-Phase</items> + </term_definitions> + <term_definitions code="at0009"> + <items id="description">Der Patient wurde in die Studie eingeschlossen.</items> + <items id="text">Eingeschlossen</items> </term_definitions> - <term_definitions code="SNOMED Clinical Terms::373066001"> - <items id="text">Yes (qualifier value)</items> + <term_definitions code="at0010"> + <items id="description">Der Patient hat seine Einwilligung zurückgezogen, nachdem er bereits eingeschlossen wurde.</items> + <items id="text">Widerrufen</items> </term_definitions> - <term_definitions code="SNOMED Clinical Terms::373067005"> - <items id="text">No (qualifier value)</items> + <term_definitions code="at0011"> + <items id="description">Der Patient hat die Studie aus diversen Gründen von sich aus abgebrochen oder er wurde von Studienverantwortlichen ausgeschlossen.</items> + <items id="text">Abgebrochen/Ausgeschlossen</items> </term_definitions> - <term_definitions code="SNOMED Clinical Terms::261665006"> - <items id="text">Unknown (qualifier value)</items> + <term_definitions code="at0012"> + <items id="description">Der Patient hat seine Teilnahme regulär beendet.</items> + <items id="text">Abgeschlossen</items> </term_definitions> - <term_definitions code="SNOMED Clinical Terms::74964007"> - <items id="text">Other (qualifier value)</items> + <term_definitions code="at0014"> + <items id="description">Zusätzliche Informationen zu der Studienteilnahme.</items> + <items id="text">Kommentar</items> </term_definitions> - <term_definitions code="SNOMED Clinical Terms::385432009"> - <items id="text">Not applicable (qualifier value)</items> + <term_definitions code="at0015"> + <items id="comment">Zum Beispiel: Name der Einrichtung, Adresse, Name des Prüfers, Kontaktdetails und weitere Details. Hier können Demographische Archetypen eingefügt werden.</items> + <items id="description">Detailangaben über das Studienzentrum, das für den Patienten zuständig ist.</items> + <items id="text">Studienzentrum</items> </term_definitions> - </children> - <cardinality> + <term_definitions code="at0016"> + <items id="comment">Eine eindeutige Bezeichnung des Patienten in der Studie, meist als Patienten-/Probandennummer oder Patienten ID/Probanden ID genannt.</items> + <items id="description">Die Bezeichnung oder Kennung des Patienten in der Studie.</items> + <items id="text">Identifikation</items> + </term_definitions> + <term_definitions code="at0017"> + <items id="description">Der Patient befindet sich in der Nachbeobachtungsphase.</items> + <items id="text">Follow-Up</items> + </term_definitions> + <term_definitions code="at0018"> + <items id="comment">Zur Sicherheit der Patienten dürfen Forschungen am Menschen nur durchgeführt werden, wenn zahlreiche Gesetze und Richtlinien eingehalten werden. Hier können Gesetze und Richtlinien, nach welchen die Teilnahme an der Studie geregelt wird, benannt werden, z.B. das Arzneimittelgesetz (AMG) und die GCP-Verordnung bei einer in Deutschland durchgeführten klinischen Arzneimittelstudie.</items> + <items id="description">Rechtliche Rahmen oder Regeln für die Teilnahme.</items> + <items id="text">Rechtsgrundlage</items> + </term_definitions> + <term_definitions code="373066001"> + <items id="text">Yes (qualifier value)</items> + </term_definitions> + <term_definitions code="373067005"> + <items id="text">No (qualifier value)</items> + </term_definitions> + <term_definitions code="261665006"> + <items id="text">Unknown (qualifier value)</items> + </term_definitions> + <term_definitions code="74964007"> + <items id="text">Other (qualifier value)</items> + </term_definitions> + <term_definitions code="385432009"> + <items id="text">Not applicable (qualifier value)</items> + </term_definitions> + </children> + <cardinality> <is_ordered>false</is_ordered> <is_unique>false</is_unique> <interval> - <lower_included>true</lower_included> - <upper_included>false</upper_included> - <lower_unbounded>false</lower_unbounded> - <upper_unbounded>true</upper_unbounded> - <lower>0</lower> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> </interval> - </cardinality> + </cardinality> + </attributes> + </children> </attributes> <archetype_id> - <value>openEHR-EHR-COMPOSITION.registereintrag.v1</value> + <value>openEHR-EHR-EVALUATION.gecco_study_participation.v0</value> </archetype_id> - <template_id> - <value>GECCO_Studienteilnahme</value> - </template_id> <term_definitions code="at0000"> - <items id="text">GECCO_Studienteilnahme</items> - <items id="description">Generische Zusammenstellung zur Darstellung eines Datensatzes für Forschungszwecke. </items> + <items id="description">GECCO_Studienteilnahme</items> + <items id="text">GECCO_Studienteilnahme</items> </term_definitions> <term_definitions code="at0001"> - <items id="text">Baum</items> - <items id="description">@ internal @</items> + <items id="description">@ internal @</items> + <items id="text">Item tree</items> </term_definitions> <term_definitions code="at0002"> - <items id="text">Erweiterung</items> - <items id="description">Ergänzende Angaben zum Registereintrag. </items> + <items id="description">*</items> + <items id="text">Bereits an interventionellen klinischen Studien teilgenommen?</items> </term_definitions> - <term_definitions code="at0004"> - <items id="text">Status</items> - <items id="description">Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten.</items> + <term_definitions code="at0003"> + <items id="description">*</items> + <items id="text">Studiendetails</items> </term_definitions> - <term_definitions code="at0005"> - <items id="text">Kategorie</items> - <items id="description">Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils).</items> + <term_definitions code="373066001"> + <items id="text">Yes (qualifier value)</items> </term_definitions> - <term_definitions code="at0010"> - <items id="text">registriert</items> - <items id="description">*</items> + <term_definitions code="373067005"> + <items id="text">No (qualifier value)</items> </term_definitions> - <term_definitions code="at0011"> - <items id="text">vorläufig</items> - <items id="description">*</items> + <term_definitions code="261665006"> + <items id="text">Unknown (qualifier value)</items> </term_definitions> - <term_definitions code="at0012"> - <items id="text">final</items> - <items id="description">*</items> + <term_definitions code="74964007"> + <items id="text">Other (qualifier value)</items> </term_definitions> - <term_definitions code="at0013"> - <items id="text">geändert</items> - <items id="description">*</items> + <term_definitions code="385432009"> + <items id="text">Not applicable (qualifier value)</items> </term_definitions> - </definition> -</template> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </interval> + </cardinality> + </attributes> + <archetype_id> + <value>openEHR-EHR-COMPOSITION.registereintrag.v1</value> + </archetype_id> + <template_id> + <value>GECCO_Studienteilnahme</value> + </template_id> + <term_definitions code="at0000"> + <items id="description">Generische Zusammenstellung zur Darstellung eines Datensatzes für Forschungszwecke.</items> + <items id="text">Registereintrag</items> + </term_definitions> + <term_definitions code="at0001"> + <items id="description">@ internal @</items> + <items id="text">Baum</items> + </term_definitions> + <term_definitions code="at0002"> + <items id="description">Ergänzende Angaben zum Registereintrag.</items> + <items id="text">Erweiterung</items> + </term_definitions> + <term_definitions code="at0004"> + <items id="description">Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten.</items> + <items id="text">Status</items> + </term_definitions> + <term_definitions code="at0005"> + <items id="description">Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils).</items> + <items id="text">Kategorie</items> + </term_definitions> + <term_definitions code="at0010"> + <items id="description">*</items> + <items id="text">registriert</items> + </term_definitions> + <term_definitions code="at0011"> + <items id="description">*</items> + <items id="text">vorläufig</items> + </term_definitions> + <term_definitions code="at0012"> + <items id="description">*</items> + <items id="text">final</items> + </term_definitions> + <term_definitions code="at0013"> + <items id="description">*</items> + <items id="text">geändert</items> + </term_definitions> + </definition> + <view/> +</template> \ No newline at end of file From 38a8fd00873c2ec0c3afb3a1bed1fd79fe76b783 Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Tue, 4 May 2021 17:15:52 +0200 Subject: [PATCH 049/141] regenerated the impfstatus --- .../ImpfstatusCompositionConverter.java | 7 +++++++ .../ImpfstatusComposition.java | 2 +- .../definition/ImpfstoffDefiningCode.java | 8 ++++---- .../definition/ImpfungAction.java | 2 +- .../definition/ImpfungGegenDefiningCode.java | 15 +++++++-------- .../definition/ImpfungImpfungGegenElement.java | 2 +- .../UnbekannterImpfstatusEvaluation.java | 2 +- .../definition/VerabreichteDosenCluster.java | 2 +- 8 files changed, 23 insertions(+), 17 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfstatusCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfstatusCompositionConverter.java index 8530454c6..000c91db0 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfstatusCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfstatusCompositionConverter.java @@ -2,9 +2,13 @@ import org.ehrbase.fhirbridge.ehr.converter.generic.ImmunizationToCompositionConverter; import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.ImpfstatusComposition; +import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.ImpfstoffDefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.ImpfungGegenDefiningCode; import org.hl7.fhir.r4.model.Immunization; +import java.util.HashMap; import java.util.List; +import java.util.Map; public class ImpfstatusCompositionConverter extends ImmunizationToCompositionConverter<ImpfstatusComposition> { @@ -19,3 +23,6 @@ protected ImpfstatusComposition convertInternal(Immunization resource) { return impfstatusComposition; } } + + + diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java index 3a8aaac42..167f841e7 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java @@ -28,7 +28,7 @@ @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T16:32:17.077142+02:00", + date = "2021-05-04T17:09:24.092597+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @Template("Impfstatus") diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfstoffDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfstoffDefiningCode.java index 4fadc7f67..f16c130ad 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfstoffDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfstoffDefiningCode.java @@ -502,10 +502,6 @@ public enum ImpfstoffDefiningCode implements EnumValueSet { this.code = code; } - public String getValue() { - return this.value ; - } - public static Map<String, ImpfstoffDefiningCode> getCodesAsMap(){ Map<String, ImpfstoffDefiningCode> impfstoffDefiningCodeHashMap = new HashMap<>(); for (ImpfstoffDefiningCode impfstoffDefiningCode : ImpfstoffDefiningCode.values()) { @@ -514,6 +510,10 @@ public static Map<String, ImpfstoffDefiningCode> getCodesAsMap(){ return impfstoffDefiningCodeHashMap; } + public String getValue() { + return this.value ; + } + public String getDescription() { return this.description ; } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungAction.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungAction.java index b614f275a..93c3be4b9 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungAction.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungAction.java @@ -18,7 +18,7 @@ @Archetype("openEHR-EHR-ACTION.medication.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T16:32:17.107654+02:00", + date = "2021-05-04T17:09:24.124296+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class ImpfungAction implements EntryEntity { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungGegenDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungGegenDefiningCode.java index 3ecf0d664..01c7af19c 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungGegenDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungGegenDefiningCode.java @@ -94,14 +94,6 @@ public enum ImpfungGegenDefiningCode implements EnumValueSet { this.code = code; } - public String getValue() { - return this.value ; - } - - public String getDescription() { - return this.description ; - } - public static Map<String, ImpfungGegenDefiningCode> getCodesAsMap(){ Map<String, ImpfungGegenDefiningCode> impfungGegenDefiningCodeHashMap = new HashMap<>(); for (ImpfungGegenDefiningCode impfungGegenDefiningCode : ImpfungGegenDefiningCode.values()) { @@ -110,6 +102,13 @@ public static Map<String, ImpfungGegenDefiningCode> getCodesAsMap(){ return impfungGegenDefiningCodeHashMap; } + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } public String getTerminologyId() { return this.terminologyId ; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungImpfungGegenElement.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungImpfungGegenElement.java index 8ab94101e..1763ff337 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungImpfungGegenElement.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungImpfungGegenElement.java @@ -10,7 +10,7 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T16:32:17.155064+02:00", + date = "2021-05-04T17:09:24.167218+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class ImpfungImpfungGegenElement implements LocatableEntity { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluation.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluation.java index 104e9a269..3a7f665f7 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluation.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluation.java @@ -16,7 +16,7 @@ @Archetype("openEHR-EHR-EVALUATION.absence.v2") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T16:32:17.170805+02:00", + date = "2021-05-04T17:09:24.181128+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class UnbekannterImpfstatusEvaluation implements EntryEntity { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenCluster.java index 209ac01ff..d75ede7f3 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenCluster.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenCluster.java @@ -17,7 +17,7 @@ @Archetype("openEHR-EHR-CLUSTER.dosage.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T16:32:17.149315+02:00", + date = "2021-05-04T17:09:24.160617+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class VerabreichteDosenCluster implements LocatableEntity { From 90469f463f792b6257091439be1cb9c1fb0005b5 Mon Sep 17 00:00:00 2001 From: MDSchulze <mareike.schulze@plri.de> Date: Tue, 4 May 2021 17:56:10 +0200 Subject: [PATCH 050/141] done mapping; tests have to be written --- .../config/ConversionConfiguration.java | 2 + ...rialParticipationCompositionConverter.java | 35 +++++- ...TrialParticipationEvaluationConverter.java | 114 +++++++++++++++++- .../GECCOStudienteilnahmeComposition.java | 5 +- .../GeccoStudienteilnahmeEvaluation.java | 2 +- ...GeccoStudienteilnahmeKategorieElement.java | 2 +- .../definition/StudiePruefungCluster.java | 2 +- .../StudiePruefungRegistrierungCluster.java | 2 +- .../definition/StudienteilnahmeCluster.java | 2 +- .../StudienteilnahmeDefiningCode.java | 2 - ...-trial-participation-yes-euduract-nct.json | 92 ++++++++++++++ ...ical-trial-participation-yes-euduract.json | 79 ++++++++++++ 12 files changed, 325 insertions(+), 14 deletions(-) delete mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeDefiningCode.java create mode 100644 src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-euduract-nct.json create mode 100644 src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-euduract.json diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java index e923c7ae2..90ad7e9cd 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java @@ -8,6 +8,7 @@ import org.ehrbase.fhirbridge.ehr.converter.specific.bodytemperature.BodyTemperatureCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.bodyweight.BodyWeightCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.clinicalfrailty.ClinicalFrailtyScaleScoreCompositionConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.clinicaltrialparticipation.ClinicalTrialParticipationCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.coronavirusnachweistest.CoronavirusNachweisTestCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.d4lquestionnaire.D4lQuestionnaireCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.diagnose.DiagnoseCompositionConverter; @@ -92,6 +93,7 @@ private void registerObservationConverters(ConversionService conversionService) conversionService.registerConverter(Profile.BODY_TEMP, new BodyTemperatureCompositionConverter()); conversionService.registerConverter(Profile.BODY_WEIGHT, new BodyWeightCompositionConverter()); conversionService.registerConverter(Profile.CLINICAL_FRAILTY_SCALE, new ClinicalFrailtyScaleScoreCompositionConverter()); + conversionService.registerConverter(Profile.CLINICAL_TRIAL_PARTICIPATION, new ClinicalTrialParticipationCompositionConverter()); conversionService.registerConverter(Profile.CORONARIRUS_NACHWEIS_TEST, new CoronavirusNachweisTestCompositionConverter()); conversionService.registerConverter(Profile.FIO2, new FiO2CompositionConverter()); conversionService.registerConverter(Profile.HEART_RATE, new HeartRateCompositionConverter()); diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationCompositionConverter.java index f1da02ce5..8183e0027 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationCompositionConverter.java @@ -1,2 +1,33 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.clinicaltrialparticipation;public class ClinicalTrialParticipationCompositionConverter { -} +package org.ehrbase.fhirbridge.ehr.converter.specific.clinicaltrialparticipation; + +import org.ehrbase.fhirbridge.ehr.converter.ConversionException; +import org.ehrbase.fhirbridge.ehr.converter.generic.ObservationToCompositionConverter; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.GECCOStudienteilnahmeComposition; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.StatusDefiningCode; +import org.hl7.fhir.r4.model.Observation; + +public class ClinicalTrialParticipationCompositionConverter extends ObservationToCompositionConverter<GECCOStudienteilnahmeComposition> { + + @Override + protected GECCOStudienteilnahmeComposition convertInternal(Observation resource) { + GECCOStudienteilnahmeComposition composition = new GECCOStudienteilnahmeComposition(); + mapStatus(composition, resource); + composition.setGeccoStudienteilnahme(new ClinicalTrialParticipationEvaluationConverter().convert(resource)); + return composition; + } + + private void mapStatus(GECCOStudienteilnahmeComposition composition, Observation obs) { + String status = obs.getStatusElement().getCode(); + if (status.equals(StatusDefiningCode.FINAL.getValue())) { + composition.setStatusDefiningCode(StatusDefiningCode.FINAL); + } else if (status.equals(StatusDefiningCode.GEAENDERT.getValue())) { + composition.setStatusDefiningCode(StatusDefiningCode.GEAENDERT); + } else if (status.equals(StatusDefiningCode.REGISTRIERT.getValue())) { + composition.setStatusDefiningCode(StatusDefiningCode.REGISTRIERT); + } else if (status.equals(StatusDefiningCode.VORLAEUFIG.getValue())) { + composition.setStatusDefiningCode(StatusDefiningCode.VORLAEUFIG); + } else { + throw new ConversionException("The status " + obs.getStatus().toString() + " is not valid for body height."); + } + } +} \ No newline at end of file diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java index 23774ae09..04c460a1e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java @@ -1,5 +1,115 @@ package org.ehrbase.fhirbridge.ehr.converter.specific.clinicaltrialparticipation; -public class ClinicalTrialParticipationEvaluationConverter { +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import org.ehrbase.fhirbridge.ehr.converter.generic.ObservationToEvaluationConverter; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.*; +import org.hl7.fhir.r4.model.Coding; +import org.hl7.fhir.r4.model.Observation; -} +import java.util.List; + +import static org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem.SNOMED; + +public class ClinicalTrialParticipationEvaluationConverter extends ObservationToEvaluationConverter<GeccoStudienteilnahmeEvaluation> { + + public GeccoStudienteilnahmeEvaluation convertInternal(Observation resource) { + + GeccoStudienteilnahmeEvaluation geccoStudienteilnahmeEvaluation = new GeccoStudienteilnahmeEvaluation(); + + String code = getSnomedCodeObservation(resource); + + switch(code) { + case "373066001": + geccoStudienteilnahmeEvaluation.setBereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.YES_QUALIFIER_VALUE); + break; + case "373067005": + geccoStudienteilnahmeEvaluation.setBereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.NO_QUALIFIER_VALUE); + break; + case "261665006": + geccoStudienteilnahmeEvaluation.setBereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.UNKNOWN_QUALIFIER_VALUE); + break; + case "74964007": + geccoStudienteilnahmeEvaluation.setBereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.OTHER_QUALIFIER_VALUE); + break; + case "385432009": + geccoStudienteilnahmeEvaluation.setBereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.NOT_APPLICABLE_QUALIFIER_VALUE); + break; + default: + throw new UnprocessableEntityException("Value code " + resource.getValueCodeableConcept().getCoding().get(0).getCode() + " is not supported"); + } + + StudienteilnahmeCluster studienteilnahmeCluster = new StudienteilnahmeCluster(); + geccoStudienteilnahmeEvaluation.setStudienteilnahme(studienteilnahmeCluster); + + StudiePruefungCluster studiePruefungCluster = new StudiePruefungCluster(); + studienteilnahmeCluster.setStudiePruefung(studiePruefungCluster); + + studiePruefungCluster.setTitelDerStudiePruefungDefiningCode(TitelDerStudiePruefungDefiningCode.PARTICIPATION_IN_INTERVENTIONAL_CLINICAL_TRIALS); + studiePruefungCluster.setBeschreibungValue(resource.getValueStringType().getValue()); + + studiePruefungCluster.setRegistrierung(convertInternalEvents(resource)); + + String code2 = getSnomedCodeObservation(resource); + + switch(code2) { + case "373066001": + studienteilnahmeCluster.setBestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieDefiningCode(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.YES_QUALIFIER_VALUE); + break; + case "373067005": + studienteilnahmeCluster.setBestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieDefiningCode(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.NO_QUALIFIER_VALUE); + break; + case "261665006": + studienteilnahmeCluster.setBestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieDefiningCode(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.UNKNOWN_QUALIFIER_VALUE); + break; + case "74964007": + studienteilnahmeCluster.setBestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieDefiningCode(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.OTHER_QUALIFIER_VALUE); + break; + case "385432009": + studienteilnahmeCluster.setBestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieDefiningCode(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.NOT_APPLICABLE_QUALIFIER_VALUE); + break; + default: + throw new UnprocessableEntityException("Value code " + resource.getValueCodeableConcept().getCoding().get(0).getCode() + " is not supported"); + } + + return geccoStudienteilnahmeEvaluation; + } + + private List<StudiePruefungRegistrierungCluster> convertInternalEvents(Observation resource) { + + StudiePruefungRegistrierungCluster studiePruefungRegistrierungCluster = new StudiePruefungRegistrierungCluster(); + + for (Observation.ObservationComponentComponent observationComponent + : resource.getComponent()) { + + if(resource.getValueCodeableConcept().getCoding().get(0).getCode() == "05") + { + studiePruefungRegistrierungCluster.setRegisternameDefiningCode(RegisternameDefiningCode.NCT_NUMBER); + } + else if(resource.getValueCodeableConcept().getCoding().get(0).getCode() == "04") + { + studiePruefungRegistrierungCluster.setRegisternameDefiningCode(RegisternameDefiningCode.EUDRACT_NUMBER); + } + else + { + throw new UnprocessableEntityException("value code " + resource.getValueCodeableConcept().getCoding().get(0).getCode() + " is not supported"); + } + + studiePruefungRegistrierungCluster.setRegistrierungsnummerValue(observationComponent.getValueStringType().getValue()); + } + + return List.of(studiePruefungRegistrierungCluster); + } + + private void checkForSnomedSystem(String systemCode) { + if (!SNOMED.getUrl().equals(systemCode)) { + throw new UnprocessableEntityException("The system is not correct. " + + "It should be '" + SNOMED.getUrl() + "', but it was '" + systemCode + "'."); + } + } + + private String getSnomedCodeObservation(Observation fhirObservation) { + Coding code = fhirObservation.getValueCodeableConcept().getCoding().get(0); + checkForSnomedSystem(code.getSystem()); + return code.getCode(); + } +} \ No newline at end of file diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeComposition.java index 2928d71ed..36b4df201 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeComposition.java @@ -21,7 +21,6 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.GeccoStudienteilnahmeEvaluation; import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.GeccoStudienteilnahmeKategorieElement; import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.StatusDefiningCode; @@ -30,11 +29,11 @@ @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T16:51:43.036290+02:00", + date = "2021-05-04T17:37:36.490444500+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @Template("GECCO_Studienteilnahme") -public class GECCOStudienteilnahmeComposition implements CompositionEntity, Composition { +public class GECCOStudienteilnahmeComposition implements CompositionEntity { /** * Path: GECCO_Studienteilnahme/category */ diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeEvaluation.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeEvaluation.java index 73596c07e..784601ffb 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeEvaluation.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeEvaluation.java @@ -14,7 +14,7 @@ @Archetype("openEHR-EHR-EVALUATION.gecco_study_participation.v0") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T16:51:43.100661+02:00", + date = "2021-05-04T17:37:36.525694500+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class GeccoStudienteilnahmeEvaluation implements EntryEntity { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeKategorieElement.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeKategorieElement.java index f0ffdc668..80925530c 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeKategorieElement.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/GeccoStudienteilnahmeKategorieElement.java @@ -11,7 +11,7 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T16:51:43.075078+02:00", + date = "2021-05-04T17:37:36.515879900+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class GeccoStudienteilnahmeKategorieElement implements LocatableEntity { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungCluster.java index 681169de7..e57db68e3 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungCluster.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungCluster.java @@ -15,7 +15,7 @@ @Archetype("openEHR-EHR-CLUSTER.study_details.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T16:51:43.112959+02:00", + date = "2021-05-04T17:37:36.525694500+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class StudiePruefungCluster implements LocatableEntity { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungRegistrierungCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungRegistrierungCluster.java index c98f2b27c..8846930bd 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungRegistrierungCluster.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudiePruefungRegistrierungCluster.java @@ -11,7 +11,7 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T16:51:43.121198+02:00", + date = "2021-05-04T17:37:36.540709200+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class StudiePruefungRegistrierungCluster implements LocatableEntity { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeCluster.java index 0bde3efe6..70216eb60 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeCluster.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeCluster.java @@ -14,7 +14,7 @@ @Archetype("openEHR-EHR-CLUSTER.study_participation.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T16:51:43.109206+02:00", + date = "2021-05-04T17:37:36.525694500+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class StudienteilnahmeCluster implements LocatableEntity { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeDefiningCode.java deleted file mode 100644 index c7b2d8b35..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/StudienteilnahmeDefiningCode.java +++ /dev/null @@ -1,2 +0,0 @@ -package org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition;public enum StudienteilnahmeDefiningCode { -} diff --git a/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-euduract-nct.json b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-euduract-nct.json new file mode 100644 index 000000000..308f16003 --- /dev/null +++ b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-euduract-nct.json @@ -0,0 +1,92 @@ +{ + "resourceType": "Observation", + "id": "571c047d-3689-4fb7-9292-c1d71faecf72", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/interventional-clinical-trial-participation" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "OBI" + } + ] + }, + "system": "https://www.charite.de/fhir/CodeSystem/observation-identifiers", + "value": "ecrf_03_InterventionalClinicalTrialsParticipation", + "assigner": { + "reference": "Organization/Charité" + } + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "survey" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes", + "code": "03", + "display": "Participation in interventional clinical trials" + } + ], + "text": "Has the patient participated in one or more interventional clinical trials?" + }, + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-10-16T08:49:21+02:00", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "373066001", + "display": "Yes (qualifier value)" + } + ], + "text": "Patient is enrolled in other studies" + }, + "component": [ + { + "code": { + "coding": [ + { + "system": "https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes", + "code": "04", + "display": "EudraCT Number" + } + ], + "text": "EudraCT (European Union Drug Regulating Authorities Clinical Trials) registration number" + }, + "valueString": "2020-042169-13" + }, + { + "code": { + "coding": [ + { + "system": "https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes", + "code": "05", + "display": "NCT number" + } + ], + "text": "A unique identification code given to each clinical study registered on ClinicalTrials.gov" + }, + "valueString": "NCT00001016" + } + ] +} \ No newline at end of file diff --git a/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-euduract.json b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-euduract.json new file mode 100644 index 000000000..4a8a90d6b --- /dev/null +++ b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-euduract.json @@ -0,0 +1,79 @@ +{ + "resourceType": "Observation", + "id": "ee7afc8a-77fd-4394-a475-6171865f7119", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/interventional-clinical-trial-participation" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "OBI" + } + ] + }, + "system": "https://www.charite.de/fhir/CodeSystem/observation-identifiers", + "value": "ecrf_03_InterventionalClinicalTrialsParticipation", + "assigner": { + "reference": "Organization/Charité" + } + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "survey" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes", + "code": "03", + "display": "Participation in interventional clinical trials" + } + ], + "text": "Has the patient participated in one or more interventional clinical trials?" + }, + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-10-16T08:49:21+02:00", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "373066001", + "display": "Yes (qualifier value)" + } + ], + "text": "Patient is enrolled in other studies" + }, + "component": [ + { + "code": { + "coding": [ + { + "system": "https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes", + "code": "04", + "display": "EudraCT Number" + } + ], + "text": "EudraCT (European Union Drug Regulating Authorities Clinical Trials) registration number" + }, + "valueString": "2020-042169-13" + } + ] +} \ No newline at end of file From 6ea6c9ad2f046f5a462aa549ac5a32dccfd681e1 Mon Sep 17 00:00:00 2001 From: Erik Tute <eriktute@mx.de> Date: Wed, 5 May 2021 09:51:32 +0200 Subject: [PATCH 051/141] merged with current develop --- .../fhirbridge/ehr/converter/generic/TimeConverter.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java index f5f05cc8e..05f9a87c6 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java @@ -1,6 +1,7 @@ package org.ehrbase.fhirbridge.ehr.converter.generic; import org.hl7.fhir.r4.model.Condition; +import org.hl7.fhir.r4.model.Consent; import org.hl7.fhir.r4.model.DiagnosticReport; import org.hl7.fhir.r4.model.MedicationStatement; import org.hl7.fhir.r4.model.Observation; @@ -121,4 +122,12 @@ public static Optional<TemporalAccessor> convertMedicationStatementEndTime(Med return Optional.empty(); } } + + public static TemporalAccessor convertConsentTime(Consent resource) { + if (resource.hasDateTime()) { + return resource.getDateTime().toInstant(); + } else { + return OffsetDateTime.now(); + } + } } From b113b183cd63a61818806425df98a5af2b8b258c Mon Sep 17 00:00:00 2001 From: MDSchulze <mareike.schulze@plri.de> Date: Wed, 5 May 2021 14:56:25 +0200 Subject: [PATCH 052/141] mapping done --- ...ragon-clinical-trial-participation-no.json | 162 ++++++++++++ ...cal-trial-participation-notapplicable.json | 162 ++++++++++++ ...-clinical-trial-participation-unknown.json | 162 ++++++++++++ ...l-trial-participation-yes-eudract-nct.json | 246 ++++++++++++++++++ ...nical-trial-participation-yes-eudract.json | 246 ++++++++++++++++++ ...-clinical-trial-participation-yes-nct.json | 246 ++++++++++++++++++ ...rialParticipationCompositionConverter.java | 3 +- ...TrialParticipationEvaluationConverter.java | 71 +++-- .../GECCOStudienteilnahmeComposition.java | 3 +- .../definition/RegisternameDefiningCode.java | 3 +- .../ClinicalTrialParticipationIT.java | 130 +++++++++ ...rticipation-yes-eudract-invalid-code.json} | 2 +- ...icipation-yes-eudract-invalid-system.json} | 17 +- ...ragon-clinical-trial-participation-no.json | 162 ++++++++++++ ...cal-trial-participation-notapplicable.json | 162 ++++++++++++ ...-clinical-trial-participation-unknown.json | 162 ++++++++++++ ...l-trial-participation-yes-eudract-nct.json | 246 ++++++++++++++++++ ...nical-trial-participation-yes-eudract.json | 246 ++++++++++++++++++ ...-clinical-trial-participation-yes-nct.json | 246 ++++++++++++++++++ 19 files changed, 2618 insertions(+), 59 deletions(-) create mode 100644 mappings/paragon-clinical-trial-participation-no.json create mode 100644 mappings/paragon-clinical-trial-participation-notapplicable.json create mode 100644 mappings/paragon-clinical-trial-participation-unknown.json create mode 100644 mappings/paragon-clinical-trial-participation-yes-eudract-nct.json create mode 100644 mappings/paragon-clinical-trial-participation-yes-eudract.json create mode 100644 mappings/paragon-clinical-trial-participation-yes-nct.json create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/observation/ClinicalTrialParticipationIT.java rename src/test/resources/Observation/ClinicalTrialParticipation/{create-clinical-trial-participation-yes-euduract.json => create-clinical-trial-participation-yes-eudract-invalid-code.json} (98%) rename src/test/resources/Observation/ClinicalTrialParticipation/{create-clinical-trial-participation-yes-euduract-nct.json => create-clinical-trial-participation-yes-eudract-invalid-system.json} (79%) create mode 100644 src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-no.json create mode 100644 src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-notapplicable.json create mode 100644 src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-unknown.json create mode 100644 src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-yes-eudract-nct.json create mode 100644 src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-yes-eudract.json create mode 100644 src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-yes-nct.json diff --git a/mappings/paragon-clinical-trial-participation-no.json b/mappings/paragon-clinical-trial-participation-no.json new file mode 100644 index 000000000..57165e11c --- /dev/null +++ b/mappings/paragon-clinical-trial-participation-no.json @@ -0,0 +1,162 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Studienteilnahme" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/1/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "EVALUATION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Item tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Bereits an interventionellen klinischen Studien teilgenommen?" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "No (qualifier value)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "373067005" + } + }, + "archetype_node_id" : "at0002" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-EVALUATION.gecco_study_participation.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/mappings/paragon-clinical-trial-participation-notapplicable.json b/mappings/paragon-clinical-trial-participation-notapplicable.json new file mode 100644 index 000000000..b35daa48c --- /dev/null +++ b/mappings/paragon-clinical-trial-participation-notapplicable.json @@ -0,0 +1,162 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Studienteilnahme" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/3/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "EVALUATION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Item tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Bereits an interventionellen klinischen Studien teilgenommen?" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Not applicable (qualifier value)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "385432009" + } + }, + "archetype_node_id" : "at0002" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-EVALUATION.gecco_study_participation.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/mappings/paragon-clinical-trial-participation-unknown.json b/mappings/paragon-clinical-trial-participation-unknown.json new file mode 100644 index 000000000..4ac155097 --- /dev/null +++ b/mappings/paragon-clinical-trial-participation-unknown.json @@ -0,0 +1,162 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Studienteilnahme" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/1/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "EVALUATION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Item tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Bereits an interventionellen klinischen Studien teilgenommen?" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Unknown (qualifier value)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "261665006" + } + }, + "archetype_node_id" : "at0002" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-EVALUATION.gecco_study_participation.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/mappings/paragon-clinical-trial-participation-yes-eudract-nct.json b/mappings/paragon-clinical-trial-participation-yes-eudract-nct.json new file mode 100644 index 000000000..dc747d8d2 --- /dev/null +++ b/mappings/paragon-clinical-trial-participation-yes-eudract-nct.json @@ -0,0 +1,246 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Studienteilnahme" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/3/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "EVALUATION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Item tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Bereits an interventionellen klinischen Studien teilgenommen?" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Yes (qualifier value)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "373066001" + } + }, + "archetype_node_id" : "at0002" + }, { + "_type" : "CLUSTER", + "name" : { + "_type" : "DV_TEXT", + "value" : "Studienteilnahme" + }, + "items" : [ { + "_type" : "CLUSTER", + "name" : { + "_type" : "DV_TEXT", + "value" : "Studie/Prüfung" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Titel der Studie/Prüfung" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Participation in interventional clinical trials", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "eCRF" + }, + "code_string" : "03" + } + }, + "archetype_node_id" : "at0001" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Beschreibung" + }, + "value" : { + "_type" : "DV_TEXT", + "value" : "Has the patient participated in one or more interventional clinical trials?" + }, + "archetype_node_id" : "at0004" + }, { + "_type" : "CLUSTER", + "name" : { + "_type" : "DV_TEXT", + "value" : "Registrierung" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Registername" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "NCT number", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "eCRF" + }, + "code_string" : "05" + } + }, + "archetype_node_id" : "at0035" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Registrierungsnummer" + }, + "value" : { + "_type" : "DV_TEXT", + "value" : "NCT00001016" + }, + "archetype_node_id" : "at0034" + } ], + "archetype_node_id" : "at0033" + } ], + "archetype_node_id" : "openEHR-EHR-CLUSTER.study_details.v1" + } ], + "archetype_node_id" : "openEHR-EHR-CLUSTER.study_participation.v1" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-EVALUATION.gecco_study_participation.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/mappings/paragon-clinical-trial-participation-yes-eudract.json b/mappings/paragon-clinical-trial-participation-yes-eudract.json new file mode 100644 index 000000000..e1d9a3272 --- /dev/null +++ b/mappings/paragon-clinical-trial-participation-yes-eudract.json @@ -0,0 +1,246 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Studienteilnahme" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/1/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "EVALUATION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Item tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Bereits an interventionellen klinischen Studien teilgenommen?" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Yes (qualifier value)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "373066001" + } + }, + "archetype_node_id" : "at0002" + }, { + "_type" : "CLUSTER", + "name" : { + "_type" : "DV_TEXT", + "value" : "Studienteilnahme" + }, + "items" : [ { + "_type" : "CLUSTER", + "name" : { + "_type" : "DV_TEXT", + "value" : "Studie/Prüfung" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Titel der Studie/Prüfung" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Participation in interventional clinical trials", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "eCRF" + }, + "code_string" : "03" + } + }, + "archetype_node_id" : "at0001" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Beschreibung" + }, + "value" : { + "_type" : "DV_TEXT", + "value" : "Has the patient participated in one or more interventional clinical trials?" + }, + "archetype_node_id" : "at0004" + }, { + "_type" : "CLUSTER", + "name" : { + "_type" : "DV_TEXT", + "value" : "Registrierung" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Registername" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "EudraCT Number", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "eCRF" + }, + "code_string" : "04" + } + }, + "archetype_node_id" : "at0035" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Registrierungsnummer" + }, + "value" : { + "_type" : "DV_TEXT", + "value" : "2020-042169-13" + }, + "archetype_node_id" : "at0034" + } ], + "archetype_node_id" : "at0033" + } ], + "archetype_node_id" : "openEHR-EHR-CLUSTER.study_details.v1" + } ], + "archetype_node_id" : "openEHR-EHR-CLUSTER.study_participation.v1" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-EVALUATION.gecco_study_participation.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/mappings/paragon-clinical-trial-participation-yes-nct.json b/mappings/paragon-clinical-trial-participation-yes-nct.json new file mode 100644 index 000000000..bf49c8555 --- /dev/null +++ b/mappings/paragon-clinical-trial-participation-yes-nct.json @@ -0,0 +1,246 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Studienteilnahme" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/1/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "EVALUATION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Item tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Bereits an interventionellen klinischen Studien teilgenommen?" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Yes (qualifier value)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "373066001" + } + }, + "archetype_node_id" : "at0002" + }, { + "_type" : "CLUSTER", + "name" : { + "_type" : "DV_TEXT", + "value" : "Studienteilnahme" + }, + "items" : [ { + "_type" : "CLUSTER", + "name" : { + "_type" : "DV_TEXT", + "value" : "Studie/Prüfung" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Titel der Studie/Prüfung" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Participation in interventional clinical trials", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "eCRF" + }, + "code_string" : "03" + } + }, + "archetype_node_id" : "at0001" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Beschreibung" + }, + "value" : { + "_type" : "DV_TEXT", + "value" : "Has the patient participated in one or more interventional clinical trials?" + }, + "archetype_node_id" : "at0004" + }, { + "_type" : "CLUSTER", + "name" : { + "_type" : "DV_TEXT", + "value" : "Registrierung" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Registername" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "NCT number", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "eCRF" + }, + "code_string" : "05" + } + }, + "archetype_node_id" : "at0035" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Registrierungsnummer" + }, + "value" : { + "_type" : "DV_TEXT", + "value" : "NCT00001016" + }, + "archetype_node_id" : "at0034" + } ], + "archetype_node_id" : "at0033" + } ], + "archetype_node_id" : "openEHR-EHR-CLUSTER.study_details.v1" + } ], + "archetype_node_id" : "openEHR-EHR-CLUSTER.study_participation.v1" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-EVALUATION.gecco_study_participation.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationCompositionConverter.java index 8183e0027..ab3e2fa06 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationCompositionConverter.java @@ -5,11 +5,12 @@ import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.GECCOStudienteilnahmeComposition; import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.StatusDefiningCode; import org.hl7.fhir.r4.model.Observation; +import org.springframework.lang.NonNull; public class ClinicalTrialParticipationCompositionConverter extends ObservationToCompositionConverter<GECCOStudienteilnahmeComposition> { @Override - protected GECCOStudienteilnahmeComposition convertInternal(Observation resource) { + protected GECCOStudienteilnahmeComposition convertInternal(@NonNull Observation resource) { GECCOStudienteilnahmeComposition composition = new GECCOStudienteilnahmeComposition(); mapStatus(composition, resource); composition.setGeccoStudienteilnahme(new ClinicalTrialParticipationEvaluationConverter().convert(resource)); diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java index 04c460a1e..03e14d49e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java @@ -2,7 +2,13 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.ehrbase.fhirbridge.ehr.converter.generic.ObservationToEvaluationConverter; -import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.*; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.GeccoStudienteilnahmeEvaluation; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.StudiePruefungCluster; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.StudienteilnahmeCluster; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.StudiePruefungRegistrierungCluster; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.TitelDerStudiePruefungDefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.RegisternameDefiningCode; import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.Observation; @@ -12,15 +18,19 @@ public class ClinicalTrialParticipationEvaluationConverter extends ObservationToEvaluationConverter<GeccoStudienteilnahmeEvaluation> { - public GeccoStudienteilnahmeEvaluation convertInternal(Observation resource) { + @Override + protected GeccoStudienteilnahmeEvaluation convertInternal(Observation resource) { GeccoStudienteilnahmeEvaluation geccoStudienteilnahmeEvaluation = new GeccoStudienteilnahmeEvaluation(); - String code = getSnomedCodeObservation(resource); + String code_participated = getSnomedCodeObservation(resource); - switch(code) { + boolean hasStudy = false; + + switch(code_participated){ case "373066001": geccoStudienteilnahmeEvaluation.setBereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.YES_QUALIFIER_VALUE); + hasStudy = true; break; case "373067005": geccoStudienteilnahmeEvaluation.setBereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.NO_QUALIFIER_VALUE); @@ -38,37 +48,23 @@ public GeccoStudienteilnahmeEvaluation convertInternal(Observation resource) { throw new UnprocessableEntityException("Value code " + resource.getValueCodeableConcept().getCoding().get(0).getCode() + " is not supported"); } - StudienteilnahmeCluster studienteilnahmeCluster = new StudienteilnahmeCluster(); - geccoStudienteilnahmeEvaluation.setStudienteilnahme(studienteilnahmeCluster); + if(hasStudy){ - StudiePruefungCluster studiePruefungCluster = new StudiePruefungCluster(); - studienteilnahmeCluster.setStudiePruefung(studiePruefungCluster); + StudienteilnahmeCluster studienteilnahmeCluster = new StudienteilnahmeCluster(); + geccoStudienteilnahmeEvaluation.setStudienteilnahme(studienteilnahmeCluster); - studiePruefungCluster.setTitelDerStudiePruefungDefiningCode(TitelDerStudiePruefungDefiningCode.PARTICIPATION_IN_INTERVENTIONAL_CLINICAL_TRIALS); - studiePruefungCluster.setBeschreibungValue(resource.getValueStringType().getValue()); + StudiePruefungCluster studiePruefungCluster = new StudiePruefungCluster(); + studienteilnahmeCluster.setStudiePruefung(studiePruefungCluster); - studiePruefungCluster.setRegistrierung(convertInternalEvents(resource)); + studiePruefungCluster.setTitelDerStudiePruefungDefiningCode(TitelDerStudiePruefungDefiningCode.PARTICIPATION_IN_INTERVENTIONAL_CLINICAL_TRIALS); - String code2 = getSnomedCodeObservation(resource); + if(!resource.getCode().getText().isEmpty()){ + studiePruefungCluster.setBeschreibungValue(resource.getCode().getText()); + } - switch(code2) { - case "373066001": - studienteilnahmeCluster.setBestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieDefiningCode(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.YES_QUALIFIER_VALUE); - break; - case "373067005": - studienteilnahmeCluster.setBestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieDefiningCode(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.NO_QUALIFIER_VALUE); - break; - case "261665006": - studienteilnahmeCluster.setBestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieDefiningCode(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.UNKNOWN_QUALIFIER_VALUE); - break; - case "74964007": - studienteilnahmeCluster.setBestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieDefiningCode(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.OTHER_QUALIFIER_VALUE); - break; - case "385432009": - studienteilnahmeCluster.setBestaetigteCovid19DiagnoseAlsHauptursacheFuerAufnahmeInStudieDefiningCode(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.NOT_APPLICABLE_QUALIFIER_VALUE); - break; - default: - throw new UnprocessableEntityException("Value code " + resource.getValueCodeableConcept().getCoding().get(0).getCode() + " is not supported"); + if(!resource.getComponent().isEmpty()){ + studiePruefungCluster.setRegistrierung(convertInternalEvents(resource)); + } } return geccoStudienteilnahmeEvaluation; @@ -81,17 +77,12 @@ private List<StudiePruefungRegistrierungCluster> convertInternalEvents(Observati for (Observation.ObservationComponentComponent observationComponent : resource.getComponent()) { - if(resource.getValueCodeableConcept().getCoding().get(0).getCode() == "05") - { - studiePruefungRegistrierungCluster.setRegisternameDefiningCode(RegisternameDefiningCode.NCT_NUMBER); - } - else if(resource.getValueCodeableConcept().getCoding().get(0).getCode() == "04") - { + if(observationComponent.getCode().getCoding().get(0).getCode().equals("04")) { studiePruefungRegistrierungCluster.setRegisternameDefiningCode(RegisternameDefiningCode.EUDRACT_NUMBER); - } - else - { - throw new UnprocessableEntityException("value code " + resource.getValueCodeableConcept().getCoding().get(0).getCode() + " is not supported"); + }else if(observationComponent.getCode().getCoding().get(0).getCode().equals("05")) { + studiePruefungRegistrierungCluster.setRegisternameDefiningCode(RegisternameDefiningCode.NCT_NUMBER); + }else{ + throw new UnprocessableEntityException("value code " + observationComponent.getCode().getCoding().get(0).getCode() + " is not supported"); } studiePruefungRegistrierungCluster.setRegistrierungsnummerValue(observationComponent.getValueStringType().getValue()); diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeComposition.java index 36b4df201..aa3eb7908 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeComposition.java @@ -21,6 +21,7 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; +import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.GeccoStudienteilnahmeEvaluation; import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.GeccoStudienteilnahmeKategorieElement; import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.StatusDefiningCode; @@ -33,7 +34,7 @@ comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @Template("GECCO_Studienteilnahme") -public class GECCOStudienteilnahmeComposition implements CompositionEntity { +public class GECCOStudienteilnahmeComposition implements CompositionEntity, Composition { /** * Path: GECCO_Studienteilnahme/category */ diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/RegisternameDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/RegisternameDefiningCode.java index 65734de86..d340bb085 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/RegisternameDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/definition/RegisternameDefiningCode.java @@ -6,7 +6,8 @@ public enum RegisternameDefiningCode implements EnumValueSet { NCT_NUMBER("NCT number", "", "eCRF", "05"), - EUDRACT_NUMBER("EudraCT Number‎", "", "eCRF", "04"); + EUDRACT_NUMBER("EudraCT Number", "", "eCRF", "04"); + //EUDRACT_NUMBER("EudraCT Number‎", "", "eCRF", "04"); private String value; diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ClinicalTrialParticipationIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ClinicalTrialParticipationIT.java new file mode 100644 index 000000000..fd100d5e1 --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ClinicalTrialParticipationIT.java @@ -0,0 +1,130 @@ +package org.ehrbase.fhirbridge.fhir.observation; + +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import org.ehrbase.fhirbridge.comparators.CustomTemporalAcessorComparator; +import org.ehrbase.fhirbridge.ehr.converter.specific.clinicaltrialparticipation.ClinicalTrialParticipationCompositionConverter; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.GECCOStudienteilnahmeComposition; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.GeccoStudienteilnahmeEvaluation; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.StudiePruefungCluster; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.StudiePruefungRegistrierungCluster; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.StudienteilnahmeCluster; +import org.ehrbase.fhirbridge.fhir.AbstractMappingTestSetupIT; +import org.hl7.fhir.r4.model.Observation; +import org.javers.core.Javers; +import org.javers.core.JaversBuilder; +import org.javers.core.diff.Diff; +import org.javers.core.metamodel.clazz.ValueObjectDefinition; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.time.temporal.TemporalAccessor; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +public class ClinicalTrialParticipationIT extends AbstractMappingTestSetupIT { + + public ClinicalTrialParticipationIT() { + super("Observation/ClinicalTrialParticipation/", Observation.class); //fhir-Resource + } + + @Test + void ClinicalTrialParticipation() throws IOException { + create("create-clinical-trial-participation-yes-eudract.json"); + } + + // ##################################################################################### + // check payload + + @Test + void mappingYesEudraCT() throws IOException { + testMapping("create-clinical-trial-participation-yes-eudract.json", + "paragon-clinical-trial-participation-yes-eudract.json"); + } + + @Test + void mappingYesEudraCTNCT() throws IOException { + testMapping("create-clinical-trial-participation-yes-eudract-nct.json", + "paragon-clinical-trial-participation-yes-eudract-nct.json"); + } + + @Test + void mappingYesNCT() throws IOException { + testMapping("create-clinical-trial-participation-yes-nct.json", + "paragon-clinical-trial-participation-yes-nct.json"); + } + + @Test + void mappingNo() throws IOException { + testMapping("create-clinical-trial-participation-no.json", + "paragon-clinical-trial-participation-no.json"); + } + + @Test + void mappingUnknown() throws IOException { + testMapping("create-clinical-trial-participation-unknown.json", + "paragon-clinical-trial-participation-unknown.json"); + } + + /* Beispiel existiert nicht (selber generieren?) + @Test + void mappingOther() throws IOException { + + }*/ + + @Test + void mappingNotApplicable() throws IOException { + testMapping("create-clinical-trial-participation-notapplicable.json", + "paragon-clinical-trial-participation-notapplicable.json"); + } + + // ##################################################################################### + // check exceptions + + @Test + void createInvalidSystem() throws IOException { + // copy of yes-eudract, manipulated line 71 + Exception exception = executeMappingException("create-clinical-trial-participation-yes-eudract-invalid-system.json"); + assertEquals("The system is not correct. It should be 'http://snomed.info/sct', but it was 'http://loinc.org'.", exception.getMessage()); + } + + @Test + void createInvalidCode() throws IOException { + // copy of yes-eudract, manipulated line 70 + Exception exception = executeMappingException("create-clinical-trial-participation-yes-eudract-invalid-code.json"); + assertEquals("value code 99 is not supported", exception.getMessage()); + } + + // ##################################################################################### + // default + + @Override + public Javers getJavers() { + return JaversBuilder.javers() + .registerValue(TemporalAccessor.class, new CustomTemporalAcessorComparator()) + .registerValueObject(new ValueObjectDefinition(GECCOStudienteilnahmeComposition.class, List.of("location", "feederAudit"))) + .registerValueObject(GeccoStudienteilnahmeEvaluation.class) + .registerValueObject(StudienteilnahmeCluster.class) + .registerValueObject(StudiePruefungCluster.class) + .registerValueObject(StudiePruefungRegistrierungCluster.class) + .build(); + } + + @Override + public Exception executeMappingException(String path) throws IOException { + Observation obs = (Observation) testFileLoader.loadResource(path); + return assertThrows(UnprocessableEntityException.class, () -> + new ClinicalTrialParticipationCompositionConverter().convert(obs) + ); + } + + @Override + public void testMapping(String resourcePath, String paragonPath) throws IOException { + Observation observation = (Observation) super.testFileLoader.loadResource(resourcePath); + ClinicalTrialParticipationCompositionConverter clinicalTrialParticipationCompositionConverter = new ClinicalTrialParticipationCompositionConverter(); + GECCOStudienteilnahmeComposition mapped = clinicalTrialParticipationCompositionConverter.convert(observation); + Diff diff = compareCompositions(getJavers(), paragonPath, mapped); + assertEquals(0, diff.getChanges().size()); + } +} \ No newline at end of file diff --git a/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-euduract.json b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-eudract-invalid-code.json similarity index 98% rename from src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-euduract.json rename to src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-eudract-invalid-code.json index 4a8a90d6b..882ef002c 100644 --- a/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-euduract.json +++ b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-eudract-invalid-code.json @@ -67,7 +67,7 @@ "coding": [ { "system": "https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes", - "code": "04", + "code": "99", "display": "EudraCT Number" } ], diff --git a/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-euduract-nct.json b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-eudract-invalid-system.json similarity index 79% rename from src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-euduract-nct.json rename to src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-eudract-invalid-system.json index 308f16003..4d380e8f2 100644 --- a/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-euduract-nct.json +++ b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-eudract-invalid-system.json @@ -1,6 +1,6 @@ { "resourceType": "Observation", - "id": "571c047d-3689-4fb7-9292-c1d71faecf72", + "id": "ee7afc8a-77fd-4394-a475-6171865f7119", "meta": { "profile": [ "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/interventional-clinical-trial-participation" @@ -54,7 +54,7 @@ "valueCodeableConcept": { "coding": [ { - "system": "http://snomed.info/sct", + "system": "http://loinc.org", "code": "373066001", "display": "Yes (qualifier value)" } @@ -74,19 +74,6 @@ "text": "EudraCT (European Union Drug Regulating Authorities Clinical Trials) registration number" }, "valueString": "2020-042169-13" - }, - { - "code": { - "coding": [ - { - "system": "https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes", - "code": "05", - "display": "NCT number" - } - ], - "text": "A unique identification code given to each clinical study registered on ClinicalTrials.gov" - }, - "valueString": "NCT00001016" } ] } \ No newline at end of file diff --git a/src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-no.json b/src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-no.json new file mode 100644 index 000000000..57165e11c --- /dev/null +++ b/src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-no.json @@ -0,0 +1,162 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Studienteilnahme" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/1/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "EVALUATION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Item tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Bereits an interventionellen klinischen Studien teilgenommen?" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "No (qualifier value)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "373067005" + } + }, + "archetype_node_id" : "at0002" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-EVALUATION.gecco_study_participation.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-notapplicable.json b/src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-notapplicable.json new file mode 100644 index 000000000..b35daa48c --- /dev/null +++ b/src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-notapplicable.json @@ -0,0 +1,162 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Studienteilnahme" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/3/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "EVALUATION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Item tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Bereits an interventionellen klinischen Studien teilgenommen?" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Not applicable (qualifier value)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "385432009" + } + }, + "archetype_node_id" : "at0002" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-EVALUATION.gecco_study_participation.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-unknown.json b/src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-unknown.json new file mode 100644 index 000000000..4ac155097 --- /dev/null +++ b/src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-unknown.json @@ -0,0 +1,162 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Studienteilnahme" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/1/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "EVALUATION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Item tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Bereits an interventionellen klinischen Studien teilgenommen?" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Unknown (qualifier value)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "261665006" + } + }, + "archetype_node_id" : "at0002" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-EVALUATION.gecco_study_participation.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-yes-eudract-nct.json b/src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-yes-eudract-nct.json new file mode 100644 index 000000000..dc747d8d2 --- /dev/null +++ b/src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-yes-eudract-nct.json @@ -0,0 +1,246 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Studienteilnahme" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/3/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "EVALUATION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Item tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Bereits an interventionellen klinischen Studien teilgenommen?" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Yes (qualifier value)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "373066001" + } + }, + "archetype_node_id" : "at0002" + }, { + "_type" : "CLUSTER", + "name" : { + "_type" : "DV_TEXT", + "value" : "Studienteilnahme" + }, + "items" : [ { + "_type" : "CLUSTER", + "name" : { + "_type" : "DV_TEXT", + "value" : "Studie/Prüfung" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Titel der Studie/Prüfung" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Participation in interventional clinical trials", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "eCRF" + }, + "code_string" : "03" + } + }, + "archetype_node_id" : "at0001" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Beschreibung" + }, + "value" : { + "_type" : "DV_TEXT", + "value" : "Has the patient participated in one or more interventional clinical trials?" + }, + "archetype_node_id" : "at0004" + }, { + "_type" : "CLUSTER", + "name" : { + "_type" : "DV_TEXT", + "value" : "Registrierung" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Registername" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "NCT number", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "eCRF" + }, + "code_string" : "05" + } + }, + "archetype_node_id" : "at0035" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Registrierungsnummer" + }, + "value" : { + "_type" : "DV_TEXT", + "value" : "NCT00001016" + }, + "archetype_node_id" : "at0034" + } ], + "archetype_node_id" : "at0033" + } ], + "archetype_node_id" : "openEHR-EHR-CLUSTER.study_details.v1" + } ], + "archetype_node_id" : "openEHR-EHR-CLUSTER.study_participation.v1" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-EVALUATION.gecco_study_participation.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-yes-eudract.json b/src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-yes-eudract.json new file mode 100644 index 000000000..e1d9a3272 --- /dev/null +++ b/src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-yes-eudract.json @@ -0,0 +1,246 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Studienteilnahme" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/1/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "EVALUATION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Item tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Bereits an interventionellen klinischen Studien teilgenommen?" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Yes (qualifier value)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "373066001" + } + }, + "archetype_node_id" : "at0002" + }, { + "_type" : "CLUSTER", + "name" : { + "_type" : "DV_TEXT", + "value" : "Studienteilnahme" + }, + "items" : [ { + "_type" : "CLUSTER", + "name" : { + "_type" : "DV_TEXT", + "value" : "Studie/Prüfung" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Titel der Studie/Prüfung" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Participation in interventional clinical trials", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "eCRF" + }, + "code_string" : "03" + } + }, + "archetype_node_id" : "at0001" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Beschreibung" + }, + "value" : { + "_type" : "DV_TEXT", + "value" : "Has the patient participated in one or more interventional clinical trials?" + }, + "archetype_node_id" : "at0004" + }, { + "_type" : "CLUSTER", + "name" : { + "_type" : "DV_TEXT", + "value" : "Registrierung" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Registername" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "EudraCT Number", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "eCRF" + }, + "code_string" : "04" + } + }, + "archetype_node_id" : "at0035" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Registrierungsnummer" + }, + "value" : { + "_type" : "DV_TEXT", + "value" : "2020-042169-13" + }, + "archetype_node_id" : "at0034" + } ], + "archetype_node_id" : "at0033" + } ], + "archetype_node_id" : "openEHR-EHR-CLUSTER.study_details.v1" + } ], + "archetype_node_id" : "openEHR-EHR-CLUSTER.study_participation.v1" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-EVALUATION.gecco_study_participation.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-yes-nct.json b/src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-yes-nct.json new file mode 100644 index 000000000..bf49c8555 --- /dev/null +++ b/src/test/resources/Observation/ClinicalTrialParticipation/paragon-clinical-trial-participation-yes-nct.json @@ -0,0 +1,246 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "GECCO_Studienteilnahme" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/1/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-16T08:49:21+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + }, + "other_context" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Status" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "final", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "local" + }, + "code_string" : "at0012" + } + }, + "archetype_node_id" : "at0004" + } ], + "archetype_node_id" : "at0001" + } + }, + "content" : [ { + "_type" : "EVALUATION", + "name" : { + "_type" : "DV_TEXT", + "value" : "GECCO_Studienteilnahme" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Item tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Bereits an interventionellen klinischen Studien teilgenommen?" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Yes (qualifier value)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "373066001" + } + }, + "archetype_node_id" : "at0002" + }, { + "_type" : "CLUSTER", + "name" : { + "_type" : "DV_TEXT", + "value" : "Studienteilnahme" + }, + "items" : [ { + "_type" : "CLUSTER", + "name" : { + "_type" : "DV_TEXT", + "value" : "Studie/Prüfung" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Titel der Studie/Prüfung" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Participation in interventional clinical trials", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "eCRF" + }, + "code_string" : "03" + } + }, + "archetype_node_id" : "at0001" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Beschreibung" + }, + "value" : { + "_type" : "DV_TEXT", + "value" : "Has the patient participated in one or more interventional clinical trials?" + }, + "archetype_node_id" : "at0004" + }, { + "_type" : "CLUSTER", + "name" : { + "_type" : "DV_TEXT", + "value" : "Registrierung" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Registername" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "NCT number", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "eCRF" + }, + "code_string" : "05" + } + }, + "archetype_node_id" : "at0035" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Registrierungsnummer" + }, + "value" : { + "_type" : "DV_TEXT", + "value" : "NCT00001016" + }, + "archetype_node_id" : "at0034" + } ], + "archetype_node_id" : "at0033" + } ], + "archetype_node_id" : "openEHR-EHR-CLUSTER.study_details.v1" + } ], + "archetype_node_id" : "openEHR-EHR-CLUSTER.study_participation.v1" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-EVALUATION.gecco_study_participation.v0" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file From be0158797c2cc4a35a95814fb6b5822d4c4a7313 Mon Sep 17 00:00:00 2001 From: MDSchulze <mareike.schulze@plri.de> Date: Wed, 5 May 2021 15:08:43 +0200 Subject: [PATCH 053/141] duplicated mappings folder deleted --- ...ragon-clinical-trial-participation-no.json | 162 ------------ ...cal-trial-participation-notapplicable.json | 162 ------------ ...-clinical-trial-participation-unknown.json | 162 ------------ ...l-trial-participation-yes-eudract-nct.json | 246 ------------------ ...nical-trial-participation-yes-eudract.json | 246 ------------------ ...-clinical-trial-participation-yes-nct.json | 246 ------------------ 6 files changed, 1224 deletions(-) delete mode 100644 mappings/paragon-clinical-trial-participation-no.json delete mode 100644 mappings/paragon-clinical-trial-participation-notapplicable.json delete mode 100644 mappings/paragon-clinical-trial-participation-unknown.json delete mode 100644 mappings/paragon-clinical-trial-participation-yes-eudract-nct.json delete mode 100644 mappings/paragon-clinical-trial-participation-yes-eudract.json delete mode 100644 mappings/paragon-clinical-trial-participation-yes-nct.json diff --git a/mappings/paragon-clinical-trial-participation-no.json b/mappings/paragon-clinical-trial-participation-no.json deleted file mode 100644 index 57165e11c..000000000 --- a/mappings/paragon-clinical-trial-participation-no.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "_type" : "COMPOSITION", - "name" : { - "_type" : "DV_TEXT", - "value" : "GECCO_Studienteilnahme" - }, - "archetype_details" : { - "archetype_id" : { - "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" - }, - "template_id" : { - "value" : "GECCO_Studienteilnahme" - }, - "rm_version" : "1.0.4" - }, - "feeder_audit" : { - "_type" : "FEEDER_AUDIT", - "originating_system_item_ids" : [ { - "_type" : "DV_IDENTIFIER", - "id" : "Observation/1/_history/1", - "type" : "fhir_logical_id" - } ], - "originating_system_audit" : { - "_type" : "FEEDER_AUDIT_DETAILS", - "system_id" : "FHIR-Bridge" - } - }, - "language" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "ISO_639-1" - }, - "code_string" : "de" - }, - "territory" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "ISO_3166-1" - }, - "code_string" : "DE" - }, - "category" : { - "_type" : "DV_CODED_TEXT", - "value" : "event", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "openehr" - }, - "code_string" : "433" - } - }, - "composer" : { - "_type" : "PARTY_SELF" - }, - "context" : { - "_type" : "EVENT_CONTEXT", - "start_time" : { - "_type" : "DV_DATE_TIME", - "value" : "2020-10-16T08:49:21+02:00" - }, - "setting" : { - "_type" : "DV_CODED_TEXT", - "value" : "secondary medical care", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "openehr" - }, - "code_string" : "232" - } - }, - "other_context" : { - "_type" : "ITEM_TREE", - "name" : { - "_type" : "DV_TEXT", - "value" : "Baum" - }, - "items" : [ { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Status" - }, - "value" : { - "_type" : "DV_CODED_TEXT", - "value" : "final", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "local" - }, - "code_string" : "at0012" - } - }, - "archetype_node_id" : "at0004" - } ], - "archetype_node_id" : "at0001" - } - }, - "content" : [ { - "_type" : "EVALUATION", - "name" : { - "_type" : "DV_TEXT", - "value" : "GECCO_Studienteilnahme" - }, - "language" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "ISO_639-1" - }, - "code_string" : "de" - }, - "encoding" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "IANA_character-sets" - }, - "code_string" : "UTF-8" - }, - "subject" : { - "_type" : "PARTY_SELF" - }, - "data" : { - "_type" : "ITEM_TREE", - "name" : { - "_type" : "DV_TEXT", - "value" : "Item tree" - }, - "items" : [ { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Bereits an interventionellen klinischen Studien teilgenommen?" - }, - "value" : { - "_type" : "DV_CODED_TEXT", - "value" : "No (qualifier value)", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "SNOMED Clinical Terms" - }, - "code_string" : "373067005" - } - }, - "archetype_node_id" : "at0002" - } ], - "archetype_node_id" : "at0001" - }, - "archetype_node_id" : "openEHR-EHR-EVALUATION.gecco_study_participation.v0" - } ], - "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" -} \ No newline at end of file diff --git a/mappings/paragon-clinical-trial-participation-notapplicable.json b/mappings/paragon-clinical-trial-participation-notapplicable.json deleted file mode 100644 index b35daa48c..000000000 --- a/mappings/paragon-clinical-trial-participation-notapplicable.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "_type" : "COMPOSITION", - "name" : { - "_type" : "DV_TEXT", - "value" : "GECCO_Studienteilnahme" - }, - "archetype_details" : { - "archetype_id" : { - "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" - }, - "template_id" : { - "value" : "GECCO_Studienteilnahme" - }, - "rm_version" : "1.0.4" - }, - "feeder_audit" : { - "_type" : "FEEDER_AUDIT", - "originating_system_item_ids" : [ { - "_type" : "DV_IDENTIFIER", - "id" : "Observation/3/_history/1", - "type" : "fhir_logical_id" - } ], - "originating_system_audit" : { - "_type" : "FEEDER_AUDIT_DETAILS", - "system_id" : "FHIR-Bridge" - } - }, - "language" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "ISO_639-1" - }, - "code_string" : "de" - }, - "territory" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "ISO_3166-1" - }, - "code_string" : "DE" - }, - "category" : { - "_type" : "DV_CODED_TEXT", - "value" : "event", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "openehr" - }, - "code_string" : "433" - } - }, - "composer" : { - "_type" : "PARTY_SELF" - }, - "context" : { - "_type" : "EVENT_CONTEXT", - "start_time" : { - "_type" : "DV_DATE_TIME", - "value" : "2020-10-16T08:49:21+02:00" - }, - "setting" : { - "_type" : "DV_CODED_TEXT", - "value" : "secondary medical care", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "openehr" - }, - "code_string" : "232" - } - }, - "other_context" : { - "_type" : "ITEM_TREE", - "name" : { - "_type" : "DV_TEXT", - "value" : "Baum" - }, - "items" : [ { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Status" - }, - "value" : { - "_type" : "DV_CODED_TEXT", - "value" : "final", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "local" - }, - "code_string" : "at0012" - } - }, - "archetype_node_id" : "at0004" - } ], - "archetype_node_id" : "at0001" - } - }, - "content" : [ { - "_type" : "EVALUATION", - "name" : { - "_type" : "DV_TEXT", - "value" : "GECCO_Studienteilnahme" - }, - "language" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "ISO_639-1" - }, - "code_string" : "de" - }, - "encoding" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "IANA_character-sets" - }, - "code_string" : "UTF-8" - }, - "subject" : { - "_type" : "PARTY_SELF" - }, - "data" : { - "_type" : "ITEM_TREE", - "name" : { - "_type" : "DV_TEXT", - "value" : "Item tree" - }, - "items" : [ { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Bereits an interventionellen klinischen Studien teilgenommen?" - }, - "value" : { - "_type" : "DV_CODED_TEXT", - "value" : "Not applicable (qualifier value)", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "SNOMED Clinical Terms" - }, - "code_string" : "385432009" - } - }, - "archetype_node_id" : "at0002" - } ], - "archetype_node_id" : "at0001" - }, - "archetype_node_id" : "openEHR-EHR-EVALUATION.gecco_study_participation.v0" - } ], - "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" -} \ No newline at end of file diff --git a/mappings/paragon-clinical-trial-participation-unknown.json b/mappings/paragon-clinical-trial-participation-unknown.json deleted file mode 100644 index 4ac155097..000000000 --- a/mappings/paragon-clinical-trial-participation-unknown.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "_type" : "COMPOSITION", - "name" : { - "_type" : "DV_TEXT", - "value" : "GECCO_Studienteilnahme" - }, - "archetype_details" : { - "archetype_id" : { - "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" - }, - "template_id" : { - "value" : "GECCO_Studienteilnahme" - }, - "rm_version" : "1.0.4" - }, - "feeder_audit" : { - "_type" : "FEEDER_AUDIT", - "originating_system_item_ids" : [ { - "_type" : "DV_IDENTIFIER", - "id" : "Observation/1/_history/1", - "type" : "fhir_logical_id" - } ], - "originating_system_audit" : { - "_type" : "FEEDER_AUDIT_DETAILS", - "system_id" : "FHIR-Bridge" - } - }, - "language" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "ISO_639-1" - }, - "code_string" : "de" - }, - "territory" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "ISO_3166-1" - }, - "code_string" : "DE" - }, - "category" : { - "_type" : "DV_CODED_TEXT", - "value" : "event", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "openehr" - }, - "code_string" : "433" - } - }, - "composer" : { - "_type" : "PARTY_SELF" - }, - "context" : { - "_type" : "EVENT_CONTEXT", - "start_time" : { - "_type" : "DV_DATE_TIME", - "value" : "2020-10-16T08:49:21+02:00" - }, - "setting" : { - "_type" : "DV_CODED_TEXT", - "value" : "secondary medical care", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "openehr" - }, - "code_string" : "232" - } - }, - "other_context" : { - "_type" : "ITEM_TREE", - "name" : { - "_type" : "DV_TEXT", - "value" : "Baum" - }, - "items" : [ { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Status" - }, - "value" : { - "_type" : "DV_CODED_TEXT", - "value" : "final", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "local" - }, - "code_string" : "at0012" - } - }, - "archetype_node_id" : "at0004" - } ], - "archetype_node_id" : "at0001" - } - }, - "content" : [ { - "_type" : "EVALUATION", - "name" : { - "_type" : "DV_TEXT", - "value" : "GECCO_Studienteilnahme" - }, - "language" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "ISO_639-1" - }, - "code_string" : "de" - }, - "encoding" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "IANA_character-sets" - }, - "code_string" : "UTF-8" - }, - "subject" : { - "_type" : "PARTY_SELF" - }, - "data" : { - "_type" : "ITEM_TREE", - "name" : { - "_type" : "DV_TEXT", - "value" : "Item tree" - }, - "items" : [ { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Bereits an interventionellen klinischen Studien teilgenommen?" - }, - "value" : { - "_type" : "DV_CODED_TEXT", - "value" : "Unknown (qualifier value)", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "SNOMED Clinical Terms" - }, - "code_string" : "261665006" - } - }, - "archetype_node_id" : "at0002" - } ], - "archetype_node_id" : "at0001" - }, - "archetype_node_id" : "openEHR-EHR-EVALUATION.gecco_study_participation.v0" - } ], - "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" -} \ No newline at end of file diff --git a/mappings/paragon-clinical-trial-participation-yes-eudract-nct.json b/mappings/paragon-clinical-trial-participation-yes-eudract-nct.json deleted file mode 100644 index dc747d8d2..000000000 --- a/mappings/paragon-clinical-trial-participation-yes-eudract-nct.json +++ /dev/null @@ -1,246 +0,0 @@ -{ - "_type" : "COMPOSITION", - "name" : { - "_type" : "DV_TEXT", - "value" : "GECCO_Studienteilnahme" - }, - "archetype_details" : { - "archetype_id" : { - "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" - }, - "template_id" : { - "value" : "GECCO_Studienteilnahme" - }, - "rm_version" : "1.0.4" - }, - "feeder_audit" : { - "_type" : "FEEDER_AUDIT", - "originating_system_item_ids" : [ { - "_type" : "DV_IDENTIFIER", - "id" : "Observation/3/_history/1", - "type" : "fhir_logical_id" - } ], - "originating_system_audit" : { - "_type" : "FEEDER_AUDIT_DETAILS", - "system_id" : "FHIR-Bridge" - } - }, - "language" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "ISO_639-1" - }, - "code_string" : "de" - }, - "territory" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "ISO_3166-1" - }, - "code_string" : "DE" - }, - "category" : { - "_type" : "DV_CODED_TEXT", - "value" : "event", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "openehr" - }, - "code_string" : "433" - } - }, - "composer" : { - "_type" : "PARTY_SELF" - }, - "context" : { - "_type" : "EVENT_CONTEXT", - "start_time" : { - "_type" : "DV_DATE_TIME", - "value" : "2020-10-16T08:49:21+02:00" - }, - "setting" : { - "_type" : "DV_CODED_TEXT", - "value" : "secondary medical care", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "openehr" - }, - "code_string" : "232" - } - }, - "other_context" : { - "_type" : "ITEM_TREE", - "name" : { - "_type" : "DV_TEXT", - "value" : "Baum" - }, - "items" : [ { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Status" - }, - "value" : { - "_type" : "DV_CODED_TEXT", - "value" : "final", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "local" - }, - "code_string" : "at0012" - } - }, - "archetype_node_id" : "at0004" - } ], - "archetype_node_id" : "at0001" - } - }, - "content" : [ { - "_type" : "EVALUATION", - "name" : { - "_type" : "DV_TEXT", - "value" : "GECCO_Studienteilnahme" - }, - "language" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "ISO_639-1" - }, - "code_string" : "de" - }, - "encoding" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "IANA_character-sets" - }, - "code_string" : "UTF-8" - }, - "subject" : { - "_type" : "PARTY_SELF" - }, - "data" : { - "_type" : "ITEM_TREE", - "name" : { - "_type" : "DV_TEXT", - "value" : "Item tree" - }, - "items" : [ { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Bereits an interventionellen klinischen Studien teilgenommen?" - }, - "value" : { - "_type" : "DV_CODED_TEXT", - "value" : "Yes (qualifier value)", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "SNOMED Clinical Terms" - }, - "code_string" : "373066001" - } - }, - "archetype_node_id" : "at0002" - }, { - "_type" : "CLUSTER", - "name" : { - "_type" : "DV_TEXT", - "value" : "Studienteilnahme" - }, - "items" : [ { - "_type" : "CLUSTER", - "name" : { - "_type" : "DV_TEXT", - "value" : "Studie/Prüfung" - }, - "items" : [ { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Titel der Studie/Prüfung" - }, - "value" : { - "_type" : "DV_CODED_TEXT", - "value" : "Participation in interventional clinical trials", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "eCRF" - }, - "code_string" : "03" - } - }, - "archetype_node_id" : "at0001" - }, { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Beschreibung" - }, - "value" : { - "_type" : "DV_TEXT", - "value" : "Has the patient participated in one or more interventional clinical trials?" - }, - "archetype_node_id" : "at0004" - }, { - "_type" : "CLUSTER", - "name" : { - "_type" : "DV_TEXT", - "value" : "Registrierung" - }, - "items" : [ { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Registername" - }, - "value" : { - "_type" : "DV_CODED_TEXT", - "value" : "NCT number", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "eCRF" - }, - "code_string" : "05" - } - }, - "archetype_node_id" : "at0035" - }, { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Registrierungsnummer" - }, - "value" : { - "_type" : "DV_TEXT", - "value" : "NCT00001016" - }, - "archetype_node_id" : "at0034" - } ], - "archetype_node_id" : "at0033" - } ], - "archetype_node_id" : "openEHR-EHR-CLUSTER.study_details.v1" - } ], - "archetype_node_id" : "openEHR-EHR-CLUSTER.study_participation.v1" - } ], - "archetype_node_id" : "at0001" - }, - "archetype_node_id" : "openEHR-EHR-EVALUATION.gecco_study_participation.v0" - } ], - "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" -} \ No newline at end of file diff --git a/mappings/paragon-clinical-trial-participation-yes-eudract.json b/mappings/paragon-clinical-trial-participation-yes-eudract.json deleted file mode 100644 index e1d9a3272..000000000 --- a/mappings/paragon-clinical-trial-participation-yes-eudract.json +++ /dev/null @@ -1,246 +0,0 @@ -{ - "_type" : "COMPOSITION", - "name" : { - "_type" : "DV_TEXT", - "value" : "GECCO_Studienteilnahme" - }, - "archetype_details" : { - "archetype_id" : { - "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" - }, - "template_id" : { - "value" : "GECCO_Studienteilnahme" - }, - "rm_version" : "1.0.4" - }, - "feeder_audit" : { - "_type" : "FEEDER_AUDIT", - "originating_system_item_ids" : [ { - "_type" : "DV_IDENTIFIER", - "id" : "Observation/1/_history/1", - "type" : "fhir_logical_id" - } ], - "originating_system_audit" : { - "_type" : "FEEDER_AUDIT_DETAILS", - "system_id" : "FHIR-Bridge" - } - }, - "language" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "ISO_639-1" - }, - "code_string" : "de" - }, - "territory" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "ISO_3166-1" - }, - "code_string" : "DE" - }, - "category" : { - "_type" : "DV_CODED_TEXT", - "value" : "event", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "openehr" - }, - "code_string" : "433" - } - }, - "composer" : { - "_type" : "PARTY_SELF" - }, - "context" : { - "_type" : "EVENT_CONTEXT", - "start_time" : { - "_type" : "DV_DATE_TIME", - "value" : "2020-10-16T08:49:21+02:00" - }, - "setting" : { - "_type" : "DV_CODED_TEXT", - "value" : "secondary medical care", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "openehr" - }, - "code_string" : "232" - } - }, - "other_context" : { - "_type" : "ITEM_TREE", - "name" : { - "_type" : "DV_TEXT", - "value" : "Baum" - }, - "items" : [ { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Status" - }, - "value" : { - "_type" : "DV_CODED_TEXT", - "value" : "final", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "local" - }, - "code_string" : "at0012" - } - }, - "archetype_node_id" : "at0004" - } ], - "archetype_node_id" : "at0001" - } - }, - "content" : [ { - "_type" : "EVALUATION", - "name" : { - "_type" : "DV_TEXT", - "value" : "GECCO_Studienteilnahme" - }, - "language" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "ISO_639-1" - }, - "code_string" : "de" - }, - "encoding" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "IANA_character-sets" - }, - "code_string" : "UTF-8" - }, - "subject" : { - "_type" : "PARTY_SELF" - }, - "data" : { - "_type" : "ITEM_TREE", - "name" : { - "_type" : "DV_TEXT", - "value" : "Item tree" - }, - "items" : [ { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Bereits an interventionellen klinischen Studien teilgenommen?" - }, - "value" : { - "_type" : "DV_CODED_TEXT", - "value" : "Yes (qualifier value)", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "SNOMED Clinical Terms" - }, - "code_string" : "373066001" - } - }, - "archetype_node_id" : "at0002" - }, { - "_type" : "CLUSTER", - "name" : { - "_type" : "DV_TEXT", - "value" : "Studienteilnahme" - }, - "items" : [ { - "_type" : "CLUSTER", - "name" : { - "_type" : "DV_TEXT", - "value" : "Studie/Prüfung" - }, - "items" : [ { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Titel der Studie/Prüfung" - }, - "value" : { - "_type" : "DV_CODED_TEXT", - "value" : "Participation in interventional clinical trials", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "eCRF" - }, - "code_string" : "03" - } - }, - "archetype_node_id" : "at0001" - }, { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Beschreibung" - }, - "value" : { - "_type" : "DV_TEXT", - "value" : "Has the patient participated in one or more interventional clinical trials?" - }, - "archetype_node_id" : "at0004" - }, { - "_type" : "CLUSTER", - "name" : { - "_type" : "DV_TEXT", - "value" : "Registrierung" - }, - "items" : [ { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Registername" - }, - "value" : { - "_type" : "DV_CODED_TEXT", - "value" : "EudraCT Number", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "eCRF" - }, - "code_string" : "04" - } - }, - "archetype_node_id" : "at0035" - }, { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Registrierungsnummer" - }, - "value" : { - "_type" : "DV_TEXT", - "value" : "2020-042169-13" - }, - "archetype_node_id" : "at0034" - } ], - "archetype_node_id" : "at0033" - } ], - "archetype_node_id" : "openEHR-EHR-CLUSTER.study_details.v1" - } ], - "archetype_node_id" : "openEHR-EHR-CLUSTER.study_participation.v1" - } ], - "archetype_node_id" : "at0001" - }, - "archetype_node_id" : "openEHR-EHR-EVALUATION.gecco_study_participation.v0" - } ], - "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" -} \ No newline at end of file diff --git a/mappings/paragon-clinical-trial-participation-yes-nct.json b/mappings/paragon-clinical-trial-participation-yes-nct.json deleted file mode 100644 index bf49c8555..000000000 --- a/mappings/paragon-clinical-trial-participation-yes-nct.json +++ /dev/null @@ -1,246 +0,0 @@ -{ - "_type" : "COMPOSITION", - "name" : { - "_type" : "DV_TEXT", - "value" : "GECCO_Studienteilnahme" - }, - "archetype_details" : { - "archetype_id" : { - "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" - }, - "template_id" : { - "value" : "GECCO_Studienteilnahme" - }, - "rm_version" : "1.0.4" - }, - "feeder_audit" : { - "_type" : "FEEDER_AUDIT", - "originating_system_item_ids" : [ { - "_type" : "DV_IDENTIFIER", - "id" : "Observation/1/_history/1", - "type" : "fhir_logical_id" - } ], - "originating_system_audit" : { - "_type" : "FEEDER_AUDIT_DETAILS", - "system_id" : "FHIR-Bridge" - } - }, - "language" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "ISO_639-1" - }, - "code_string" : "de" - }, - "territory" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "ISO_3166-1" - }, - "code_string" : "DE" - }, - "category" : { - "_type" : "DV_CODED_TEXT", - "value" : "event", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "openehr" - }, - "code_string" : "433" - } - }, - "composer" : { - "_type" : "PARTY_SELF" - }, - "context" : { - "_type" : "EVENT_CONTEXT", - "start_time" : { - "_type" : "DV_DATE_TIME", - "value" : "2020-10-16T08:49:21+02:00" - }, - "setting" : { - "_type" : "DV_CODED_TEXT", - "value" : "secondary medical care", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "openehr" - }, - "code_string" : "232" - } - }, - "other_context" : { - "_type" : "ITEM_TREE", - "name" : { - "_type" : "DV_TEXT", - "value" : "Baum" - }, - "items" : [ { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Status" - }, - "value" : { - "_type" : "DV_CODED_TEXT", - "value" : "final", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "local" - }, - "code_string" : "at0012" - } - }, - "archetype_node_id" : "at0004" - } ], - "archetype_node_id" : "at0001" - } - }, - "content" : [ { - "_type" : "EVALUATION", - "name" : { - "_type" : "DV_TEXT", - "value" : "GECCO_Studienteilnahme" - }, - "language" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "ISO_639-1" - }, - "code_string" : "de" - }, - "encoding" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "IANA_character-sets" - }, - "code_string" : "UTF-8" - }, - "subject" : { - "_type" : "PARTY_SELF" - }, - "data" : { - "_type" : "ITEM_TREE", - "name" : { - "_type" : "DV_TEXT", - "value" : "Item tree" - }, - "items" : [ { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Bereits an interventionellen klinischen Studien teilgenommen?" - }, - "value" : { - "_type" : "DV_CODED_TEXT", - "value" : "Yes (qualifier value)", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "SNOMED Clinical Terms" - }, - "code_string" : "373066001" - } - }, - "archetype_node_id" : "at0002" - }, { - "_type" : "CLUSTER", - "name" : { - "_type" : "DV_TEXT", - "value" : "Studienteilnahme" - }, - "items" : [ { - "_type" : "CLUSTER", - "name" : { - "_type" : "DV_TEXT", - "value" : "Studie/Prüfung" - }, - "items" : [ { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Titel der Studie/Prüfung" - }, - "value" : { - "_type" : "DV_CODED_TEXT", - "value" : "Participation in interventional clinical trials", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "eCRF" - }, - "code_string" : "03" - } - }, - "archetype_node_id" : "at0001" - }, { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Beschreibung" - }, - "value" : { - "_type" : "DV_TEXT", - "value" : "Has the patient participated in one or more interventional clinical trials?" - }, - "archetype_node_id" : "at0004" - }, { - "_type" : "CLUSTER", - "name" : { - "_type" : "DV_TEXT", - "value" : "Registrierung" - }, - "items" : [ { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Registername" - }, - "value" : { - "_type" : "DV_CODED_TEXT", - "value" : "NCT number", - "defining_code" : { - "_type" : "CODE_PHRASE", - "terminology_id" : { - "_type" : "TERMINOLOGY_ID", - "value" : "eCRF" - }, - "code_string" : "05" - } - }, - "archetype_node_id" : "at0035" - }, { - "_type" : "ELEMENT", - "name" : { - "_type" : "DV_TEXT", - "value" : "Registrierungsnummer" - }, - "value" : { - "_type" : "DV_TEXT", - "value" : "NCT00001016" - }, - "archetype_node_id" : "at0034" - } ], - "archetype_node_id" : "at0033" - } ], - "archetype_node_id" : "openEHR-EHR-CLUSTER.study_details.v1" - } ], - "archetype_node_id" : "openEHR-EHR-CLUSTER.study_participation.v1" - } ], - "archetype_node_id" : "at0001" - }, - "archetype_node_id" : "openEHR-EHR-EVALUATION.gecco_study_participation.v0" - } ], - "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" -} \ No newline at end of file From c5df9d098f0e4e91490199aae481e47ba5bfdda3 Mon Sep 17 00:00:00 2001 From: MDSchulze <mareike.schulze@plri.de> Date: Wed, 5 May 2021 15:58:45 +0200 Subject: [PATCH 054/141] check if CodableConcept exists --- .../PatientDischargeAdminEntryConverter.java | 49 ++++++++++--------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeAdminEntryConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeAdminEntryConverter.java index 149e478a9..d63e93ebd 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeAdminEntryConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientdischarge/PatientDischargeAdminEntryConverter.java @@ -16,29 +16,32 @@ protected EntlassungsartAdminEntry convertInternal(Observation resource) { EntlassungsartAdminEntry adminEntry = new EntlassungsartAdminEntry(); - String code = getSnomedCodeObservation(resource); - - switch(code) { - case "261665006": - adminEntry.setArtDerEntlassung(ArtDerEntlassungDefiningCode.UNKNOWN_QUALIFIER_VALUE.toDvCodedText()); - break; - case "32485007": - adminEntry.setArtDerEntlassung(ArtDerEntlassungDefiningCode.HOSPITAL_ADMISSION_PROCEDURE.toDvCodedText()); - break; - case "419099009": - adminEntry.setArtDerEntlassung(ArtDerEntlassungDefiningCode.DEAD_FINDING.toDvCodedText()); - break; - case "371827001": - adminEntry.setArtDerEntlassung(ArtDerEntlassungDefiningCode.PATIENT_DISCHARGED_ALIVE_FINDING.toDvCodedText()); - break; - case "3457005": - adminEntry.setArtDerEntlassung(ArtDerEntlassungDefiningCode.PATIENT_REFERRAL_PROCEDURE.toDvCodedText()); - break; - case "306237005": - adminEntry.setArtDerEntlassung(ArtDerEntlassungDefiningCode.REFERRAL_TO_PALLIATIVE_CARE_SERVICE_PROCEDURE.toDvCodedText()); - break; - default: - throw new UnprocessableEntityException("Value code " + resource.getValueCodeableConcept().getCoding().get(0).getCode() + " is not supported"); + if(resource.hasValueCodeableConcept()){ + + String code = getSnomedCodeObservation(resource); + + switch(code) { + case "261665006": + adminEntry.setArtDerEntlassung(ArtDerEntlassungDefiningCode.UNKNOWN_QUALIFIER_VALUE.toDvCodedText()); + break; + case "32485007": + adminEntry.setArtDerEntlassung(ArtDerEntlassungDefiningCode.HOSPITAL_ADMISSION_PROCEDURE.toDvCodedText()); + break; + case "419099009": + adminEntry.setArtDerEntlassung(ArtDerEntlassungDefiningCode.DEAD_FINDING.toDvCodedText()); + break; + case "371827001": + adminEntry.setArtDerEntlassung(ArtDerEntlassungDefiningCode.PATIENT_DISCHARGED_ALIVE_FINDING.toDvCodedText()); + break; + case "3457005": + adminEntry.setArtDerEntlassung(ArtDerEntlassungDefiningCode.PATIENT_REFERRAL_PROCEDURE.toDvCodedText()); + break; + case "306237005": + adminEntry.setArtDerEntlassung(ArtDerEntlassungDefiningCode.REFERRAL_TO_PALLIATIVE_CARE_SERVICE_PROCEDURE.toDvCodedText()); + break; + default: + throw new UnprocessableEntityException("Value code " + resource.getValueCodeableConcept().getCoding().get(0).getCode() + " is not supported"); + } } return adminEntry; From 3ac3aa49e5ab4275b104043a9b83a1f73f4a9176 Mon Sep 17 00:00:00 2001 From: MDSchulze <mareike.schulze@plri.de> Date: Wed, 5 May 2021 16:31:22 +0200 Subject: [PATCH 055/141] code smells addressed --- ...TrialParticipationEvaluationConverter.java | 41 ++++++++++--------- .../ClinicalTrialParticipationIT.java | 2 +- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java index 03e14d49e..9b7599dec 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java @@ -23,14 +23,11 @@ protected GeccoStudienteilnahmeEvaluation convertInternal(Observation resource) GeccoStudienteilnahmeEvaluation geccoStudienteilnahmeEvaluation = new GeccoStudienteilnahmeEvaluation(); - String code_participated = getSnomedCodeObservation(resource); + String codeParticipated = getSnomedCodeObservation(resource); - boolean hasStudy = false; - - switch(code_participated){ + switch(codeParticipated){ case "373066001": geccoStudienteilnahmeEvaluation.setBereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.YES_QUALIFIER_VALUE); - hasStudy = true; break; case "373067005": geccoStudienteilnahmeEvaluation.setBereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.NO_QUALIFIER_VALUE); @@ -48,29 +45,35 @@ protected GeccoStudienteilnahmeEvaluation convertInternal(Observation resource) throw new UnprocessableEntityException("Value code " + resource.getValueCodeableConcept().getCoding().get(0).getCode() + " is not supported"); } - if(hasStudy){ + if(geccoStudienteilnahmeEvaluation.getBereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode().equals(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.YES_QUALIFIER_VALUE)){ - StudienteilnahmeCluster studienteilnahmeCluster = new StudienteilnahmeCluster(); - geccoStudienteilnahmeEvaluation.setStudienteilnahme(studienteilnahmeCluster); + geccoStudienteilnahmeEvaluation.setStudienteilnahme(createStudyCluster(resource)); + } - StudiePruefungCluster studiePruefungCluster = new StudiePruefungCluster(); - studienteilnahmeCluster.setStudiePruefung(studiePruefungCluster); + return geccoStudienteilnahmeEvaluation; + } - studiePruefungCluster.setTitelDerStudiePruefungDefiningCode(TitelDerStudiePruefungDefiningCode.PARTICIPATION_IN_INTERVENTIONAL_CLINICAL_TRIALS); + private StudienteilnahmeCluster createStudyCluster(Observation resource){ - if(!resource.getCode().getText().isEmpty()){ - studiePruefungCluster.setBeschreibungValue(resource.getCode().getText()); - } + StudienteilnahmeCluster studienteilnahmeCluster = new StudienteilnahmeCluster(); - if(!resource.getComponent().isEmpty()){ - studiePruefungCluster.setRegistrierung(convertInternalEvents(resource)); - } + StudiePruefungCluster studiePruefungCluster = new StudiePruefungCluster(); + studienteilnahmeCluster.setStudiePruefung(studiePruefungCluster); + + studiePruefungCluster.setTitelDerStudiePruefungDefiningCode(TitelDerStudiePruefungDefiningCode.PARTICIPATION_IN_INTERVENTIONAL_CLINICAL_TRIALS); + + if(resource.getCode().hasText()){ + studiePruefungCluster.setBeschreibungValue(resource.getCode().getText()); } - return geccoStudienteilnahmeEvaluation; + if(resource.hasComponent()){ + studiePruefungCluster.setRegistrierung(createRegistryCluster(resource)); + } + + return studienteilnahmeCluster; } - private List<StudiePruefungRegistrierungCluster> convertInternalEvents(Observation resource) { + private List<StudiePruefungRegistrierungCluster> createRegistryCluster(Observation resource) { StudiePruefungRegistrierungCluster studiePruefungRegistrierungCluster = new StudiePruefungRegistrierungCluster(); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ClinicalTrialParticipationIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ClinicalTrialParticipationIT.java index fd100d5e1..1ea33ba04 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ClinicalTrialParticipationIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ClinicalTrialParticipationIT.java @@ -30,7 +30,7 @@ public ClinicalTrialParticipationIT() { } @Test - void ClinicalTrialParticipation() throws IOException { + void createClinicalTrialParticipation() throws IOException { create("create-clinical-trial-participation-yes-eudract.json"); } From 808e5225104c916e813eea0371afd5f1f62fdd43 Mon Sep 17 00:00:00 2001 From: Erik Tute <eriktute@mx.de> Date: Tue, 11 May 2021 08:47:25 +0200 Subject: [PATCH 056/141] Fixed bug in testcase with missing Age extension and refactored dataTime conversion into TimeConverter class. --- .../generic/PatientToCompositionConverter.java | 11 +++-------- .../ehr/converter/generic/TimeConverter.java | 15 ++++++++++++++- .../patient/AlterObservationConverter.java | 16 ++++++++-------- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/PatientToCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/PatientToCompositionConverter.java index 78111d1d1..f405f64a0 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/PatientToCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/PatientToCompositionConverter.java @@ -7,6 +7,7 @@ import org.springframework.lang.NonNull; import java.time.Instant; +import java.time.OffsetDateTime; import java.time.ZonedDateTime; public abstract class PatientToCompositionConverter<C extends CompositionEntity> extends CompositionConverter<Patient, C> { @@ -14,14 +15,8 @@ public abstract class PatientToCompositionConverter<C extends CompositionEntity> @Override public C convert(@NonNull Patient resource) { C composition = super.convert(resource); - if (resource.hasExtension() && resource.hasBirthDate()) { - Extension extensionAge = resource.getExtensionByUrl("https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/age"); - DateTimeType dateTimeOfDocumentationDt = (DateTimeType) extensionAge.getExtensionByUrl("dateTimeOfDocumentation").getValue(); - ZonedDateTime dateTimeOfDocumentation = dateTimeOfDocumentationDt.getValueAsCalendar().toZonedDateTime(); - composition.setStartTimeValue(dateTimeOfDocumentation); - } else { - composition.setStartTimeValue(Instant.now()); - } + Extension extensionAge = resource.getExtensionByUrl("https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/age"); + composition.setStartTimeValue(TimeConverter.convertAgeExtensionTime(extensionAge)); return composition; } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java index 05f9a87c6..e1209ed15 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java @@ -2,12 +2,13 @@ import org.hl7.fhir.r4.model.Condition; import org.hl7.fhir.r4.model.Consent; +import org.hl7.fhir.r4.model.DateTimeType; import org.hl7.fhir.r4.model.DiagnosticReport; +import org.hl7.fhir.r4.model.Extension; import org.hl7.fhir.r4.model.MedicationStatement; import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Procedure; import org.hl7.fhir.r4.model.QuestionnaireResponse; - import java.time.OffsetDateTime; import java.time.ZonedDateTime; import java.time.temporal.TemporalAccessor; @@ -130,4 +131,16 @@ public static TemporalAccessor convertConsentTime(Consent resource) { return OffsetDateTime.now(); } } + + public static TemporalAccessor convertAgeExtensionTime(Extension extension) { + if (extension == null) { + return OffsetDateTime.now(); + } + Extension dataTimeOfDocumentationExtension = extension.getExtensionByUrl("dateTimeOfDocumentation"); + if (dataTimeOfDocumentationExtension == null) { + return OffsetDateTime.now(); + } + DateTimeType dateTimeOfDocumentationDt = (DateTimeType) dataTimeOfDocumentationExtension.getValue(); + return dateTimeOfDocumentationDt.getValueAsCalendar().toZonedDateTime(); + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patient/AlterObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patient/AlterObservationConverter.java index d1ada8823..598e64fb5 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patient/AlterObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patient/AlterObservationConverter.java @@ -2,6 +2,7 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.ehrbase.fhirbridge.ehr.converter.generic.EntryEntityConverter; +import org.ehrbase.fhirbridge.ehr.converter.generic.TimeConverter; import org.ehrbase.fhirbridge.ehr.opt.geccopersonendatencomposition.definition.AlterObservation; import org.hl7.fhir.r4.model.Age; @@ -11,6 +12,7 @@ import java.time.Period; import java.time.ZonedDateTime; +import java.time.temporal.TemporalAccessor; public class AlterObservationConverter extends EntryEntityConverter<Patient, AlterObservation> { @@ -18,14 +20,12 @@ public class AlterObservationConverter extends EntryEntityConverter<Patient, Alt protected AlterObservation convertInternal(Patient resource) { AlterObservation age = new AlterObservation(); Extension extensionAge = resource.getExtensionByUrl("https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/age"); - DateTimeType dateTimeOfDocumentationDt = (DateTimeType) extensionAge.getExtensionByUrl("dateTimeOfDocumentation").getValue(); - ZonedDateTime dateTimeOfDocumentation = dateTimeOfDocumentationDt.getValueAsCalendar().toZonedDateTime(); - - //TODO refactor - age.setOriginValue(dateTimeOfDocumentation); - age.setTimeValue(dateTimeOfDocumentation); - //age - Alter (ISO8601 duration e.g. P67Y) - age.setAlterValue(getAge(extensionAge)); + if (extensionAge != null) { + TemporalAccessor time = TimeConverter.convertAgeExtensionTime(extensionAge); //should be sth. generic in TimeConverter? + age.setOriginValue(time); + age.setTimeValue(time); + age.setAlterValue(getAge(extensionAge)); + } return age; } From 2db6e432c0d8204ae84ac0a106fb416d157e5e5a Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 11 May 2021 21:40:40 +0200 Subject: [PATCH 057/141] Initial commit --- pom.xml | 8 +- .../ehrbase/fhirbridge/camel/Constants.java | 34 + .../fhirbridge/camel/FhirBridgeConstants.java | 14 - .../ehr/composition/CompositionProducer.java | 8 +- .../FindMedicationStatementComponent.java | 4 +- .../ProvideObservationComponent.java | 34 + .../AuditCreateResourceProcessor.java | 7 +- .../camel/processor/EhrIdLookupProcessor.java | 2 +- ...lidator.java => FhirProfileValidator.java} | 14 +- .../FhirResourcePersistenceProcessor.java | 106 ++ .../processor/ResourceResponseProcessor.java | 4 +- .../fhirbridge/camel/route/BundleRoutes.java | 10 +- .../camel/route/ConditionRoutes.java | 6 +- .../fhirbridge/camel/route/ConsentRoutes.java | 6 +- .../camel/route/DiagnosticReportRoutes.java | 6 +- .../route/MedicationStatementRoutes.java | 6 +- .../camel/route/ObservationRoutes.java | 34 +- .../fhirbridge/camel/route/PatientRoutes.java | 8 +- .../camel/route/ProcedureRoutes.java | 6 +- .../route/QuestionnaireResponseRoutes.java | 6 +- .../config/FhirBridgeJpaConfiguration.java | 10 - .../config/FhirJpaConfiguration.java | 255 ----- .../config/HapiFhirJpaConfiguration.java | 210 ++++ ...erties.java => HapiFhirJpaProperties.java} | 4 +- .../fhirbridge/config/JpaConfiguration.java | 44 + .../fhirbridge/core/domain/PatientId.java | 76 ++ .../fhirbridge/core/domain/ResourceMap.java | 82 ++ .../core/repository/PatientIdRepository.java | 30 + .../repository/ResourceMapRepository.java | 28 + .../ehrbase/fhirbridge/ehr/Composition.java | 9 - .../AtemfrequenzComposition.java | 497 +++++----- .../BeatmungswerteComposition.java | 521 +++++----- .../BefundDerBlutgasanalyseComposition.java | 497 +++++----- .../BlutdruckComposition.java | 399 ++++---- .../D4LQuestionnaireComposition.java | 905 +++++++++--------- .../DiagnoseComposition.java | 449 +++++---- .../GECCODiagnoseComposition.java | 579 ++++++----- .../GECCOLaborbefundComposition.java | 497 +++++----- .../GECCOMedikationComposition.java | 525 +++++----- .../GECCOPersonendatenComposition.java | 525 +++++----- .../GECCOProzedurComposition.java | 495 +++++----- .../GECCORadiologischerBefundComposition.java | 493 +++++----- .../GECCOSerologischerBefundComposition.java | 551 ++++++----- .../GECCOVirologischerBefundComposition.java | 551 ++++++----- .../HerzfrequenzComposition.java | 397 ++++---- ...MonitoringKorpertemperaturComposition.java | 511 +++++----- ...ungErregernachweisSARSCoV2Composition.java | 467 +++++---- .../KlinischeFrailtySkalaComposition.java | 523 +++++----- .../KoerpergewichtComposition.java | 497 +++++----- .../KoerpergroesseComposition.java | 499 +++++----- .../PatientAufICUComposition.java | 463 +++++---- .../ProzedurComposition.java | 447 +++++---- .../PulsoxymetrieComposition.java | 497 +++++----- .../RaucherstatusComposition.java | 497 +++++----- .../ReisehistorieComposition.java | 549 ++++++----- .../SARSCoV2ExpositionComposition.java | 497 +++++----- .../SchwangerschaftsstatusComposition.java | 497 +++++----- .../opt/sofacomposition/SOFAComposition.java | 473 +++++---- .../SymptomComposition.java | 577 ++++++----- .../ProvideObservationProvider.java | 61 ++ .../ProvideObservationTransaction.java | 44 + .../fhirbridge/fhir/support/PatientId.java | 30 - .../fhir/support/PatientIdRepository.java | 8 - .../fhirbridge/fhir/support/Resources.java | 2 + .../camel/component/observation-provide | 1 + src/main/resources/application.yml | 1 + .../db/changelog/db.changelog-1.2.xml | 15 +- .../fhir/AbstractMappingTestSetupIT.java | 8 +- .../fhirbridge/fhir/AbstractSetupIT.java | 18 - 69 files changed, 8275 insertions(+), 7859 deletions(-) create mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/Constants.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/FhirBridgeConstants.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/observation/ProvideObservationComponent.java rename src/main/java/org/ehrbase/fhirbridge/camel/processor/{ResourceProfileValidator.java => FhirProfileValidator.java} (87%) create mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirResourcePersistenceProcessor.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/config/FhirBridgeJpaConfiguration.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/config/FhirJpaConfiguration.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java rename src/main/java/org/ehrbase/fhirbridge/config/{FhirJpaProperties.java => HapiFhirJpaProperties.java} (97%) create mode 100644 src/main/java/org/ehrbase/fhirbridge/config/JpaConfiguration.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/core/domain/PatientId.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/core/domain/ResourceMap.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/core/repository/PatientIdRepository.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/core/repository/ResourceMapRepository.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/Composition.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationProvider.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationTransaction.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/support/PatientId.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/support/PatientIdRepository.java create mode 100644 src/main/resources/META-INF/services/org/apache/camel/component/observation-provide diff --git a/pom.xml b/pom.xml index 493893439..7af218e23 100644 --- a/pom.xml +++ b/pom.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.ehrbase.fhirbridge</groupId> <artifactId>fhir-bridge</artifactId> - <version>1.1.1</version> + <version>1.2.0-SNAPSHOT</version> <name>FHIR Bridge</name> @@ -29,7 +29,7 @@ <ehrbase-sdk.version>develop-SNAPSHOT</ehrbase-sdk.version> <findbugs-jsr305.version>3.0.2</findbugs-jsr305.version> <guava.version>30.1-jre</guava.version> - <hapi-fhir.version>5.3.0</hapi-fhir.version> + <hapi-fhir.version>5.3.3</hapi-fhir.version> <ipf.version>4.0.0</ipf.version> <javassist.version>3.27.0-GA</javassist.version> <jaxb-core.version>2.3.0.1</jaxb-core.version> diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/Constants.java b/src/main/java/org/ehrbase/fhirbridge/camel/Constants.java new file mode 100644 index 000000000..75b1a7038 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/camel/Constants.java @@ -0,0 +1,34 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.camel; + +/** + * Custom Camel constants used by the FHIR Bridge. + * + * @since 1.0.0 + */ +public final class Constants { + + public static final String METHOD_OUTCOME = "FhirBridgeMethodOutcome"; + + public static final String PROFILE = "FhirBridgeProfile"; + + public static final String VERSION_UID = "FhirBridgeVersionUid"; + + private Constants() { + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/FhirBridgeConstants.java b/src/main/java/org/ehrbase/fhirbridge/camel/FhirBridgeConstants.java deleted file mode 100644 index c85b84a30..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/camel/FhirBridgeConstants.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.ehrbase.fhirbridge.camel; - -/** - * FHIR Bridge constants - */ -public final class FhirBridgeConstants { - - public static final String METHOD_OUTCOME = "FhirBridgeMethodOutcome"; - - public static final String PROFILE = "FhirBridgeProfile"; - - private FhirBridgeConstants() { - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/ehr/composition/CompositionProducer.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/ehr/composition/CompositionProducer.java index fe3a9e41b..1e65857c1 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/component/ehr/composition/CompositionProducer.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/ehr/composition/CompositionProducer.java @@ -4,8 +4,8 @@ import org.apache.camel.Exchange; import org.apache.camel.support.DefaultProducer; import org.apache.commons.io.FileUtils; +import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; import org.ehrbase.client.flattener.Unflattener; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.ResourceTemplateProvider; import org.ehrbase.serialisation.jsonencoding.CanonicalJson; import org.slf4j.Logger; @@ -51,16 +51,16 @@ private void mergeCompositionEntity(UUID ehrId, Exchange exchange) { } if (endpoint.getProperties().isEnabled()) { - debugMapping((Composition) body); + debugMapping((CompositionEntity) body); } Object mergedComposition = endpoint.getOpenEhrClient().compositionEndpoint(ehrId).mergeCompositionEntity(body); - exchange.getMessage().setHeader(CompositionConstants.VERSION_UID, ((Composition) mergedComposition).getVersionUid()); + exchange.getMessage().setHeader(CompositionConstants.VERSION_UID, ((CompositionEntity) mergedComposition).getVersionUid()); exchange.getMessage().setBody(mergedComposition); } - private void debugMapping(Composition composition) { + private void debugMapping(CompositionEntity composition) { ResourceTemplateProvider resourceTemplateProvider = new ResourceTemplateProvider("classpath:/opt/"); resourceTemplateProvider.afterPropertiesSet(); Unflattener unflattener = new Unflattener(resourceTemplateProvider); diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/medicationstatement/FindMedicationStatementComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/medicationstatement/FindMedicationStatementComponent.java index 7ccb4e67c..861f00ed4 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/medicationstatement/FindMedicationStatementComponent.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/medicationstatement/FindMedicationStatementComponent.java @@ -16,7 +16,7 @@ package org.ehrbase.fhirbridge.camel.component.fhir.medicationstatement; -import org.ehrbase.fhirbridge.fhir.observation.FindObservationTransaction; +import org.ehrbase.fhirbridge.fhir.medicationstatement.FindMedicationStatementTransaction; import org.openehealth.ipf.commons.ihe.fhir.audit.FhirQueryAuditDataset; import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; @@ -29,6 +29,6 @@ public class FindMedicationStatementComponent extends CustomFhirComponent<FhirQueryAuditDataset> { public FindMedicationStatementComponent() { - super(new FindObservationTransaction()); + super(new FindMedicationStatementTransaction()); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/observation/ProvideObservationComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/observation/ProvideObservationComponent.java new file mode 100644 index 000000000..4e2cd8ecf --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/observation/ProvideObservationComponent.java @@ -0,0 +1,34 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.camel.component.fhir.observation; + +import org.ehrbase.fhirbridge.fhir.observation.ProvideObservationTransaction; +import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; +import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; + +/** + * Camel component that enables 'Provide Observation' transaction. + * + * @since 1.2.0 + */ +@SuppressWarnings("java:S110") +public class ProvideObservationComponent extends CustomFhirComponent<GenericFhirAuditDataset> { + + public ProvideObservationComponent() { + super(new ProvideObservationTransaction()); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/AuditCreateResourceProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/AuditCreateResourceProcessor.java index 4cd73b003..2dcd395f7 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/AuditCreateResourceProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/AuditCreateResourceProcessor.java @@ -5,12 +5,11 @@ import ca.uhn.fhir.rest.api.server.RequestDetails; import org.apache.camel.Exchange; import org.apache.camel.Processor; -import org.ehrbase.fhirbridge.camel.FhirBridgeConstants; +import org.ehrbase.fhirbridge.camel.Constants; import org.hl7.fhir.r4.model.AuditEvent; import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.Identifier; import org.hl7.fhir.r4.model.Reference; -import org.openehealth.ipf.commons.ihe.fhir.Constants; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; @@ -79,10 +78,10 @@ private AuditEvent.AuditEventEntityComponent entity(Exchange exchange) { } private MethodOutcome extractMethodOutcome(Exchange exchange) { - return exchange.getIn().getHeader(FhirBridgeConstants.METHOD_OUTCOME, MethodOutcome.class); + return exchange.getIn().getHeader(Constants.METHOD_OUTCOME, MethodOutcome.class); } private RequestDetails extractRequestDetails(Exchange exchange) { - return exchange.getIn().getHeader(Constants.FHIR_REQUEST_DETAILS, RequestDetails.class); + return exchange.getIn().getHeader(org.openehealth.ipf.commons.ihe.fhir.Constants.FHIR_REQUEST_DETAILS, RequestDetails.class); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrIdLookupProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrIdLookupProcessor.java index 5cc2104e2..301a3af2b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrIdLookupProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrIdLookupProcessor.java @@ -8,7 +8,7 @@ import org.ehrbase.client.aql.record.Record1; import org.ehrbase.client.openehrclient.OpenEhrClient; import org.ehrbase.fhirbridge.camel.component.ehr.composition.CompositionConstants; -import org.ehrbase.fhirbridge.fhir.support.PatientIdRepository; +import org.ehrbase.fhirbridge.core.repository.PatientIdRepository; import org.ehrbase.fhirbridge.fhir.support.Resources; import org.hl7.fhir.r4.model.Identifier; import org.hl7.fhir.r4.model.Resource; diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourceProfileValidator.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirProfileValidator.java similarity index 87% rename from src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourceProfileValidator.java rename to src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirProfileValidator.java index 9ec252c47..4a3a3163c 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourceProfileValidator.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirProfileValidator.java @@ -4,7 +4,7 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.apache.camel.Exchange; import org.apache.camel.Processor; -import org.ehrbase.fhirbridge.camel.FhirBridgeConstants; +import org.ehrbase.fhirbridge.camel.Constants; import org.ehrbase.fhirbridge.fhir.common.Profile; import org.ehrbase.fhirbridge.fhir.support.Resources; import org.hl7.fhir.r4.model.OperationOutcome; @@ -24,20 +24,19 @@ import java.util.Set; @Component -public class ResourceProfileValidator implements Processor, MessageSourceAware { +public class FhirProfileValidator implements Processor, MessageSourceAware { - private static final Logger LOG = LoggerFactory.getLogger(ResourceProfileValidator.class); + private static final Logger LOG = LoggerFactory.getLogger(FhirProfileValidator.class); private final FhirContext fhirContext; private MessageSourceAccessor messages; - public ResourceProfileValidator(FhirContext fhirContext) { + public FhirProfileValidator(FhirContext fhirContext) { this.fhirContext = fhirContext; } @Override - @SuppressWarnings("java:S1192") public void process(Exchange exchange) { Resource resource = exchange.getIn().getBody(Resource.class); @@ -58,7 +57,7 @@ public void process(Exchange exchange) { throw new UnprocessableEntityException(fhirContext, operationOutcome); } - exchange.getMessage().setHeader(FhirBridgeConstants.PROFILE, defaultProfile); + exchange.getMessage().setHeader(Constants.PROFILE, defaultProfile); } else { Set<Profile> supportedProfiles = Profile.resolveAll(resource); if (supportedProfiles.isEmpty()) { @@ -79,13 +78,12 @@ public void process(Exchange exchange) { throw new UnprocessableEntityException(fhirContext, operationOutcome); } - exchange.getMessage().setHeader(FhirBridgeConstants.PROFILE, supportedProfiles.iterator().next()); + exchange.getMessage().setHeader(Constants.PROFILE, supportedProfiles.iterator().next()); } LOG.info("{} resource validated", resource.getResourceType()); } - @Override public void setMessageSource(@NonNull MessageSource messageSource) { this.messages = new MessageSourceAccessor(messageSource); diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirResourcePersistenceProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirResourcePersistenceProcessor.java new file mode 100644 index 000000000..4861ea90b --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirResourcePersistenceProcessor.java @@ -0,0 +1,106 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.camel.processor; + +import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.RestOperationTypeEnum; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import org.apache.camel.Exchange; +import org.apache.camel.Processor; +import org.ehrbase.fhirbridge.camel.Constants; +import org.ehrbase.fhirbridge.core.repository.ResourceMapRepository; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Camel {@link Processor} that handles creation or modification of the submitted FHIR resource + * into the internal database. + * + * @since 1.2.0 + */ +public class FhirResourcePersistenceProcessor<T extends IBaseResource> implements Processor { + + private static final Logger LOG = LoggerFactory.getLogger(FhirResourcePersistenceProcessor.class); + + private final IFhirResourceDao<T> resourceDao; + + private final Class<T> resourceType; + + private final ResourceMapRepository resourceMapRepository; + + public FhirResourcePersistenceProcessor(IFhirResourceDao<T> resourceDao, Class<T> resourceType, + ResourceMapRepository resourceMapRepository) { + this.resourceDao = resourceDao; + this.resourceType = resourceType; + this.resourceMapRepository = resourceMapRepository; + } + + /** + * @see Processor#process(Exchange) + */ + @Override + public void process(Exchange exchange) throws Exception { + LOG.debug("FHIR resource persistence processing..."); + + var resource = exchange.getIn().getBody(resourceType); + var requestDetails = exchange.getIn().getHeader(org.openehealth.ipf.commons.ihe.fhir.Constants.FHIR_REQUEST_DETAILS, RequestDetails.class); + + MethodOutcome outcome; + if (requestDetails.getRestOperationType() == RestOperationTypeEnum.CREATE) { + outcome = handleCreateResource(resource, requestDetails); + } else if (requestDetails.getRestOperationType() == RestOperationTypeEnum.UPDATE) { + outcome = handleUpdateResource(resource, requestDetails); + resourceMapRepository.findById(outcome.getId().getValue()) + .ifPresent(resourceMap -> exchange.getMessage().setHeader(Constants.VERSION_UID, resourceMap.getVersionUid())); + } else { + throw new UnsupportedOperationException("Only 'Create' and 'Update' operations are supported"); + } + + exchange.setProperty(Constants.METHOD_OUTCOME, outcome); + } + + /** + * Creates resource. + * + * @param resource the resource + * @param requestDetails the context of the current request + * @return response back to the client + */ + private MethodOutcome handleCreateResource(T resource, RequestDetails requestDetails) { + var conditionalUrl = requestDetails.getConditionalUrl(RestOperationTypeEnum.CREATE); + MethodOutcome outcome = resourceDao.create(resource, conditionalUrl, requestDetails); + LOG.debug("Created resource: {}", resource); + return outcome; + } + + /** + * Updates the existing resource. + * + * @param resource the updated resource + * @param requestDetails the context of the current request + * @return response back to the client + */ + private MethodOutcome handleUpdateResource(T resource, RequestDetails requestDetails) { + var conditionalUrl = requestDetails.getConditionalUrl(RestOperationTypeEnum.UPDATE); + MethodOutcome outcome = resourceDao.update(resource, conditionalUrl, requestDetails); + LOG.debug("Updated resource: {}", resource); + return outcome; + } +} + diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourceResponseProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourceResponseProcessor.java index 4f410ff34..5484929d7 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourceResponseProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourceResponseProcessor.java @@ -5,7 +5,7 @@ import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.camel.FhirBridgeConstants; +import org.ehrbase.fhirbridge.camel.Constants; import org.ehrbase.fhirbridge.camel.component.ehr.composition.CompositionConstants; import org.ehrbase.fhirbridge.fhir.support.Resources; import org.hl7.fhir.r4.model.Identifier; @@ -33,7 +33,7 @@ public void process(Exchange exchange) throws Exception { } private MethodOutcome getMethodOutcome(Exchange exchange) { - MethodOutcome methodOutcome = exchange.getIn().getHeader(FhirBridgeConstants.METHOD_OUTCOME, MethodOutcome.class); + MethodOutcome methodOutcome = exchange.getIn().getHeader(Constants.METHOD_OUTCOME, MethodOutcome.class); if (methodOutcome == null) { throw new InternalErrorException("MethodOutcome must not be null"); } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/BundleRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/BundleRoutes.java index c10fd0599..d8099d17d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/BundleRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/BundleRoutes.java @@ -18,7 +18,7 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.FhirBridgeConstants; +import org.ehrbase.fhirbridge.camel.Constants; import org.ehrbase.fhirbridge.fhir.bundle.converter.AntiBodyPanelConverter; import org.ehrbase.fhirbridge.fhir.bundle.converter.BloodGasPanelConverter; import org.ehrbase.fhirbridge.fhir.bundle.converter.DiagnosticReportLabConverter; @@ -48,13 +48,13 @@ public void configure() throws Exception { // 'Provide Bundle' route definition from("bundle-provide:consumer?fhirContext=#fhirContext") - .setHeader(FhirBridgeConstants.PROFILE, method(Bundles.class, "getTransactionProfile")) + .setHeader(Constants.PROFILE, method(Bundles.class, "getTransactionProfile")) .choice() - .when(header(FhirBridgeConstants.PROFILE).isEqualTo(Profile.BLOOD_GAS_PANEL)) + .when(header(Constants.PROFILE).isEqualTo(Profile.BLOOD_GAS_PANEL)) .to("direct:process-blood-gas-panel-bundle") - .when(header(FhirBridgeConstants.PROFILE).isEqualTo(Profile.ANTI_BODY_PANEL)) + .when(header(Constants.PROFILE).isEqualTo(Profile.ANTI_BODY_PANEL)) .to("direct:process-anti-body-panel-bundle") - .when(header(FhirBridgeConstants.PROFILE).isEqualTo(Profile.DIAGNOSTIC_REPORT_LAB)) + .when(header(Constants.PROFILE).isEqualTo(Profile.DIAGNOSTIC_REPORT_LAB)) .to("direct:process-diagnostic-report-lab-bundle") .otherwise() .throwException(new UnprocessableEntityException("Unsupported transaction: provided Bundle should have a resource that " + diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java index 18d2865d3..73450365b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java @@ -17,7 +17,7 @@ package org.ehrbase.fhirbridge.camel.route; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.FhirBridgeConstants; +import org.ehrbase.fhirbridge.camel.Constants; import org.hl7.fhir.r4.model.Condition; import org.springframework.stereotype.Component; @@ -40,8 +40,8 @@ public void configure() throws Exception { .onCompletion() .process("auditCreateResourceProcessor") .end() - .process("resourceProfileValidator") - .setHeader(FhirBridgeConstants.METHOD_OUTCOME, method("conditionDao", "create(${body}, ${headers.FhirRequestDetails})")) + .process("fhirProfileValidator") + .setHeader(Constants.METHOD_OUTCOME, method("conditionDao", "create(${body}, ${headers.FhirRequestDetails})")) .process("ehrIdLookupProcessor") .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java index 0e42bd27b..d1a20d0b9 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java @@ -17,7 +17,7 @@ package org.ehrbase.fhirbridge.camel.route; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.FhirBridgeConstants; +import org.ehrbase.fhirbridge.camel.Constants; import org.springframework.stereotype.Component; /** @@ -39,8 +39,8 @@ public void configure() throws Exception { .onCompletion() .process("auditCreateResourceProcessor") .end() - .process("resourceProfileValidator") - .setHeader(FhirBridgeConstants.METHOD_OUTCOME, method("consentDao", "create(${body}, ${headers.FhirRequestDetails})")) + .process("fhirProfileValidator") + .setHeader(Constants.METHOD_OUTCOME, method("consentDao", "create(${body}, ${headers.FhirRequestDetails})")) .process("ehrIdLookupProcessor") .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java index 66bc8acc8..cc28b53a1 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java @@ -17,7 +17,7 @@ package org.ehrbase.fhirbridge.camel.route; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.FhirBridgeConstants; +import org.ehrbase.fhirbridge.camel.Constants; import org.hl7.fhir.r4.model.DiagnosticReport; import org.springframework.stereotype.Component; @@ -40,7 +40,7 @@ public void configure() throws Exception { .onCompletion() .process("auditCreateResourceProcessor") .end() - .process("resourceProfileValidator") + .process("fhirProfileValidator") .to("direct:process-diagnostic-report"); // 'Find Diagnostic Report' route definition @@ -54,7 +54,7 @@ public void configure() throws Exception { // Internal routes definition from("direct:process-diagnostic-report") - .setHeader(FhirBridgeConstants.METHOD_OUTCOME, method("diagnosticReportDao", "create(${body}, ${headers.FhirRequestDetails})")) + .setHeader(Constants.METHOD_OUTCOME, method("diagnosticReportDao", "create(${body}, ${headers.FhirRequestDetails})")) .process("ehrIdLookupProcessor") .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java index 661d09af9..315158b1e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java @@ -17,7 +17,7 @@ package org.ehrbase.fhirbridge.camel.route; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.FhirBridgeConstants; +import org.ehrbase.fhirbridge.camel.Constants; import org.springframework.stereotype.Component; /** @@ -39,8 +39,8 @@ public void configure() throws Exception { .onCompletion() .process("auditCreateResourceProcessor") .end() - .process("resourceProfileValidator") - .setHeader(FhirBridgeConstants.METHOD_OUTCOME, method("medicationStatementDao", "create(${body}, ${headers.FhirRequestDetails})")) + .process("fhirProfileValidator") + .setHeader(Constants.METHOD_OUTCOME, method("medicationStatementDao", "create(${body}, ${headers.FhirRequestDetails})")) .process("ehrIdLookupProcessor") .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java index 76a2548be..27f884749 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java @@ -16,9 +16,15 @@ package org.ehrbase.fhirbridge.camel.route; +import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.FhirBridgeConstants; +import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; +import org.ehrbase.client.openehrclient.VersionUid; +import org.ehrbase.fhirbridge.camel.Constants; +import org.ehrbase.fhirbridge.camel.processor.FhirResourcePersistenceProcessor; +import org.ehrbase.fhirbridge.core.repository.ResourceMapRepository; import org.hl7.fhir.r4.model.Observation; +import org.springframework.context.annotation.Bean; import org.springframework.stereotype.Component; /** @@ -35,12 +41,28 @@ public void configure() throws Exception { // @formatter:off super.configure(); + // 'Provide Observation' route definition + from("observation-provide:consumer?fhirContext=#fhirContext") + .process("fhirProfileValidator") + .process("observationPersistenceProcessor") + .process("ehrIdLookupProcessor") + .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") + .choice() + .when(header(Constants.VERSION_UID).isNotNull()) + .process(exchange -> { + CompositionEntity composition = exchange.getIn().getMandatoryBody(CompositionEntity.class); + composition.setVersionUid(new VersionUid(exchange.getIn().getHeader(Constants.VERSION_UID, String.class))); + }) + .end() + .to("ehr-composition:producer?operation=mergeCompositionEntity") + .setBody(exchangeProperty(Constants.METHOD_OUTCOME)); + // 'Create Observation' route definition from("observation-create:consumer?fhirContext=#fhirContext") .onCompletion() .process("auditCreateResourceProcessor") .end() - .process("resourceProfileValidator") + .process("fhirProfileValidator") .to("direct:process-observation"); // 'Find Observation' route definition @@ -54,7 +76,7 @@ public void configure() throws Exception { // Internal routes definition from("direct:process-observation") - .setHeader(FhirBridgeConstants.METHOD_OUTCOME, method("observationDao", "create(${body}, ${headers.FhirRequestDetails})")) + .setHeader(Constants.METHOD_OUTCOME, method("observationDao", "create(${body}, ${headers.FhirRequestDetails})")) .process("ehrIdLookupProcessor") .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") .to("ehr-composition:compositionEndpoint?operation=mergeCompositionEntity") @@ -62,4 +84,10 @@ public void configure() throws Exception { // @formatter:on } + + @Bean + public FhirResourcePersistenceProcessor<Observation> observationPersistenceProcessor(IFhirResourceDao<Observation> observationDao, + ResourceMapRepository resourceMapRepository) { + return new FhirResourcePersistenceProcessor<>(observationDao, Observation.class, resourceMapRepository); + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java index e209c7311..2cf29787e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java @@ -17,7 +17,7 @@ package org.ehrbase.fhirbridge.camel.route; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.FhirBridgeConstants; +import org.ehrbase.fhirbridge.camel.Constants; import org.hl7.fhir.r4.model.Patient; import org.springframework.stereotype.Component; @@ -40,12 +40,12 @@ public void configure() throws Exception { .onCompletion() .process("auditCreateResourceProcessor") .end() - .process("resourceProfileValidator") - .setHeader(FhirBridgeConstants.METHOD_OUTCOME, method("patientDao", "create(${body}, ${headers.FhirRequestDetails})")) + .process("fhirProfileValidator") + .setHeader(Constants.METHOD_OUTCOME, method("patientDao", "create(${body}, ${headers.FhirRequestDetails})")) .process("ehrIdLookupProcessor") .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") - .setBody(header(FhirBridgeConstants.METHOD_OUTCOME)); + .setBody(header(Constants.METHOD_OUTCOME)); // 'Find Patient' route definition from("patient-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java index a3e3d9bf1..dfc85a76b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java @@ -17,7 +17,7 @@ package org.ehrbase.fhirbridge.camel.route; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.FhirBridgeConstants; +import org.ehrbase.fhirbridge.camel.Constants; import org.ehrbase.fhirbridge.camel.processor.ResourceResponseProcessor; import org.hl7.fhir.r4.model.Procedure; import org.springframework.stereotype.Component; @@ -41,8 +41,8 @@ public void configure() throws Exception { .onCompletion() .process("auditCreateResourceProcessor") .end() - .process("resourceProfileValidator") - .setHeader(FhirBridgeConstants.METHOD_OUTCOME, method("procedureDao", "create(${body}, ${headers.FhirRequestDetails})")) + .process("fhirProfileValidator") + .setHeader(Constants.METHOD_OUTCOME, method("procedureDao", "create(${body}, ${headers.FhirRequestDetails})")) .process("ehrIdLookupProcessor") .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java index 50a8af03d..775414158 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java @@ -17,7 +17,7 @@ package org.ehrbase.fhirbridge.camel.route; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.FhirBridgeConstants; +import org.ehrbase.fhirbridge.camel.Constants; import org.hl7.fhir.r4.model.QuestionnaireResponse; import org.springframework.stereotype.Component; @@ -40,8 +40,8 @@ public void configure() throws Exception { .onCompletion() .process("auditCreateResourceProcessor") .end() - .process("resourceProfileValidator") - .setHeader(FhirBridgeConstants.METHOD_OUTCOME, method("questionnaireResponseDao", "create(${body}, ${headers.FhirRequestDetails})")) + .process("fhirProfileValidator") + .setHeader(Constants.METHOD_OUTCOME, method("questionnaireResponseDao", "create(${body}, ${headers.FhirRequestDetails})")) .process("ehrIdLookupProcessor") .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") diff --git a/src/main/java/org/ehrbase/fhirbridge/config/FhirBridgeJpaConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/FhirBridgeJpaConfiguration.java deleted file mode 100644 index 49ea3c8b0..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/config/FhirBridgeJpaConfiguration.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.ehrbase.fhirbridge.config; - -import org.springframework.context.annotation.Configuration; -import org.springframework.data.jpa.repository.config.EnableJpaRepositories; - -@Configuration -@EnableJpaRepositories(basePackages = "org.ehrbase.fhirbridge.fhir.support") -public class FhirBridgeJpaConfiguration { - -} diff --git a/src/main/java/org/ehrbase/fhirbridge/config/FhirJpaConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/FhirJpaConfiguration.java deleted file mode 100644 index 24069c307..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/config/FhirJpaConfiguration.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.config; - -import ca.uhn.fhir.jpa.api.config.DaoConfig; -import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; -import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoCodeSystem; -import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoConceptMap; -import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoSearchParameter; -import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoValueSet; -import ca.uhn.fhir.jpa.config.r4.BaseR4Config; -import ca.uhn.fhir.jpa.dao.JpaResourceDao; -import ca.uhn.fhir.jpa.dao.r4.FhirResourceDaoCodeSystemR4; -import ca.uhn.fhir.jpa.dao.r4.FhirResourceDaoConceptMapR4; -import ca.uhn.fhir.jpa.dao.r4.FhirResourceDaoSearchParameterR4; -import ca.uhn.fhir.jpa.dao.r4.FhirResourceDaoValueSetR4; -import ca.uhn.fhir.jpa.model.config.PartitionSettings; -import ca.uhn.fhir.jpa.model.entity.ModelConfig; -import org.hl7.fhir.r4.model.AuditEvent; -import org.hl7.fhir.r4.model.CodeSystem; -import org.hl7.fhir.r4.model.CodeableConcept; -import org.hl7.fhir.r4.model.Coding; -import org.hl7.fhir.r4.model.ConceptMap; -import org.hl7.fhir.r4.model.Condition; -import org.hl7.fhir.r4.model.Consent; -import org.hl7.fhir.r4.model.Device; -import org.hl7.fhir.r4.model.DiagnosticReport; -import org.hl7.fhir.r4.model.Group; -import org.hl7.fhir.r4.model.Location; -import org.hl7.fhir.r4.model.MedicationStatement; -import org.hl7.fhir.r4.model.Observation; -import org.hl7.fhir.r4.model.Patient; -import org.hl7.fhir.r4.model.Procedure; -import org.hl7.fhir.r4.model.QuestionnaireResponse; -import org.hl7.fhir.r4.model.SearchParameter; -import org.hl7.fhir.r4.model.ValueSet; -import org.springframework.boot.autoconfigure.orm.jpa.JpaProperties; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Primary; -import org.springframework.orm.jpa.JpaTransactionManager; -import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; -import org.springframework.transaction.PlatformTransactionManager; - -import javax.persistence.EntityManagerFactory; -import javax.sql.DataSource; - -/** - * {@link Configuration Configuration} for HAPI FHIR JPA Server module. - * - * @since 1.0.0 - */ -@Configuration -@EnableConfigurationProperties(FhirJpaProperties.class) -public class FhirJpaConfiguration extends BaseR4Config { - - private final FhirJpaProperties fhirJpaProperties; - - private final JpaProperties jpaProperties; - - private final DataSource dataSource; - - public FhirJpaConfiguration(FhirJpaProperties fhirJpaProperties, JpaProperties jpaProperties, DataSource dataSource) { - this.fhirJpaProperties = fhirJpaProperties; - this.jpaProperties = jpaProperties; - this.dataSource = dataSource; - } - - @Bean - public DaoConfig daoConfig() { - DaoConfig daoConfig = new DaoConfig(); - daoConfig.setAllowInlineMatchUrlReferences(fhirJpaProperties.isAllowInlineMatchUrlReferences()); - daoConfig.setAutoCreatePlaceholderReferenceTargets(fhirJpaProperties.isAutoCreatePlaceholderReferences()); - daoConfig.setPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets(fhirJpaProperties.isPopulateIdentifierInAutoCreatedPlaceholderReferences()); - return daoConfig; - } - - @Bean - public ModelConfig modelConfig() { - ModelConfig config = new ModelConfig(); - config.setAllowExternalReferences(fhirJpaProperties.isAllowExternalReferences()); - return config; - } - - @Bean - public PartitionSettings partitionSettings() { - return new PartitionSettings(); - } - - @Bean - @Override - protected LocalContainerEntityManagerFactoryBean entityManagerFactory() { - LocalContainerEntityManagerFactoryBean entityManagerFactory = super.entityManagerFactory(); - entityManagerFactory.setPersistenceUnitName("HAPI_PU"); - entityManagerFactory.setDataSource(dataSource); - entityManagerFactory.setJpaPropertyMap(jpaProperties.getProperties()); - entityManagerFactory.setPackagesToScan( - "ca.uhn.fhir.jpa.model.entity", - "ca.uhn.fhir.jpa.entity", - "org.ehrbase.fhirbridge.fhir.support" - ); - return entityManagerFactory; - } - - @Primary - @Bean - public PlatformTransactionManager hapiTransactionManager(EntityManagerFactory entityManagerFactory) { - JpaTransactionManager transactionManager = new JpaTransactionManager(); - transactionManager.setEntityManagerFactory(entityManagerFactory); - return transactionManager; - } - - @Bean - public IFhirResourceDao<AuditEvent> auditEventDao() { - JpaResourceDao<AuditEvent> resourceDao = new JpaResourceDao<>(); - resourceDao.setResourceType(AuditEvent.class); - resourceDao.setContext(fhirContext()); - return resourceDao; - } - - @Bean - public IFhirResourceDao<Condition> conditionDao() { - JpaResourceDao<Condition> resourceDao = new JpaResourceDao<>(); - resourceDao.setResourceType(Condition.class); - resourceDao.setContext(fhirContext()); - return resourceDao; - } - - @Bean - public IFhirResourceDao<Consent> consentDao() { - JpaResourceDao<Consent> resourceDao = new JpaResourceDao<>(); - resourceDao.setResourceType(Consent.class); - resourceDao.setContext(fhirContext()); - return resourceDao; - } - - @Bean - public IFhirResourceDao<Device> deviceDao() { - JpaResourceDao<Device> resourceDao = new JpaResourceDao<>(); - resourceDao.setResourceType(Device.class); - resourceDao.setContext(fhirContext()); - return resourceDao; - } - - @Bean - public IFhirResourceDao<DiagnosticReport> diagnosticReportDao() { - JpaResourceDao<DiagnosticReport> resourceDao = new JpaResourceDao<>(); - resourceDao.setResourceType(DiagnosticReport.class); - resourceDao.setContext(fhirContext()); - return resourceDao; - } - - @Bean - public IFhirResourceDao<Group> groupDao() { - JpaResourceDao<Group> resourceDao = new JpaResourceDao<>(); - resourceDao.setResourceType(Group.class); - resourceDao.setContext(fhirContext()); - return resourceDao; - } - - @Bean - public IFhirResourceDao<Location> locationDao() { - JpaResourceDao<Location> resourceDao = new JpaResourceDao<>(); - resourceDao.setResourceType(Location.class); - resourceDao.setContext(fhirContext()); - return resourceDao; - } - - @Bean - public IFhirResourceDao<MedicationStatement> medicationStatementDao() { - JpaResourceDao<MedicationStatement> resourceDao = new JpaResourceDao<>(); - resourceDao.setResourceType(MedicationStatement.class); - resourceDao.setContext(fhirContext()); - return resourceDao; - } - - @Bean - public IFhirResourceDao<Observation> observationDao() { - JpaResourceDao<Observation> resourceDao = new JpaResourceDao<>(); - resourceDao.setResourceType(Observation.class); - resourceDao.setContext(fhirContext()); - return resourceDao; - } - - @Bean - public IFhirResourceDao<Patient> patientDao() { - JpaResourceDao<Patient> resourceDao = new JpaResourceDao<>(); - resourceDao.setResourceType(Patient.class); - resourceDao.setContext(fhirContext()); - return resourceDao; - } - - @Bean - public IFhirResourceDao<Procedure> procedureDao() { - JpaResourceDao<Procedure> resourceDao = new JpaResourceDao<>(); - resourceDao.setResourceType(Procedure.class); - resourceDao.setContext(fhirContext()); - return resourceDao; - } - - @Bean - public IFhirResourceDao<QuestionnaireResponse> questionnaireResponseDao() { - JpaResourceDao<QuestionnaireResponse> resourceDao = new JpaResourceDao<>(); - resourceDao.setResourceType(QuestionnaireResponse.class); - resourceDao.setContext(fhirContext()); - return resourceDao; - } - - @Bean(name = "myCodeSystemDaoR4") - public IFhirResourceDaoCodeSystem<CodeSystem, Coding, CodeableConcept> codeSystemDao() { - FhirResourceDaoCodeSystemR4 codeSystemDao = new FhirResourceDaoCodeSystemR4(); - codeSystemDao.setResourceType(CodeSystem.class); - codeSystemDao.setContext(fhirContext()); - return codeSystemDao; - } - - @Bean(name = "myValueSetDaoR4") - public IFhirResourceDaoValueSet<ValueSet, Coding, CodeableConcept> valueSetDao() { - FhirResourceDaoValueSetR4 valueSetDao = new FhirResourceDaoValueSetR4(); - valueSetDao.setResourceType(ValueSet.class); - valueSetDao.setContext(fhirContext()); - return valueSetDao; - } - - @Bean(name = "myConceptMapDaoR4") - public IFhirResourceDaoConceptMap<ConceptMap> conceptMapDao() { - FhirResourceDaoConceptMapR4 conceptMapDao = new FhirResourceDaoConceptMapR4(); - conceptMapDao.setResourceType(ConceptMap.class); - conceptMapDao.setContext(fhirContext()); - return conceptMapDao; - } - - @Bean(name = "mySearchParameterDaoR4") - public IFhirResourceDaoSearchParameter<SearchParameter> searchParameterDao() { - FhirResourceDaoSearchParameterR4 searchParameterDao = new FhirResourceDaoSearchParameterR4(); - searchParameterDao.setResourceType(SearchParameter.class); - searchParameterDao.setContext(fhirContext()); - return searchParameterDao; - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java new file mode 100644 index 000000000..37401a043 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java @@ -0,0 +1,210 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.config; + +import ca.uhn.fhir.jpa.api.config.DaoConfig; +import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; +import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoCodeSystem; +import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoConceptMap; +import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoSearchParameter; +import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoValueSet; +import ca.uhn.fhir.jpa.config.r4.BaseR4Config; +import ca.uhn.fhir.jpa.dao.JpaResourceDao; +import ca.uhn.fhir.jpa.dao.r4.FhirResourceDaoCodeSystemR4; +import ca.uhn.fhir.jpa.dao.r4.FhirResourceDaoConceptMapR4; +import ca.uhn.fhir.jpa.dao.r4.FhirResourceDaoSearchParameterR4; +import ca.uhn.fhir.jpa.dao.r4.FhirResourceDaoValueSetR4; +import ca.uhn.fhir.jpa.model.config.PartitionSettings; +import ca.uhn.fhir.jpa.model.entity.ModelConfig; +import org.hl7.fhir.r4.model.AuditEvent; +import org.hl7.fhir.r4.model.CodeSystem; +import org.hl7.fhir.r4.model.CodeableConcept; +import org.hl7.fhir.r4.model.Coding; +import org.hl7.fhir.r4.model.ConceptMap; +import org.hl7.fhir.r4.model.Condition; +import org.hl7.fhir.r4.model.Consent; +import org.hl7.fhir.r4.model.DiagnosticReport; +import org.hl7.fhir.r4.model.MedicationStatement; +import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.r4.model.Patient; +import org.hl7.fhir.r4.model.Procedure; +import org.hl7.fhir.r4.model.QuestionnaireResponse; +import org.hl7.fhir.r4.model.SearchParameter; +import org.hl7.fhir.r4.model.ValueSet; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * {@link Configuration Configuration} for HAPI FHIR JPA Server. + * + * @since 1.0.0 + */ +@Configuration +@EnableConfigurationProperties(HapiFhirJpaProperties.class) +public class HapiFhirJpaConfiguration extends BaseR4Config { + + @Bean + public DaoConfig daoConfig(HapiFhirJpaProperties properties) { + var config = new DaoConfig(); + config.setAllowInlineMatchUrlReferences(properties.isAllowInlineMatchUrlReferences()); + config.setAutoCreatePlaceholderReferenceTargets(properties.isAutoCreatePlaceholderReferences()); + config.setPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets(properties.isPopulateIdentifierInAutoCreatedPlaceholderReferences()); + return config; + } + + @Bean + public ModelConfig modelConfig(HapiFhirJpaProperties properties) { + var config = new ModelConfig(); + config.setAllowExternalReferences(properties.isAllowExternalReferences()); + return config; + } + + @Bean + public PartitionSettings partitionSettings() { + return new PartitionSettings(); + } + + @Bean + public IFhirResourceDao<AuditEvent> auditEventDao() { + JpaResourceDao<AuditEvent> resourceDao = new JpaResourceDao<>(); + resourceDao.setResourceType(AuditEvent.class); + resourceDao.setContext(fhirContext()); + return resourceDao; + } + + @Bean + public IFhirResourceDao<Condition> conditionDao() { + JpaResourceDao<Condition> conditionDao = new JpaResourceDao<>(); + conditionDao.setResourceType(Condition.class); + conditionDao.setContext(fhirContext()); + return conditionDao; + } + + @Bean + public IFhirResourceDao<Consent> consentDao() { + JpaResourceDao<Consent> consentDao = new JpaResourceDao<>(); + consentDao.setResourceType(Consent.class); + consentDao.setContext(fhirContext()); + return consentDao; + } + + @Bean + public IFhirResourceDao<DiagnosticReport> diagnosticReportDao() { + JpaResourceDao<DiagnosticReport> diagnosticReportDao = new JpaResourceDao<>(); + diagnosticReportDao.setResourceType(DiagnosticReport.class); + diagnosticReportDao.setContext(fhirContext()); + return diagnosticReportDao; + } + +// +// @Bean +// public IFhirResourceDao<Device> deviceDao() { +// JpaResourceDao<Device> resourceDao = new JpaResourceDao<>(); +// resourceDao.setResourceType(Device.class); +// resourceDao.setContext(fhirContext()); +// return resourceDao; +// } +// +// @Bean +// public IFhirResourceDao<Group> groupDao() { +// JpaResourceDao<Group> resourceDao = new JpaResourceDao<>(); +// resourceDao.setResourceType(Group.class); +// resourceDao.setContext(fhirContext()); +// return resourceDao; +// } +// +// @Bean +// public IFhirResourceDao<Location> locationDao() { +// JpaResourceDao<Location> resourceDao = new JpaResourceDao<>(); +// resourceDao.setResourceType(Location.class); +// resourceDao.setContext(fhirContext()); +// return resourceDao; +// } + + @Bean + public IFhirResourceDao<MedicationStatement> medicationStatementDao() { + JpaResourceDao<MedicationStatement> medicationStatementDao = new JpaResourceDao<>(); + medicationStatementDao.setResourceType(MedicationStatement.class); + medicationStatementDao.setContext(fhirContext()); + return medicationStatementDao; + } + + @Bean + public IFhirResourceDao<Observation> observationDao() { + JpaResourceDao<Observation> observationDao = new JpaResourceDao<>(); + observationDao.setResourceType(Observation.class); + observationDao.setContext(fhirContext()); + return observationDao; + } + + @Bean + public IFhirResourceDao<Patient> patientDao() { + JpaResourceDao<Patient> patientDao = new JpaResourceDao<>(); + patientDao.setResourceType(Patient.class); + patientDao.setContext(fhirContext()); + return patientDao; + } + + @Bean + public IFhirResourceDao<Procedure> procedureDao() { + JpaResourceDao<Procedure> procedureDao = new JpaResourceDao<>(); + procedureDao.setResourceType(Procedure.class); + procedureDao.setContext(fhirContext()); + return procedureDao; + } + + @Bean + public IFhirResourceDao<QuestionnaireResponse> questionnaireResponseDao() { + JpaResourceDao<QuestionnaireResponse> questionnaireResponseDao = new JpaResourceDao<>(); + questionnaireResponseDao.setResourceType(QuestionnaireResponse.class); + questionnaireResponseDao.setContext(fhirContext()); + return questionnaireResponseDao; + } + + @Bean(name = "myCodeSystemDaoR4") + public IFhirResourceDaoCodeSystem<CodeSystem, Coding, CodeableConcept> codeSystemDao() { + var codeSystemDao = new FhirResourceDaoCodeSystemR4(); + codeSystemDao.setResourceType(CodeSystem.class); + codeSystemDao.setContext(fhirContext()); + return codeSystemDao; + } + + @Bean(name = "myValueSetDaoR4") + public IFhirResourceDaoValueSet<ValueSet, Coding, CodeableConcept> valueSetDao() { + var valueSetDao = new FhirResourceDaoValueSetR4(); + valueSetDao.setResourceType(ValueSet.class); + valueSetDao.setContext(fhirContext()); + return valueSetDao; + } + + @Bean(name = "myConceptMapDaoR4") + public IFhirResourceDaoConceptMap<ConceptMap> conceptMapDao() { + var conceptMapDao = new FhirResourceDaoConceptMapR4(); + conceptMapDao.setResourceType(ConceptMap.class); + conceptMapDao.setContext(fhirContext()); + return conceptMapDao; + } + + @Bean(name = "mySearchParameterDaoR4") + public IFhirResourceDaoSearchParameter<SearchParameter> searchParameterDao() { + var searchParameterDao = new FhirResourceDaoSearchParameterR4(); + searchParameterDao.setResourceType(SearchParameter.class); + searchParameterDao.setContext(fhirContext()); + return searchParameterDao; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/config/FhirJpaProperties.java b/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaProperties.java similarity index 97% rename from src/main/java/org/ehrbase/fhirbridge/config/FhirJpaProperties.java rename to src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaProperties.java index 67e47c595..f6f2d04df 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/FhirJpaProperties.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaProperties.java @@ -19,12 +19,12 @@ import org.springframework.boot.context.properties.ConfigurationProperties; /** - * {@link ConfigurationProperties ConfigurationProperties} to configure HAPI FHIR JPA Server module. + * {@link ConfigurationProperties ConfigurationProperties} to configure HAPI FHIR JPA Server. * * @since 1.0.0 */ @ConfigurationProperties(prefix = "fhir-bridge.fhir.jpa") -public class FhirJpaProperties { +public class HapiFhirJpaProperties { private boolean allowExternalReferences = true; diff --git a/src/main/java/org/ehrbase/fhirbridge/config/JpaConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/JpaConfiguration.java new file mode 100644 index 000000000..a918aa3c9 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/config/JpaConfiguration.java @@ -0,0 +1,44 @@ +package org.ehrbase.fhirbridge.config; + +import ca.uhn.fhir.jpa.config.HapiFhirLocalContainerEntityManagerFactoryBean; +import org.hibernate.jpa.HibernatePersistenceProvider; +import org.springframework.boot.autoconfigure.orm.jpa.JpaProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; +import org.springframework.context.annotation.Primary; +import org.springframework.data.jpa.repository.config.EnableJpaRepositories; +import org.springframework.orm.jpa.JpaTransactionManager; +import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; +import org.springframework.transaction.PlatformTransactionManager; + +import javax.persistence.EntityManagerFactory; +import javax.sql.DataSource; + +/** + * @since 1.2.0 + */ +@Configuration +@EnableJpaRepositories(basePackages = "org.ehrbase.fhirbridge.core.repository") +@Import(HapiFhirJpaConfiguration.class) +public class JpaConfiguration { + + @Bean + public LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource, JpaProperties properties) { + var entityManagerFactory = new HapiFhirLocalContainerEntityManagerFactoryBean(); + entityManagerFactory.setDataSource(dataSource); + entityManagerFactory.setPackagesToScan( + "org.ehrbase.fhirbridge.core.domain", + "ca.uhn.fhir.jpa.model.entity", + "ca.uhn.fhir.jpa.entity"); + entityManagerFactory.setPersistenceProvider(new HibernatePersistenceProvider()); + entityManagerFactory.setJpaPropertyMap(properties.getProperties()); + return entityManagerFactory; + } + + @Primary + @Bean(name = "hapiTransactionManager") + public PlatformTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) { + return new JpaTransactionManager(entityManagerFactory); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/core/domain/PatientId.java b/src/main/java/org/ehrbase/fhirbridge/core/domain/PatientId.java new file mode 100644 index 000000000..59b0af9f7 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/core/domain/PatientId.java @@ -0,0 +1,76 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.core.domain; + +import org.hibernate.annotations.Type; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import java.util.Objects; +import java.util.UUID; + +/** + * PatientId JPA Entity. + * + * @since 1.0.0 + */ +@Entity +@Table(name = "FB_PATIENT_ID") +public class PatientId { + + @Id + @GeneratedValue + @Type(type = "uuid-char") + private UUID uuid; + + public UUID getUuid() { + return uuid; + } + + public String getUuidAsString() { + if (uuid == null) { + return null; + } + return uuid.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatientId that = (PatientId) o; + return Objects.equals(uuid, that.uuid); + } + + @Override + public int hashCode() { + return Objects.hash(uuid); + } + + @Override + public String toString() { + return "PatientId{" + + "uuid=" + uuid + + '}'; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/core/domain/ResourceMap.java b/src/main/java/org/ehrbase/fhirbridge/core/domain/ResourceMap.java new file mode 100644 index 000000000..8de21d523 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/core/domain/ResourceMap.java @@ -0,0 +1,82 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.core.domain; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import java.util.Objects; +import java.util.UUID; + +/** + * ResourceMap JPA Entity. + * + * @since 1.2.0 + */ +@Entity +@Table(name = "FB_RESOURCE_MAP") +public class ResourceMap { + + @Id + @Column(name = "RES_ID") + private String id; + + @Column(name = "VERSION_UID") + private UUID versionUid; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public UUID getVersionUid() { + return versionUid; + } + + public void setVersionUid(UUID versionUid) { + this.versionUid = versionUid; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceMap that = (ResourceMap) o; + return Objects.equals(id, that.id) && Objects.equals(versionUid, that.versionUid); + } + + @Override + public int hashCode() { + return Objects.hash(id, versionUid); + } + + @Override + public String toString() { + return "ResourceMap{" + + "id='" + id + '\'' + + ", versionUid=" + versionUid + + '}'; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/core/repository/PatientIdRepository.java b/src/main/java/org/ehrbase/fhirbridge/core/repository/PatientIdRepository.java new file mode 100644 index 000000000..774ea15ec --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/core/repository/PatientIdRepository.java @@ -0,0 +1,30 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.core.repository; + +import org.ehrbase.fhirbridge.core.domain.PatientId; +import org.springframework.data.jpa.repository.JpaRepository; + +import java.util.UUID; + +/** + * Spring Data JPA Repository for {@link PatientId}. + * + * @since 1.2.0 + */ +public interface PatientIdRepository extends JpaRepository<PatientId, UUID> { +} diff --git a/src/main/java/org/ehrbase/fhirbridge/core/repository/ResourceMapRepository.java b/src/main/java/org/ehrbase/fhirbridge/core/repository/ResourceMapRepository.java new file mode 100644 index 000000000..b4559e027 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/core/repository/ResourceMapRepository.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.core.repository; + +import org.ehrbase.fhirbridge.core.domain.ResourceMap; +import org.springframework.data.jpa.repository.JpaRepository; + +/** + * Spring Data JPA Repository for {@link ResourceMap}. + * + * @since 1.2.0 + */ +public interface ResourceMapRepository extends JpaRepository<ResourceMap, String> { +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/Composition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/Composition.java deleted file mode 100644 index 8ceb0451a..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/Composition.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.ehrbase.fhirbridge.ehr; - -import org.ehrbase.client.openehrclient.VersionUid; - -// TODO: To be replaced by abstract class coming from EHRbase SDK -public interface Composition { - - VersionUid getVersionUid(); -} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/atemfrequenzcomposition/AtemfrequenzComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/atemfrequenzcomposition/AtemfrequenzComposition.java index 0557ce3ce..804353603 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/atemfrequenzcomposition/AtemfrequenzComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/atemfrequenzcomposition/AtemfrequenzComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,269 +17,272 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.atemfrequenzcomposition.definition.AtemfrequenzObservation; import org.ehrbase.fhirbridge.ehr.opt.atemfrequenzcomposition.definition.StatusDefiningCode; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:50:22.043058+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-09T11:50:22.043058+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("Atemfrequenz") -public class AtemfrequenzComposition implements CompositionEntity, Composition { - /** - * Path: Atemfrequenz/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Atemfrequenz/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: Atemfrequenz/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: Atemfrequenz/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: Atemfrequenz/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]/value|value") - private String kategorieValue; - - /** - * Path: Atemfrequenz/context/Baum/Kategorie/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") - private NullFlavour kategorieNullFlavourDefiningCode; - - /** - * Path: Atemfrequenz/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Atemfrequenz/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Atemfrequenz/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Atemfrequenz/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Atemfrequenz/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Atemfrequenz/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Atemfrequenz/Atemfrequenz - * Description: Die Charakteristiken der Spontanatmung einer Person. - */ - @Path("/content[openEHR-EHR-OBSERVATION.respiration.v2]") - private AtemfrequenzObservation atemfrequenz; - - /** - * Path: Atemfrequenz/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Atemfrequenz/language - */ - @Path("/language") - private Language language; - - /** - * Path: Atemfrequenz/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Atemfrequenz/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorieValue(String kategorieValue) { - this.kategorieValue = kategorieValue; - } - - public String getKategorieValue() { - return this.kategorieValue ; - } - - public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { - this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; - } - - public NullFlavour getKategorieNullFlavourDefiningCode() { - return this.kategorieNullFlavourDefiningCode ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } +public class AtemfrequenzComposition implements CompositionEntity { + /** + * Path: Atemfrequenz/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Atemfrequenz/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: Atemfrequenz/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: Atemfrequenz/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: Atemfrequenz/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]/value|value") + private String kategorieValue; + + /** + * Path: Atemfrequenz/context/Baum/Kategorie/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") + private NullFlavour kategorieNullFlavourDefiningCode; + + /** + * Path: Atemfrequenz/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Atemfrequenz/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Atemfrequenz/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Atemfrequenz/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Atemfrequenz/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Atemfrequenz/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Atemfrequenz/Atemfrequenz + * Description: Die Charakteristiken der Spontanatmung einer Person. + */ + @Path("/content[openEHR-EHR-OBSERVATION.respiration.v2]") + private AtemfrequenzObservation atemfrequenz; + + /** + * Path: Atemfrequenz/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Atemfrequenz/language + */ + @Path("/language") + private Language language; + + /** + * Path: Atemfrequenz/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Atemfrequenz/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public String getKategorieValue() { + return this.kategorieValue; + } + + public void setKategorieValue(String kategorieValue) { + this.kategorieValue = kategorieValue; + } + + public NullFlavour getKategorieNullFlavourDefiningCode() { + return this.kategorieNullFlavourDefiningCode; + } + + public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { + this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } - public void setAtemfrequenz(AtemfrequenzObservation atemfrequenz) { - this.atemfrequenz = atemfrequenz; - } + public AtemfrequenzObservation getAtemfrequenz() { + return this.atemfrequenz; + } - public AtemfrequenzObservation getAtemfrequenz() { - return this.atemfrequenz ; - } + public void setAtemfrequenz(AtemfrequenzObservation atemfrequenz) { + this.atemfrequenz = atemfrequenz; + } - public void setComposer(PartyProxy composer) { - this.composer = composer; - } + public PartyProxy getComposer() { + return this.composer; + } - public PartyProxy getComposer() { - return this.composer ; - } + public void setComposer(PartyProxy composer) { + this.composer = composer; + } - public void setLanguage(Language language) { - this.language = language; - } + public Language getLanguage() { + return this.language; + } - public Language getLanguage() { - return this.language ; - } + public void setLanguage(Language language) { + this.language = language; + } - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } + public FeederAudit getFeederAudit() { + return this.feederAudit; + } - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } - public void setTerritory(Territory territory) { - this.territory = territory; - } + public Territory getTerritory() { + return this.territory; + } - public Territory getTerritory() { - return this.territory ; - } + public void setTerritory(Territory territory) { + this.territory = territory; + } - public VersionUid getVersionUid() { - return this.versionUid ; - } + public VersionUid getVersionUid() { + return this.versionUid; + } - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/beatmungswertecomposition/BeatmungswerteComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/beatmungswertecomposition/BeatmungswerteComposition.java index 7b01ee462..76821e136 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/beatmungswertecomposition/BeatmungswerteComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/beatmungswertecomposition/BeatmungswerteComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,270 +17,273 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.beatmungswertecomposition.definition.BeobachtungenAmBeatmungsgeraetObservation; import org.ehrbase.fhirbridge.ehr.opt.beatmungswertecomposition.definition.StatusDefiningCode; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:51:09.712415+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-09T11:51:09.712415+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("Beatmungswerte") -public class BeatmungswerteComposition implements CompositionEntity, Composition { - /** - * Path: Beatmungswerte/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Beatmungswerte/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: Beatmungswerte/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: Beatmungswerte/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: Beatmungswerte/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]/value|value") - private String kategorieValue; - - /** - * Path: Beatmungswerte/context/Baum/Kategorie/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") - private NullFlavour kategorieNullFlavourDefiningCode; - - /** - * Path: Beatmungswerte/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Beatmungswerte/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Beatmungswerte/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Beatmungswerte/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Beatmungswerte/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Beatmungswerte/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Beatmungswerte/Beobachtungen am Beatmungsgerät - * Description: Vom Beatmungsgerät zurückgegebene Beobachtungsergebnisse. - */ - @Path("/content[openEHR-EHR-OBSERVATION.ventilator_vital_signs.v0]") - private BeobachtungenAmBeatmungsgeraetObservation beobachtungenAmBeatmungsgeraet; - - /** - * Path: Beatmungswerte/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Beatmungswerte/language - */ - @Path("/language") - private Language language; - - /** - * Path: Beatmungswerte/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Beatmungswerte/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorieValue(String kategorieValue) { - this.kategorieValue = kategorieValue; - } - - public String getKategorieValue() { - return this.kategorieValue ; - } - - public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { - this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; - } - - public NullFlavour getKategorieNullFlavourDefiningCode() { - return this.kategorieNullFlavourDefiningCode ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } +public class BeatmungswerteComposition implements CompositionEntity { + /** + * Path: Beatmungswerte/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Beatmungswerte/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: Beatmungswerte/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: Beatmungswerte/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: Beatmungswerte/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]/value|value") + private String kategorieValue; + + /** + * Path: Beatmungswerte/context/Baum/Kategorie/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") + private NullFlavour kategorieNullFlavourDefiningCode; + + /** + * Path: Beatmungswerte/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Beatmungswerte/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Beatmungswerte/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Beatmungswerte/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Beatmungswerte/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Beatmungswerte/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Beatmungswerte/Beobachtungen am Beatmungsgerät + * Description: Vom Beatmungsgerät zurückgegebene Beobachtungsergebnisse. + */ + @Path("/content[openEHR-EHR-OBSERVATION.ventilator_vital_signs.v0]") + private BeobachtungenAmBeatmungsgeraetObservation beobachtungenAmBeatmungsgeraet; + + /** + * Path: Beatmungswerte/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Beatmungswerte/language + */ + @Path("/language") + private Language language; + + /** + * Path: Beatmungswerte/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Beatmungswerte/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public String getKategorieValue() { + return this.kategorieValue; + } + + public void setKategorieValue(String kategorieValue) { + this.kategorieValue = kategorieValue; + } + + public NullFlavour getKategorieNullFlavourDefiningCode() { + return this.kategorieNullFlavourDefiningCode; + } + + public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { + this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public BeobachtungenAmBeatmungsgeraetObservation getBeobachtungenAmBeatmungsgeraet() { + return this.beobachtungenAmBeatmungsgeraet; + } - public void setBeobachtungenAmBeatmungsgeraet( - BeobachtungenAmBeatmungsgeraetObservation beobachtungenAmBeatmungsgeraet) { - this.beobachtungenAmBeatmungsgeraet = beobachtungenAmBeatmungsgeraet; - } - - public BeobachtungenAmBeatmungsgeraetObservation getBeobachtungenAmBeatmungsgeraet() { - return this.beobachtungenAmBeatmungsgeraet ; - } - - public void setComposer(PartyProxy composer) { - this.composer = composer; - } - - public PartyProxy getComposer() { - return this.composer ; - } - - public void setLanguage(Language language) { - this.language = language; - } - - public Language getLanguage() { - return this.language ; - } - - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } - - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } - - public void setTerritory(Territory territory) { - this.territory = territory; - } - - public Territory getTerritory() { - return this.territory ; - } - - public VersionUid getVersionUid() { - return this.versionUid ; - } - - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setBeobachtungenAmBeatmungsgeraet( + BeobachtungenAmBeatmungsgeraetObservation beobachtungenAmBeatmungsgeraet) { + this.beobachtungenAmBeatmungsgeraet = beobachtungenAmBeatmungsgeraet; + } + + public PartyProxy getComposer() { + return this.composer; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } + + public Language getLanguage() { + return this.language; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public Territory getTerritory() { + return this.territory; + } + + public void setTerritory(Territory territory) { + this.territory = territory; + } + + public VersionUid getVersionUid() { + return this.versionUid; + } + + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/befundderblutgasanalysecomposition/BefundDerBlutgasanalyseComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/befundderblutgasanalysecomposition/BefundDerBlutgasanalyseComposition.java index 7a70256c6..e1f6a0694 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/befundderblutgasanalysecomposition/BefundDerBlutgasanalyseComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/befundderblutgasanalysecomposition/BefundDerBlutgasanalyseComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,269 +17,272 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.befundderblutgasanalysecomposition.definition.LaborergebnisObservation; import org.ehrbase.fhirbridge.ehr.opt.befundderblutgasanalysecomposition.definition.StatusDefiningCode; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T12:08:29.615541+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-09T12:08:29.615541+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("Befund der Blutgasanalyse") -public class BefundDerBlutgasanalyseComposition implements CompositionEntity, Composition { - /** - * Path: Befund der Blutgasanalyse/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Befund der Blutgasanalyse/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: Befund der Blutgasanalyse/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: Befund der Blutgasanalyse/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: Befund der Blutgasanalyse/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]/value|value") - private String kategorieValue; - - /** - * Path: Befund der Blutgasanalyse/context/Baum/Kategorie/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") - private NullFlavour kategorieNullFlavourDefiningCode; - - /** - * Path: Befund der Blutgasanalyse/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Befund der Blutgasanalyse/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Befund der Blutgasanalyse/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Befund der Blutgasanalyse/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Befund der Blutgasanalyse/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Befund der Blutgasanalyse/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Befund der Blutgasanalyse/Laborergebnis - * Description: Das Ergebnis - einschließlich der Befunde und der Interpretation des Labors - einer Untersuchung, die an Proben durchgeführt wurde, die von einer Einzelperson stammen oder mit dieser Person zusammenhängen. - */ - @Path("/content[openEHR-EHR-OBSERVATION.laboratory_test_result.v1]") - private LaborergebnisObservation laborergebnis; - - /** - * Path: Befund der Blutgasanalyse/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Befund der Blutgasanalyse/language - */ - @Path("/language") - private Language language; - - /** - * Path: Befund der Blutgasanalyse/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Befund der Blutgasanalyse/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorieValue(String kategorieValue) { - this.kategorieValue = kategorieValue; - } - - public String getKategorieValue() { - return this.kategorieValue ; - } - - public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { - this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; - } - - public NullFlavour getKategorieNullFlavourDefiningCode() { - return this.kategorieNullFlavourDefiningCode ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } +public class BefundDerBlutgasanalyseComposition implements CompositionEntity { + /** + * Path: Befund der Blutgasanalyse/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Befund der Blutgasanalyse/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: Befund der Blutgasanalyse/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: Befund der Blutgasanalyse/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: Befund der Blutgasanalyse/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]/value|value") + private String kategorieValue; + + /** + * Path: Befund der Blutgasanalyse/context/Baum/Kategorie/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") + private NullFlavour kategorieNullFlavourDefiningCode; + + /** + * Path: Befund der Blutgasanalyse/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Befund der Blutgasanalyse/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Befund der Blutgasanalyse/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Befund der Blutgasanalyse/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Befund der Blutgasanalyse/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Befund der Blutgasanalyse/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Befund der Blutgasanalyse/Laborergebnis + * Description: Das Ergebnis - einschließlich der Befunde und der Interpretation des Labors - einer Untersuchung, die an Proben durchgeführt wurde, die von einer Einzelperson stammen oder mit dieser Person zusammenhängen. + */ + @Path("/content[openEHR-EHR-OBSERVATION.laboratory_test_result.v1]") + private LaborergebnisObservation laborergebnis; + + /** + * Path: Befund der Blutgasanalyse/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Befund der Blutgasanalyse/language + */ + @Path("/language") + private Language language; + + /** + * Path: Befund der Blutgasanalyse/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Befund der Blutgasanalyse/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public String getKategorieValue() { + return this.kategorieValue; + } + + public void setKategorieValue(String kategorieValue) { + this.kategorieValue = kategorieValue; + } + + public NullFlavour getKategorieNullFlavourDefiningCode() { + return this.kategorieNullFlavourDefiningCode; + } + + public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { + this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } - public void setLaborergebnis(LaborergebnisObservation laborergebnis) { - this.laborergebnis = laborergebnis; - } + public LaborergebnisObservation getLaborergebnis() { + return this.laborergebnis; + } - public LaborergebnisObservation getLaborergebnis() { - return this.laborergebnis ; - } + public void setLaborergebnis(LaborergebnisObservation laborergebnis) { + this.laborergebnis = laborergebnis; + } - public void setComposer(PartyProxy composer) { - this.composer = composer; - } + public PartyProxy getComposer() { + return this.composer; + } - public PartyProxy getComposer() { - return this.composer ; - } + public void setComposer(PartyProxy composer) { + this.composer = composer; + } - public void setLanguage(Language language) { - this.language = language; - } + public Language getLanguage() { + return this.language; + } - public Language getLanguage() { - return this.language ; - } + public void setLanguage(Language language) { + this.language = language; + } - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } + public FeederAudit getFeederAudit() { + return this.feederAudit; + } - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } - public void setTerritory(Territory territory) { - this.territory = territory; - } + public Territory getTerritory() { + return this.territory; + } - public Territory getTerritory() { - return this.territory ; - } + public void setTerritory(Territory territory) { + this.territory = territory; + } - public VersionUid getVersionUid() { - return this.versionUid ; - } + public VersionUid getVersionUid() { + return this.versionUid; + } - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/blutdruckcomposition/BlutdruckComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/blutdruckcomposition/BlutdruckComposition.java index 2077b29f1..2cc2f2186 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/blutdruckcomposition/BlutdruckComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/blutdruckcomposition/BlutdruckComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -20,211 +16,214 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.blutdruckcomposition.definition.BlutdruckObservation; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:51:58.170497+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-09T11:51:58.170497+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("Blutdruck") -public class BlutdruckComposition implements CompositionEntity, Composition { - /** - * Path: Blutdruck/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Blutdruck/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: Blutdruck/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Blutdruck/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Blutdruck/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Blutdruck/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Blutdruck/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Blutdruck/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Blutdruck/Blutdruck - * Description: Die lokale Messung des arteriellen Blutdrucks als Surrogat für den arteriellen Druck in der systemischen Zirkulation. - * Comment: Häufig wird der Ausdruck 'Blutdruck' zur Bezeichung der Messung des brachialen Ateriendrucks im Oberarm verwendet. - */ - @Path("/content[openEHR-EHR-OBSERVATION.blood_pressure.v2]") - private BlutdruckObservation blutdruck; - - /** - * Path: Blutdruck/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Blutdruck/language - */ - @Path("/language") - private Language language; - - /** - * Path: Blutdruck/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Blutdruck/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } - - public void setBlutdruck(BlutdruckObservation blutdruck) { - this.blutdruck = blutdruck; - } - - public BlutdruckObservation getBlutdruck() { - return this.blutdruck ; - } - - public void setComposer(PartyProxy composer) { - this.composer = composer; - } - - public PartyProxy getComposer() { - return this.composer ; - } - - public void setLanguage(Language language) { - this.language = language; - } - - public Language getLanguage() { - return this.language ; - } - - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } - - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } +public class BlutdruckComposition implements CompositionEntity { + /** + * Path: Blutdruck/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Blutdruck/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: Blutdruck/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Blutdruck/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Blutdruck/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Blutdruck/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Blutdruck/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Blutdruck/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Blutdruck/Blutdruck + * Description: Die lokale Messung des arteriellen Blutdrucks als Surrogat für den arteriellen Druck in der systemischen Zirkulation. + * Comment: Häufig wird der Ausdruck 'Blutdruck' zur Bezeichung der Messung des brachialen Ateriendrucks im Oberarm verwendet. + */ + @Path("/content[openEHR-EHR-OBSERVATION.blood_pressure.v2]") + private BlutdruckObservation blutdruck; + + /** + * Path: Blutdruck/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Blutdruck/language + */ + @Path("/language") + private Language language; + + /** + * Path: Blutdruck/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Blutdruck/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public BlutdruckObservation getBlutdruck() { + return this.blutdruck; + } + + public void setBlutdruck(BlutdruckObservation blutdruck) { + this.blutdruck = blutdruck; + } + + public PartyProxy getComposer() { + return this.composer; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } + + public Language getLanguage() { + return this.language; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } - public void setTerritory(Territory territory) { - this.territory = territory; - } + public Territory getTerritory() { + return this.territory; + } - public Territory getTerritory() { - return this.territory ; - } + public void setTerritory(Territory territory) { + this.territory = territory; + } - public VersionUid getVersionUid() { - return this.versionUid ; - } + public VersionUid getVersionUid() { + return this.versionUid; + } - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/d4lquestionnairecomposition/D4LQuestionnaireComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/d4lquestionnairecomposition/D4LQuestionnaireComposition.java index d3e48a537..57c42ca7e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/d4lquestionnairecomposition/D4LQuestionnaireComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/d4lquestionnairecomposition/D4LQuestionnaireComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -20,7 +16,6 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.d4lquestionnairecomposition.definition.AdipositasEvaluation; import org.ehrbase.fhirbridge.ehr.opt.d4lquestionnairecomposition.definition.AlterObservation; import org.ehrbase.fhirbridge.ehr.opt.d4lquestionnairecomposition.definition.AusschlussPflegetaetigkeitEvaluation; @@ -39,458 +34,462 @@ import org.ehrbase.fhirbridge.ehr.opt.d4lquestionnairecomposition.definition.ZusammenfassungDesImmunstatusEvaluation; import org.ehrbase.fhirbridge.ehr.opt.d4lquestionnairecomposition.definition.ZusammenfassungRauchverhaltenEvaluation; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.self_monitoring.v0") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-04-22T17:20:47.938412+02:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-04-22T17:20:47.938412+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("D4L_questionnaire") -public class D4LQuestionnaireComposition implements CompositionEntity, Composition { - /** - * Path: Selbstüberwachung/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Selbstüberwachung/context/Tree - * Description: @ internal @ - */ - @Path("/context/other_context[at0001]") - private ItemTree tree; - - /** - * Path: Selbstüberwachung/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Selbstüberwachung/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Selbstüberwachung/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Selbstüberwachung/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Selbstüberwachung/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Selbstüberwachung/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Selbstüberwachung/Allgemeine Angaben/Alter - * Description: Angaben über das Alter einer Person zu einem bestimmten Zeitpunkt. - */ - @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Allgemeine Angaben']/items[openEHR-EHR-OBSERVATION.age.v0]") - private AlterObservation alter; - - /** - * Path: Selbstüberwachung/Allgemeine Angaben/Wohnsituation - * Description: Die Umstände über eine Person, das allein oder mit anderen zusammen lebt. - * Comment: Diese Information bietet einen Einblick in die tägliche Unterstützung, zu der eine Person in ihrer häuslichen Umgebung - sowohl körperlich als auch emotional - Zugang hat. - */ - @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Allgemeine Angaben']/items[openEHR-EHR-EVALUATION.living_arrangement.v0]") - private WohnsituationEvaluation wohnsituation; - - /** - * Path: Selbstüberwachung/Allgemeine Angaben/Ausschluss - Pflegetätigkeit - * Description: Ein Bericht über den Ausschluss eines/r Problems/Diagnose, familiäre Krankengeschichte, Medikation, Nebenwirkung/Allergens oder eines anderen klinischen Ereignisses, welche/s zur Zeit nicht oder noch nie vorhanden war. - */ - @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Allgemeine Angaben']/items[openEHR-EHR-EVALUATION.exclusion_specific.v1 and name/value='Ausschluss - Pflegetätigkeit']") - private AusschlussPflegetaetigkeitEvaluation ausschlussPflegetaetigkeit; - - /** - * Path: Selbstüberwachung/Allgemeine Angaben/Pflegetätigkeit - * Description: Zusammenfassende oder fortlaufende Informationen über die ausgeführte Pflege oder Unterstützung die eine Person einer oder mehrerer anderer Personen leistet. - */ - @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Allgemeine Angaben']/items[openEHR-EHR-EVALUATION.care_activity.v0]") - private PflegetaetigkeitEvaluation pflegetaetigkeit; - - /** - * Path: Selbstüberwachung/Allgemeine Angaben/Zusammenfassung der Beschäftigung - * Description: Zusammenfassung oder beständige Information zu aktuellen und früheren Jobs und / oder Rollen einer Person. - */ - @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Allgemeine Angaben']/items[openEHR-EHR-EVALUATION.occupation_summary.v1]") - private ZusammenfassungDerBeschaeftigungEvaluation zusammenfassungDerBeschaeftigung; - - /** - * Path: Selbstüberwachung/Allgemeine Angaben/Zusammenfassung Rauchverhalten - * Description: Zusammenfassende oder persistente Informationen über die Tabakrauchgewohnheiten einer Person. - */ - @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Allgemeine Angaben']/items[openEHR-EHR-EVALUATION.tobacco_smoking_summary.v1]") - private ZusammenfassungRauchverhaltenEvaluation zusammenfassungRauchverhalten; - - /** - * Path: Selbstüberwachung/Allgemeine Angaben/Schwangerschaftsstatus - * Description: Angabe darüber, ob die Person schwanger ist oder schwanger sein könnte oder nicht. - */ - @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Allgemeine Angaben']/items[openEHR-EHR-OBSERVATION.pregnancy_status.v0]") - private SchwangerschaftsstatusObservation schwangerschaftsstatus; - - /** - * Path: Selbstüberwachung/Allgemeine Angaben/Kontakt - * Description: unknown - */ - @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Allgemeine Angaben']/items[openEHR-EHR-ACTION.contact.v0]") - private KontaktAction kontakt; - - /** - * Path: Selbstüberwachung/Symptome/Problem/Diagnose - * Description: Angaben über einen einzelnen identifizierten Gesundheitszustand, eine Verletzung, eine Behinderung oder ein Problem, welches das körperliche, geistige und/oder soziale Wohlergehen einer Einzelperson beeinträchtigt. - * Comment: Eine klare Abgrenzung zwischen Problem und Diagnose ist in der Praxis nicht einfach zu erreichen. Für die Zwecke der klinischen Dokumentation mit diesem Archetyp werden Problem und Diagnose als ein Kontinuum betrachtet, mit zunehmendem Detaillierungsgrad und unterstützenden Beweisen, die in der Regel dem Etikett "Diagnose" Gewicht verleihen. - */ - @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Symptome']/items[openEHR-EHR-EVALUATION.problem_diagnosis.v1]") - private List<ProblemDiagnoseEvaluation> problemDiagnose; - - /** - * Path: Selbstüberwachung/Vor-/Grunderkrankungen/Chronische Lungenkrankheit - * Description: Angaben über einen einzelnen identifizierten Gesundheitszustand, eine Verletzung, eine Behinderung oder ein Problem, welches das körperliche, geistige und/oder soziale Wohlergehen einer Einzelperson beeinträchtigt. - * Comment: Eine klare Abgrenzung zwischen Problem und Diagnose ist in der Praxis nicht einfach zu erreichen. Für die Zwecke der klinischen Dokumentation mit diesem Archetyp werden Problem und Diagnose als ein Kontinuum betrachtet, mit zunehmendem Detaillierungsgrad und unterstützenden Beweisen, die in der Regel dem Etikett "Diagnose" Gewicht verleihen. - */ - @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Vor-/Grunderkrankungen']/items[openEHR-EHR-EVALUATION.problem_diagnosis.v1 and name/value='Chronische Lungenkrankheit']") - private ChronischeLungenkrankheitEvaluation chronischeLungenkrankheit; - - /** - * Path: Selbstüberwachung/Vor-/Grunderkrankungen/Diabetes - * Description: Angaben über einen einzelnen identifizierten Gesundheitszustand, eine Verletzung, eine Behinderung oder ein Problem, welches das körperliche, geistige und/oder soziale Wohlergehen einer Einzelperson beeinträchtigt. - * Comment: Eine klare Abgrenzung zwischen Problem und Diagnose ist in der Praxis nicht einfach zu erreichen. Für die Zwecke der klinischen Dokumentation mit diesem Archetyp werden Problem und Diagnose als ein Kontinuum betrachtet, mit zunehmendem Detaillierungsgrad und unterstützenden Beweisen, die in der Regel dem Etikett "Diagnose" Gewicht verleihen. - */ - @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Vor-/Grunderkrankungen']/items[openEHR-EHR-EVALUATION.problem_diagnosis.v1 and name/value='Diabetes']") - private DiabetesEvaluation diabetes; - - /** - * Path: Selbstüberwachung/Vor-/Grunderkrankungen/Herzerkrankung - * Description: Angaben über einen einzelnen identifizierten Gesundheitszustand, eine Verletzung, eine Behinderung oder ein Problem, welches das körperliche, geistige und/oder soziale Wohlergehen einer Einzelperson beeinträchtigt. - * Comment: Eine klare Abgrenzung zwischen Problem und Diagnose ist in der Praxis nicht einfach zu erreichen. Für die Zwecke der klinischen Dokumentation mit diesem Archetyp werden Problem und Diagnose als ein Kontinuum betrachtet, mit zunehmendem Detaillierungsgrad und unterstützenden Beweisen, die in der Regel dem Etikett "Diagnose" Gewicht verleihen. - */ - @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Vor-/Grunderkrankungen']/items[openEHR-EHR-EVALUATION.problem_diagnosis.v1 and name/value='Herzerkrankung']") - private HerzerkrankungEvaluation herzerkrankung; - - /** - * Path: Selbstüberwachung/Vor-/Grunderkrankungen/Adipositas - * Description: Angaben über einen einzelnen identifizierten Gesundheitszustand, eine Verletzung, eine Behinderung oder ein Problem, welches das körperliche, geistige und/oder soziale Wohlergehen einer Einzelperson beeinträchtigt. - * Comment: Eine klare Abgrenzung zwischen Problem und Diagnose ist in der Praxis nicht einfach zu erreichen. Für die Zwecke der klinischen Dokumentation mit diesem Archetyp werden Problem und Diagnose als ein Kontinuum betrachtet, mit zunehmendem Detaillierungsgrad und unterstützenden Beweisen, die in der Regel dem Etikett "Diagnose" Gewicht verleihen. - */ - @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Vor-/Grunderkrankungen']/items[openEHR-EHR-EVALUATION.problem_diagnosis.v1 and name/value='Adipositas']") - private AdipositasEvaluation adipositas; - - /** - * Path: Selbstüberwachung/Medikamente / Impfungen/Kortision - * Description: Zusammenfassende Informationen zur Verwendung eines bestimmten Medikaments oder einer bestimmten Medikamentengruppe. - */ - @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Medikamente / Impfungen']/items[openEHR-EHR-EVALUATION.medication_summary.v0 and name/value='Kortision']") - private KortisionEvaluation kortision; - - /** - * Path: Selbstüberwachung/Medikamente / Impfungen/Immunsuppressiva - * Description: Zusammenfassende Informationen zur Verwendung eines bestimmten Medikaments oder einer bestimmten Medikamentengruppe. - */ - @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Medikamente / Impfungen']/items[openEHR-EHR-EVALUATION.medication_summary.v0 and name/value='Immunsuppressiva']") - private ImmunsuppressivaEvaluation immunsuppressiva; - - /** - * Path: Selbstüberwachung/Medikamente / Impfungen/Zusammenfassung des Immunstatus - * Description: Zusammenfassung des Immunstatus für eine identifizierte Infektionskrankheit oder Erreger. - */ - @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Medikamente / Impfungen']/items[openEHR-EHR-EVALUATION.immunisation_summary.v0]") - private ZusammenfassungDesImmunstatusEvaluation zusammenfassungDesImmunstatus; - - /** - * Path: Selbstüberwachung/Datenspende/Einwilligungserklärung - * Description: Aufzeichnungen über den Status und Einzelheiten der Einwilligungserklärung eines Patienten (oder seines Vertreters) zur einen vorgeschlagenen Prozedur, Studie oder einen anderen gesundheitsbezogenen Aktivität (einschließlich Behandlungen und Untersuchungen) auf der Grundlage einer klaren Einschätzung und eines klaren Verständnisses der Fakten, Auswirkungen und möglichen zukünftigen Konsequenzen durch den Patienten oder dessen Vertreter. - */ - @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Datenspende']/items[openEHR-EHR-ACTION.informed_consent.v0]") - private EinwilligungserklaerungAction einwilligungserklaerung; - - /** - * Path: Selbstüberwachung/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Selbstüberwachung/language - */ - @Path("/language") - private Language language; - - /** - * Path: Selbstüberwachung/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Selbstüberwachung/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setTree(ItemTree tree) { - this.tree = tree; - } - - public ItemTree getTree() { - return this.tree ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } - - public void setAlter(AlterObservation alter) { - this.alter = alter; - } - - public AlterObservation getAlter() { - return this.alter ; - } - - public void setWohnsituation(WohnsituationEvaluation wohnsituation) { - this.wohnsituation = wohnsituation; - } - - public WohnsituationEvaluation getWohnsituation() { - return this.wohnsituation ; - } - - public void setAusschlussPflegetaetigkeit( - AusschlussPflegetaetigkeitEvaluation ausschlussPflegetaetigkeit) { - this.ausschlussPflegetaetigkeit = ausschlussPflegetaetigkeit; - } - - public AusschlussPflegetaetigkeitEvaluation getAusschlussPflegetaetigkeit() { - return this.ausschlussPflegetaetigkeit ; - } - - public void setPflegetaetigkeit(PflegetaetigkeitEvaluation pflegetaetigkeit) { - this.pflegetaetigkeit = pflegetaetigkeit; - } - - public PflegetaetigkeitEvaluation getPflegetaetigkeit() { - return this.pflegetaetigkeit ; - } +public class D4LQuestionnaireComposition implements CompositionEntity { + /** + * Path: Selbstüberwachung/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Selbstüberwachung/context/Tree + * Description: @ internal @ + */ + @Path("/context/other_context[at0001]") + private ItemTree tree; + + /** + * Path: Selbstüberwachung/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Selbstüberwachung/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Selbstüberwachung/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Selbstüberwachung/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Selbstüberwachung/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Selbstüberwachung/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Selbstüberwachung/Allgemeine Angaben/Alter + * Description: Angaben über das Alter einer Person zu einem bestimmten Zeitpunkt. + */ + @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Allgemeine Angaben']/items[openEHR-EHR-OBSERVATION.age.v0]") + private AlterObservation alter; + + /** + * Path: Selbstüberwachung/Allgemeine Angaben/Wohnsituation + * Description: Die Umstände über eine Person, das allein oder mit anderen zusammen lebt. + * Comment: Diese Information bietet einen Einblick in die tägliche Unterstützung, zu der eine Person in ihrer häuslichen Umgebung - sowohl körperlich als auch emotional - Zugang hat. + */ + @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Allgemeine Angaben']/items[openEHR-EHR-EVALUATION.living_arrangement.v0]") + private WohnsituationEvaluation wohnsituation; + + /** + * Path: Selbstüberwachung/Allgemeine Angaben/Ausschluss - Pflegetätigkeit + * Description: Ein Bericht über den Ausschluss eines/r Problems/Diagnose, familiäre Krankengeschichte, Medikation, Nebenwirkung/Allergens oder eines anderen klinischen Ereignisses, welche/s zur Zeit nicht oder noch nie vorhanden war. + */ + @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Allgemeine Angaben']/items[openEHR-EHR-EVALUATION.exclusion_specific.v1 and name/value='Ausschluss - Pflegetätigkeit']") + private AusschlussPflegetaetigkeitEvaluation ausschlussPflegetaetigkeit; + + /** + * Path: Selbstüberwachung/Allgemeine Angaben/Pflegetätigkeit + * Description: Zusammenfassende oder fortlaufende Informationen über die ausgeführte Pflege oder Unterstützung die eine Person einer oder mehrerer anderer Personen leistet. + */ + @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Allgemeine Angaben']/items[openEHR-EHR-EVALUATION.care_activity.v0]") + private PflegetaetigkeitEvaluation pflegetaetigkeit; + + /** + * Path: Selbstüberwachung/Allgemeine Angaben/Zusammenfassung der Beschäftigung + * Description: Zusammenfassung oder beständige Information zu aktuellen und früheren Jobs und / oder Rollen einer Person. + */ + @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Allgemeine Angaben']/items[openEHR-EHR-EVALUATION.occupation_summary.v1]") + private ZusammenfassungDerBeschaeftigungEvaluation zusammenfassungDerBeschaeftigung; + + /** + * Path: Selbstüberwachung/Allgemeine Angaben/Zusammenfassung Rauchverhalten + * Description: Zusammenfassende oder persistente Informationen über die Tabakrauchgewohnheiten einer Person. + */ + @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Allgemeine Angaben']/items[openEHR-EHR-EVALUATION.tobacco_smoking_summary.v1]") + private ZusammenfassungRauchverhaltenEvaluation zusammenfassungRauchverhalten; + + /** + * Path: Selbstüberwachung/Allgemeine Angaben/Schwangerschaftsstatus + * Description: Angabe darüber, ob die Person schwanger ist oder schwanger sein könnte oder nicht. + */ + @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Allgemeine Angaben']/items[openEHR-EHR-OBSERVATION.pregnancy_status.v0]") + private SchwangerschaftsstatusObservation schwangerschaftsstatus; + + /** + * Path: Selbstüberwachung/Allgemeine Angaben/Kontakt + * Description: unknown + */ + @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Allgemeine Angaben']/items[openEHR-EHR-ACTION.contact.v0]") + private KontaktAction kontakt; + + /** + * Path: Selbstüberwachung/Symptome/Problem/Diagnose + * Description: Angaben über einen einzelnen identifizierten Gesundheitszustand, eine Verletzung, eine Behinderung oder ein Problem, welches das körperliche, geistige und/oder soziale Wohlergehen einer Einzelperson beeinträchtigt. + * Comment: Eine klare Abgrenzung zwischen Problem und Diagnose ist in der Praxis nicht einfach zu erreichen. Für die Zwecke der klinischen Dokumentation mit diesem Archetyp werden Problem und Diagnose als ein Kontinuum betrachtet, mit zunehmendem Detaillierungsgrad und unterstützenden Beweisen, die in der Regel dem Etikett "Diagnose" Gewicht verleihen. + */ + @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Symptome']/items[openEHR-EHR-EVALUATION.problem_diagnosis.v1]") + private List<ProblemDiagnoseEvaluation> problemDiagnose; + + /** + * Path: Selbstüberwachung/Vor-/Grunderkrankungen/Chronische Lungenkrankheit + * Description: Angaben über einen einzelnen identifizierten Gesundheitszustand, eine Verletzung, eine Behinderung oder ein Problem, welches das körperliche, geistige und/oder soziale Wohlergehen einer Einzelperson beeinträchtigt. + * Comment: Eine klare Abgrenzung zwischen Problem und Diagnose ist in der Praxis nicht einfach zu erreichen. Für die Zwecke der klinischen Dokumentation mit diesem Archetyp werden Problem und Diagnose als ein Kontinuum betrachtet, mit zunehmendem Detaillierungsgrad und unterstützenden Beweisen, die in der Regel dem Etikett "Diagnose" Gewicht verleihen. + */ + @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Vor-/Grunderkrankungen']/items[openEHR-EHR-EVALUATION.problem_diagnosis.v1 and name/value='Chronische Lungenkrankheit']") + private ChronischeLungenkrankheitEvaluation chronischeLungenkrankheit; + + /** + * Path: Selbstüberwachung/Vor-/Grunderkrankungen/Diabetes + * Description: Angaben über einen einzelnen identifizierten Gesundheitszustand, eine Verletzung, eine Behinderung oder ein Problem, welches das körperliche, geistige und/oder soziale Wohlergehen einer Einzelperson beeinträchtigt. + * Comment: Eine klare Abgrenzung zwischen Problem und Diagnose ist in der Praxis nicht einfach zu erreichen. Für die Zwecke der klinischen Dokumentation mit diesem Archetyp werden Problem und Diagnose als ein Kontinuum betrachtet, mit zunehmendem Detaillierungsgrad und unterstützenden Beweisen, die in der Regel dem Etikett "Diagnose" Gewicht verleihen. + */ + @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Vor-/Grunderkrankungen']/items[openEHR-EHR-EVALUATION.problem_diagnosis.v1 and name/value='Diabetes']") + private DiabetesEvaluation diabetes; + + /** + * Path: Selbstüberwachung/Vor-/Grunderkrankungen/Herzerkrankung + * Description: Angaben über einen einzelnen identifizierten Gesundheitszustand, eine Verletzung, eine Behinderung oder ein Problem, welches das körperliche, geistige und/oder soziale Wohlergehen einer Einzelperson beeinträchtigt. + * Comment: Eine klare Abgrenzung zwischen Problem und Diagnose ist in der Praxis nicht einfach zu erreichen. Für die Zwecke der klinischen Dokumentation mit diesem Archetyp werden Problem und Diagnose als ein Kontinuum betrachtet, mit zunehmendem Detaillierungsgrad und unterstützenden Beweisen, die in der Regel dem Etikett "Diagnose" Gewicht verleihen. + */ + @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Vor-/Grunderkrankungen']/items[openEHR-EHR-EVALUATION.problem_diagnosis.v1 and name/value='Herzerkrankung']") + private HerzerkrankungEvaluation herzerkrankung; + + /** + * Path: Selbstüberwachung/Vor-/Grunderkrankungen/Adipositas + * Description: Angaben über einen einzelnen identifizierten Gesundheitszustand, eine Verletzung, eine Behinderung oder ein Problem, welches das körperliche, geistige und/oder soziale Wohlergehen einer Einzelperson beeinträchtigt. + * Comment: Eine klare Abgrenzung zwischen Problem und Diagnose ist in der Praxis nicht einfach zu erreichen. Für die Zwecke der klinischen Dokumentation mit diesem Archetyp werden Problem und Diagnose als ein Kontinuum betrachtet, mit zunehmendem Detaillierungsgrad und unterstützenden Beweisen, die in der Regel dem Etikett "Diagnose" Gewicht verleihen. + */ + @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Vor-/Grunderkrankungen']/items[openEHR-EHR-EVALUATION.problem_diagnosis.v1 and name/value='Adipositas']") + private AdipositasEvaluation adipositas; + + /** + * Path: Selbstüberwachung/Medikamente / Impfungen/Kortision + * Description: Zusammenfassende Informationen zur Verwendung eines bestimmten Medikaments oder einer bestimmten Medikamentengruppe. + */ + @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Medikamente / Impfungen']/items[openEHR-EHR-EVALUATION.medication_summary.v0 and name/value='Kortision']") + private KortisionEvaluation kortision; + + /** + * Path: Selbstüberwachung/Medikamente / Impfungen/Immunsuppressiva + * Description: Zusammenfassende Informationen zur Verwendung eines bestimmten Medikaments oder einer bestimmten Medikamentengruppe. + */ + @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Medikamente / Impfungen']/items[openEHR-EHR-EVALUATION.medication_summary.v0 and name/value='Immunsuppressiva']") + private ImmunsuppressivaEvaluation immunsuppressiva; + + /** + * Path: Selbstüberwachung/Medikamente / Impfungen/Zusammenfassung des Immunstatus + * Description: Zusammenfassung des Immunstatus für eine identifizierte Infektionskrankheit oder Erreger. + */ + @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Medikamente / Impfungen']/items[openEHR-EHR-EVALUATION.immunisation_summary.v0]") + private ZusammenfassungDesImmunstatusEvaluation zusammenfassungDesImmunstatus; + + /** + * Path: Selbstüberwachung/Datenspende/Einwilligungserklärung + * Description: Aufzeichnungen über den Status und Einzelheiten der Einwilligungserklärung eines Patienten (oder seines Vertreters) zur einen vorgeschlagenen Prozedur, Studie oder einen anderen gesundheitsbezogenen Aktivität (einschließlich Behandlungen und Untersuchungen) auf der Grundlage einer klaren Einschätzung und eines klaren Verständnisses der Fakten, Auswirkungen und möglichen zukünftigen Konsequenzen durch den Patienten oder dessen Vertreter. + */ + @Path("/content[openEHR-EHR-SECTION.adhoc.v1 and name/value='Datenspende']/items[openEHR-EHR-ACTION.informed_consent.v0]") + private EinwilligungserklaerungAction einwilligungserklaerung; + + /** + * Path: Selbstüberwachung/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Selbstüberwachung/language + */ + @Path("/language") + private Language language; + + /** + * Path: Selbstüberwachung/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Selbstüberwachung/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public ItemTree getTree() { + return this.tree; + } + + public void setTree(ItemTree tree) { + this.tree = tree; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public AlterObservation getAlter() { + return this.alter; + } + + public void setAlter(AlterObservation alter) { + this.alter = alter; + } + + public WohnsituationEvaluation getWohnsituation() { + return this.wohnsituation; + } + + public void setWohnsituation(WohnsituationEvaluation wohnsituation) { + this.wohnsituation = wohnsituation; + } + + public AusschlussPflegetaetigkeitEvaluation getAusschlussPflegetaetigkeit() { + return this.ausschlussPflegetaetigkeit; + } + + public void setAusschlussPflegetaetigkeit( + AusschlussPflegetaetigkeitEvaluation ausschlussPflegetaetigkeit) { + this.ausschlussPflegetaetigkeit = ausschlussPflegetaetigkeit; + } + + public PflegetaetigkeitEvaluation getPflegetaetigkeit() { + return this.pflegetaetigkeit; + } + + public void setPflegetaetigkeit(PflegetaetigkeitEvaluation pflegetaetigkeit) { + this.pflegetaetigkeit = pflegetaetigkeit; + } - public void setZusammenfassungDerBeschaeftigung( - ZusammenfassungDerBeschaeftigungEvaluation zusammenfassungDerBeschaeftigung) { - this.zusammenfassungDerBeschaeftigung = zusammenfassungDerBeschaeftigung; - } - - public ZusammenfassungDerBeschaeftigungEvaluation getZusammenfassungDerBeschaeftigung() { - return this.zusammenfassungDerBeschaeftigung ; - } - - public void setZusammenfassungRauchverhalten( - ZusammenfassungRauchverhaltenEvaluation zusammenfassungRauchverhalten) { - this.zusammenfassungRauchverhalten = zusammenfassungRauchverhalten; - } - - public ZusammenfassungRauchverhaltenEvaluation getZusammenfassungRauchverhalten() { - return this.zusammenfassungRauchverhalten ; - } - - public void setSchwangerschaftsstatus(SchwangerschaftsstatusObservation schwangerschaftsstatus) { - this.schwangerschaftsstatus = schwangerschaftsstatus; - } - - public SchwangerschaftsstatusObservation getSchwangerschaftsstatus() { - return this.schwangerschaftsstatus ; - } - - public void setKontakt(KontaktAction kontakt) { - this.kontakt = kontakt; - } - - public KontaktAction getKontakt() { - return this.kontakt ; - } - - public void setProblemDiagnose(List<ProblemDiagnoseEvaluation> problemDiagnose) { - this.problemDiagnose = problemDiagnose; - } - - public List<ProblemDiagnoseEvaluation> getProblemDiagnose() { - return this.problemDiagnose ; - } - - public void setChronischeLungenkrankheit( - ChronischeLungenkrankheitEvaluation chronischeLungenkrankheit) { - this.chronischeLungenkrankheit = chronischeLungenkrankheit; - } - - public ChronischeLungenkrankheitEvaluation getChronischeLungenkrankheit() { - return this.chronischeLungenkrankheit ; - } - - public void setDiabetes(DiabetesEvaluation diabetes) { - this.diabetes = diabetes; - } - - public DiabetesEvaluation getDiabetes() { - return this.diabetes ; - } - - public void setHerzerkrankung(HerzerkrankungEvaluation herzerkrankung) { - this.herzerkrankung = herzerkrankung; - } - - public HerzerkrankungEvaluation getHerzerkrankung() { - return this.herzerkrankung ; - } - - public void setAdipositas(AdipositasEvaluation adipositas) { - this.adipositas = adipositas; - } - - public AdipositasEvaluation getAdipositas() { - return this.adipositas ; - } - - public void setKortision(KortisionEvaluation kortision) { - this.kortision = kortision; - } - - public KortisionEvaluation getKortision() { - return this.kortision ; - } - - public void setImmunsuppressiva(ImmunsuppressivaEvaluation immunsuppressiva) { - this.immunsuppressiva = immunsuppressiva; - } - - public ImmunsuppressivaEvaluation getImmunsuppressiva() { - return this.immunsuppressiva ; - } - - public void setZusammenfassungDesImmunstatus( - ZusammenfassungDesImmunstatusEvaluation zusammenfassungDesImmunstatus) { - this.zusammenfassungDesImmunstatus = zusammenfassungDesImmunstatus; - } - - public ZusammenfassungDesImmunstatusEvaluation getZusammenfassungDesImmunstatus() { - return this.zusammenfassungDesImmunstatus ; - } - - public void setEinwilligungserklaerung(EinwilligungserklaerungAction einwilligungserklaerung) { - this.einwilligungserklaerung = einwilligungserklaerung; - } - - public EinwilligungserklaerungAction getEinwilligungserklaerung() { - return this.einwilligungserklaerung ; - } - - public void setComposer(PartyProxy composer) { - this.composer = composer; - } - - public PartyProxy getComposer() { - return this.composer ; - } - - public void setLanguage(Language language) { - this.language = language; - } - - public Language getLanguage() { - return this.language ; - } - - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } - - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } - - public void setTerritory(Territory territory) { - this.territory = territory; - } - - public Territory getTerritory() { - return this.territory ; - } - - public VersionUid getVersionUid() { - return this.versionUid ; - } - - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public ZusammenfassungDerBeschaeftigungEvaluation getZusammenfassungDerBeschaeftigung() { + return this.zusammenfassungDerBeschaeftigung; + } + + public void setZusammenfassungDerBeschaeftigung( + ZusammenfassungDerBeschaeftigungEvaluation zusammenfassungDerBeschaeftigung) { + this.zusammenfassungDerBeschaeftigung = zusammenfassungDerBeschaeftigung; + } + + public ZusammenfassungRauchverhaltenEvaluation getZusammenfassungRauchverhalten() { + return this.zusammenfassungRauchverhalten; + } + + public void setZusammenfassungRauchverhalten( + ZusammenfassungRauchverhaltenEvaluation zusammenfassungRauchverhalten) { + this.zusammenfassungRauchverhalten = zusammenfassungRauchverhalten; + } + + public SchwangerschaftsstatusObservation getSchwangerschaftsstatus() { + return this.schwangerschaftsstatus; + } + + public void setSchwangerschaftsstatus(SchwangerschaftsstatusObservation schwangerschaftsstatus) { + this.schwangerschaftsstatus = schwangerschaftsstatus; + } + + public KontaktAction getKontakt() { + return this.kontakt; + } + + public void setKontakt(KontaktAction kontakt) { + this.kontakt = kontakt; + } + + public List<ProblemDiagnoseEvaluation> getProblemDiagnose() { + return this.problemDiagnose; + } + + public void setProblemDiagnose(List<ProblemDiagnoseEvaluation> problemDiagnose) { + this.problemDiagnose = problemDiagnose; + } + + public ChronischeLungenkrankheitEvaluation getChronischeLungenkrankheit() { + return this.chronischeLungenkrankheit; + } + + public void setChronischeLungenkrankheit( + ChronischeLungenkrankheitEvaluation chronischeLungenkrankheit) { + this.chronischeLungenkrankheit = chronischeLungenkrankheit; + } + + public DiabetesEvaluation getDiabetes() { + return this.diabetes; + } + + public void setDiabetes(DiabetesEvaluation diabetes) { + this.diabetes = diabetes; + } + + public HerzerkrankungEvaluation getHerzerkrankung() { + return this.herzerkrankung; + } + + public void setHerzerkrankung(HerzerkrankungEvaluation herzerkrankung) { + this.herzerkrankung = herzerkrankung; + } + + public AdipositasEvaluation getAdipositas() { + return this.adipositas; + } + + public void setAdipositas(AdipositasEvaluation adipositas) { + this.adipositas = adipositas; + } + + public KortisionEvaluation getKortision() { + return this.kortision; + } + + public void setKortision(KortisionEvaluation kortision) { + this.kortision = kortision; + } + + public ImmunsuppressivaEvaluation getImmunsuppressiva() { + return this.immunsuppressiva; + } + + public void setImmunsuppressiva(ImmunsuppressivaEvaluation immunsuppressiva) { + this.immunsuppressiva = immunsuppressiva; + } + + public ZusammenfassungDesImmunstatusEvaluation getZusammenfassungDesImmunstatus() { + return this.zusammenfassungDesImmunstatus; + } + + public void setZusammenfassungDesImmunstatus( + ZusammenfassungDesImmunstatusEvaluation zusammenfassungDesImmunstatus) { + this.zusammenfassungDesImmunstatus = zusammenfassungDesImmunstatus; + } + + public EinwilligungserklaerungAction getEinwilligungserklaerung() { + return this.einwilligungserklaerung; + } + + public void setEinwilligungserklaerung(EinwilligungserklaerungAction einwilligungserklaerung) { + this.einwilligungserklaerung = einwilligungserklaerung; + } + + public PartyProxy getComposer() { + return this.composer; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } + + public Language getLanguage() { + return this.language; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public Territory getTerritory() { + return this.territory; + } + + public void setTerritory(Territory territory) { + this.territory = territory; + } + + public VersionUid getVersionUid() { + return this.versionUid; + } + + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/diagnosecomposition/DiagnoseComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/diagnosecomposition/DiagnoseComposition.java index e5e03a2ad..da9ad72c2 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/diagnosecomposition/DiagnoseComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/diagnosecomposition/DiagnoseComposition.java @@ -4,10 +4,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -20,241 +16,244 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.diagnosecomposition.definition.FallidentifikationCluster; import org.ehrbase.fhirbridge.ehr.opt.diagnosecomposition.definition.ProblemDiagnoseEvaluation; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.report.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:52:54.796356+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-09T11:52:54.796356+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("Diagnose") -public class DiagnoseComposition implements CompositionEntity, Composition { - /** - * Path: COVID-19-Diagnose/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: COVID-19-Diagnose/context/Bericht ID - * Description: Identifizierungsmerkmal des Berichts. - */ - @Path("/context/other_context[at0001]/items[at0002]/value|value") - private String berichtIdValue; - - /** - * Path: COVID-19-Diagnose/context/Tree/Bericht ID/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0002]/null_flavour|defining_code") - private NullFlavour berichtIdNullFlavourDefiningCode; - - /** - * Path: COVID-19-Diagnose/context/Fallidentifikation - * Description: Zur Erfassung von Details zur Identifikation eines Falls im Gesundheitswesen. - */ - @Path("/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.case_identification.v0]") - private FallidentifikationCluster fallidentifikation; - - /** - * Path: COVID-19-Diagnose/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: COVID-19-Diagnose/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: COVID-19-Diagnose/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: COVID-19-Diagnose/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: COVID-19-Diagnose/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: COVID-19-Diagnose/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: COVID-19-Diagnose/Problem/Diagnose - * Description: Angaben über einen einzelnen identifizierten Gesundheitszustand, eine Verletzung, eine Behinderung oder ein Problem, welches das körperliche, geistige und/oder soziale Wohlergehen einer Einzelperson beeinträchtigt. - * Comment: Eine klare Abgrenzung zwischen Problem und Diagnose ist in der Praxis nicht einfach zu erreichen. Für die Zwecke der klinischen Dokumentation mit diesem Archetyp werden Problem und Diagnose als ein Kontinuum betrachtet, mit zunehmendem Detaillierungsgrad und unterstützenden Beweisen, die in der Regel dem Etikett "Diagnose" Gewicht verleihen. - */ - @Path("/content[openEHR-EHR-EVALUATION.problem_diagnosis.v1]") - private ProblemDiagnoseEvaluation problemDiagnose; - - /** - * Path: COVID-19-Diagnose/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: COVID-19-Diagnose/language - */ - @Path("/language") - private Language language; - - /** - * Path: COVID-19-Diagnose/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: COVID-19-Diagnose/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setBerichtIdValue(String berichtIdValue) { - this.berichtIdValue = berichtIdValue; - } - - public String getBerichtIdValue() { - return this.berichtIdValue ; - } - - public void setBerichtIdNullFlavourDefiningCode(NullFlavour berichtIdNullFlavourDefiningCode) { - this.berichtIdNullFlavourDefiningCode = berichtIdNullFlavourDefiningCode; - } - - public NullFlavour getBerichtIdNullFlavourDefiningCode() { - return this.berichtIdNullFlavourDefiningCode ; - } - - public void setFallidentifikation(FallidentifikationCluster fallidentifikation) { - this.fallidentifikation = fallidentifikation; - } - - public FallidentifikationCluster getFallidentifikation() { - return this.fallidentifikation ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } - - public void setProblemDiagnose(ProblemDiagnoseEvaluation problemDiagnose) { - this.problemDiagnose = problemDiagnose; - } - - public ProblemDiagnoseEvaluation getProblemDiagnose() { - return this.problemDiagnose ; - } - - public void setComposer(PartyProxy composer) { - this.composer = composer; - } - - public PartyProxy getComposer() { - return this.composer ; - } +public class DiagnoseComposition implements CompositionEntity { + /** + * Path: COVID-19-Diagnose/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: COVID-19-Diagnose/context/Bericht ID + * Description: Identifizierungsmerkmal des Berichts. + */ + @Path("/context/other_context[at0001]/items[at0002]/value|value") + private String berichtIdValue; + + /** + * Path: COVID-19-Diagnose/context/Tree/Bericht ID/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0002]/null_flavour|defining_code") + private NullFlavour berichtIdNullFlavourDefiningCode; + + /** + * Path: COVID-19-Diagnose/context/Fallidentifikation + * Description: Zur Erfassung von Details zur Identifikation eines Falls im Gesundheitswesen. + */ + @Path("/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.case_identification.v0]") + private FallidentifikationCluster fallidentifikation; + + /** + * Path: COVID-19-Diagnose/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: COVID-19-Diagnose/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: COVID-19-Diagnose/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: COVID-19-Diagnose/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: COVID-19-Diagnose/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: COVID-19-Diagnose/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: COVID-19-Diagnose/Problem/Diagnose + * Description: Angaben über einen einzelnen identifizierten Gesundheitszustand, eine Verletzung, eine Behinderung oder ein Problem, welches das körperliche, geistige und/oder soziale Wohlergehen einer Einzelperson beeinträchtigt. + * Comment: Eine klare Abgrenzung zwischen Problem und Diagnose ist in der Praxis nicht einfach zu erreichen. Für die Zwecke der klinischen Dokumentation mit diesem Archetyp werden Problem und Diagnose als ein Kontinuum betrachtet, mit zunehmendem Detaillierungsgrad und unterstützenden Beweisen, die in der Regel dem Etikett "Diagnose" Gewicht verleihen. + */ + @Path("/content[openEHR-EHR-EVALUATION.problem_diagnosis.v1]") + private ProblemDiagnoseEvaluation problemDiagnose; + + /** + * Path: COVID-19-Diagnose/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: COVID-19-Diagnose/language + */ + @Path("/language") + private Language language; + + /** + * Path: COVID-19-Diagnose/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: COVID-19-Diagnose/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public String getBerichtIdValue() { + return this.berichtIdValue; + } + + public void setBerichtIdValue(String berichtIdValue) { + this.berichtIdValue = berichtIdValue; + } + + public NullFlavour getBerichtIdNullFlavourDefiningCode() { + return this.berichtIdNullFlavourDefiningCode; + } + + public void setBerichtIdNullFlavourDefiningCode(NullFlavour berichtIdNullFlavourDefiningCode) { + this.berichtIdNullFlavourDefiningCode = berichtIdNullFlavourDefiningCode; + } + + public FallidentifikationCluster getFallidentifikation() { + return this.fallidentifikation; + } + + public void setFallidentifikation(FallidentifikationCluster fallidentifikation) { + this.fallidentifikation = fallidentifikation; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public ProblemDiagnoseEvaluation getProblemDiagnose() { + return this.problemDiagnose; + } + + public void setProblemDiagnose(ProblemDiagnoseEvaluation problemDiagnose) { + this.problemDiagnose = problemDiagnose; + } + + public PartyProxy getComposer() { + return this.composer; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } - public void setLanguage(Language language) { - this.language = language; - } + public Language getLanguage() { + return this.language; + } - public Language getLanguage() { - return this.language ; - } + public void setLanguage(Language language) { + this.language = language; + } - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } + public FeederAudit getFeederAudit() { + return this.feederAudit; + } - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } - public void setTerritory(Territory territory) { - this.territory = territory; - } + public Territory getTerritory() { + return this.territory; + } - public Territory getTerritory() { - return this.territory ; - } + public void setTerritory(Territory territory) { + this.territory = territory; + } - public VersionUid getVersionUid() { - return this.versionUid ; - } + public VersionUid getVersionUid() { + return this.versionUid; + } - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccodiagnosecomposition/GECCODiagnoseComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccodiagnosecomposition/GECCODiagnoseComposition.java index 491bc7ad5..8c8f7246c 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccodiagnosecomposition/GECCODiagnoseComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccodiagnosecomposition/GECCODiagnoseComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,304 +17,307 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.geccodiagnosecomposition.definition.AusgeschlosseneDiagnoseEvaluation; import org.ehrbase.fhirbridge.ehr.opt.geccodiagnosecomposition.definition.KategorieDefiningCode; import org.ehrbase.fhirbridge.ehr.opt.geccodiagnosecomposition.definition.StatusDefiningCode; import org.ehrbase.fhirbridge.ehr.opt.geccodiagnosecomposition.definition.UnbekannteDiagnoseEvaluation; import org.ehrbase.fhirbridge.ehr.opt.geccodiagnosecomposition.definition.VorliegendeDiagnoseEvaluation; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:07.573814+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-09T11:53:07.573814+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("GECCO_Diagnose") -public class GECCODiagnoseComposition implements CompositionEntity, Composition { - /** - * Path: GECCO_Diagnose/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: GECCO_Diagnose/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: GECCO_Diagnose/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: GECCO_Diagnose/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: GECCO_Diagnose/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]/value|defining_code") - private KategorieDefiningCode kategorieDefiningCode; - - /** - * Path: GECCO_Diagnose/context/Baum/Kategorie/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") - private NullFlavour kategorieNullFlavourDefiningCode; - - /** - * Path: GECCO_Diagnose/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: GECCO_Diagnose/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: GECCO_Diagnose/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: GECCO_Diagnose/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: GECCO_Diagnose/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: GECCO_Diagnose/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: GECCO_Diagnose/Vorliegende Diagnose - * Description: Angaben über einen einzelnen identifizierten Gesundheitszustand, eine Verletzung, eine Behinderung oder ein Problem, welches das körperliche, geistige und/oder soziale Wohlergehen einer Einzelperson beeinträchtigt. - * Comment: Eine klare Abgrenzung zwischen Problem und Diagnose ist in der Praxis nicht einfach zu erreichen. Für die Zwecke der klinischen Dokumentation mit diesem Archetyp werden Problem und Diagnose als ein Kontinuum betrachtet, mit zunehmendem Detaillierungsgrad und unterstützenden Beweisen, die in der Regel dem Etikett "Diagnose" Gewicht verleihen. - */ - @Path("/content[openEHR-EHR-EVALUATION.problem_diagnosis.v1 and name/value='Vorliegende Diagnose']") - private VorliegendeDiagnoseEvaluation vorliegendeDiagnose; - - /** - * Path: GECCO_Diagnose/Ausgeschlossene Diagnose - * Description: Ein Bericht über den Ausschluss eines/r Problems/Diagnose, familiäre Krankengeschichte, Medikation, Nebenwirkung/Allergens oder eines anderen klinischen Ereignisses, welche/s zur Zeit nicht oder noch nie vorhanden war. - */ - @Path("/content[openEHR-EHR-EVALUATION.exclusion_specific.v1 and name/value='Ausgeschlossene Diagnose']") - private AusgeschlosseneDiagnoseEvaluation ausgeschlosseneDiagnose; - - /** - * Path: GECCO_Diagnose/Unbekannte Diagnose - * Description: Aussage darüber, dass bestimmte Gesundheitsinformationen zum Zeitpukt der Erfassung nicht in der Krankenakte oder einem Schriftstück erfasst werden können, da keine Kenntnisse darüber vorhanden sind. - */ - @Path("/content[openEHR-EHR-EVALUATION.absence.v2 and name/value='Unbekannte Diagnose']") - private UnbekannteDiagnoseEvaluation unbekannteDiagnose; - - /** - * Path: GECCO_Diagnose/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: GECCO_Diagnose/language - */ - @Path("/language") - private Language language; - - /** - * Path: GECCO_Diagnose/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: GECCO_Diagnose/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorieDefiningCode(KategorieDefiningCode kategorieDefiningCode) { - this.kategorieDefiningCode = kategorieDefiningCode; - } - - public KategorieDefiningCode getKategorieDefiningCode() { - return this.kategorieDefiningCode ; - } - - public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { - this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; - } - - public NullFlavour getKategorieNullFlavourDefiningCode() { - return this.kategorieNullFlavourDefiningCode ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } +public class GECCODiagnoseComposition implements CompositionEntity { + /** + * Path: GECCO_Diagnose/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: GECCO_Diagnose/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: GECCO_Diagnose/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: GECCO_Diagnose/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: GECCO_Diagnose/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]/value|defining_code") + private KategorieDefiningCode kategorieDefiningCode; + + /** + * Path: GECCO_Diagnose/context/Baum/Kategorie/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") + private NullFlavour kategorieNullFlavourDefiningCode; + + /** + * Path: GECCO_Diagnose/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: GECCO_Diagnose/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: GECCO_Diagnose/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: GECCO_Diagnose/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: GECCO_Diagnose/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: GECCO_Diagnose/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: GECCO_Diagnose/Vorliegende Diagnose + * Description: Angaben über einen einzelnen identifizierten Gesundheitszustand, eine Verletzung, eine Behinderung oder ein Problem, welches das körperliche, geistige und/oder soziale Wohlergehen einer Einzelperson beeinträchtigt. + * Comment: Eine klare Abgrenzung zwischen Problem und Diagnose ist in der Praxis nicht einfach zu erreichen. Für die Zwecke der klinischen Dokumentation mit diesem Archetyp werden Problem und Diagnose als ein Kontinuum betrachtet, mit zunehmendem Detaillierungsgrad und unterstützenden Beweisen, die in der Regel dem Etikett "Diagnose" Gewicht verleihen. + */ + @Path("/content[openEHR-EHR-EVALUATION.problem_diagnosis.v1 and name/value='Vorliegende Diagnose']") + private VorliegendeDiagnoseEvaluation vorliegendeDiagnose; + + /** + * Path: GECCO_Diagnose/Ausgeschlossene Diagnose + * Description: Ein Bericht über den Ausschluss eines/r Problems/Diagnose, familiäre Krankengeschichte, Medikation, Nebenwirkung/Allergens oder eines anderen klinischen Ereignisses, welche/s zur Zeit nicht oder noch nie vorhanden war. + */ + @Path("/content[openEHR-EHR-EVALUATION.exclusion_specific.v1 and name/value='Ausgeschlossene Diagnose']") + private AusgeschlosseneDiagnoseEvaluation ausgeschlosseneDiagnose; + + /** + * Path: GECCO_Diagnose/Unbekannte Diagnose + * Description: Aussage darüber, dass bestimmte Gesundheitsinformationen zum Zeitpukt der Erfassung nicht in der Krankenakte oder einem Schriftstück erfasst werden können, da keine Kenntnisse darüber vorhanden sind. + */ + @Path("/content[openEHR-EHR-EVALUATION.absence.v2 and name/value='Unbekannte Diagnose']") + private UnbekannteDiagnoseEvaluation unbekannteDiagnose; + + /** + * Path: GECCO_Diagnose/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: GECCO_Diagnose/language + */ + @Path("/language") + private Language language; + + /** + * Path: GECCO_Diagnose/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: GECCO_Diagnose/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public KategorieDefiningCode getKategorieDefiningCode() { + return this.kategorieDefiningCode; + } + + public void setKategorieDefiningCode(KategorieDefiningCode kategorieDefiningCode) { + this.kategorieDefiningCode = kategorieDefiningCode; + } + + public NullFlavour getKategorieNullFlavourDefiningCode() { + return this.kategorieNullFlavourDefiningCode; + } + + public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { + this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public VorliegendeDiagnoseEvaluation getVorliegendeDiagnose() { + return this.vorliegendeDiagnose; + } - public void setVorliegendeDiagnose(VorliegendeDiagnoseEvaluation vorliegendeDiagnose) { - this.vorliegendeDiagnose = vorliegendeDiagnose; - } + public void setVorliegendeDiagnose(VorliegendeDiagnoseEvaluation vorliegendeDiagnose) { + this.vorliegendeDiagnose = vorliegendeDiagnose; + } - public VorliegendeDiagnoseEvaluation getVorliegendeDiagnose() { - return this.vorliegendeDiagnose ; - } + public AusgeschlosseneDiagnoseEvaluation getAusgeschlosseneDiagnose() { + return this.ausgeschlosseneDiagnose; + } - public void setAusgeschlosseneDiagnose( - AusgeschlosseneDiagnoseEvaluation ausgeschlosseneDiagnose) { - this.ausgeschlosseneDiagnose = ausgeschlosseneDiagnose; - } - - public AusgeschlosseneDiagnoseEvaluation getAusgeschlosseneDiagnose() { - return this.ausgeschlosseneDiagnose ; - } - - public void setUnbekannteDiagnose(UnbekannteDiagnoseEvaluation unbekannteDiagnose) { - this.unbekannteDiagnose = unbekannteDiagnose; - } - - public UnbekannteDiagnoseEvaluation getUnbekannteDiagnose() { - return this.unbekannteDiagnose ; - } - - public void setComposer(PartyProxy composer) { - this.composer = composer; - } - - public PartyProxy getComposer() { - return this.composer ; - } - - public void setLanguage(Language language) { - this.language = language; - } - - public Language getLanguage() { - return this.language ; - } - - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } - - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } - - public void setTerritory(Territory territory) { - this.territory = territory; - } - - public Territory getTerritory() { - return this.territory ; - } - - public VersionUid getVersionUid() { - return this.versionUid ; - } - - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setAusgeschlosseneDiagnose( + AusgeschlosseneDiagnoseEvaluation ausgeschlosseneDiagnose) { + this.ausgeschlosseneDiagnose = ausgeschlosseneDiagnose; + } + + public UnbekannteDiagnoseEvaluation getUnbekannteDiagnose() { + return this.unbekannteDiagnose; + } + + public void setUnbekannteDiagnose(UnbekannteDiagnoseEvaluation unbekannteDiagnose) { + this.unbekannteDiagnose = unbekannteDiagnose; + } + + public PartyProxy getComposer() { + return this.composer; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } + + public Language getLanguage() { + return this.language; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public Territory getTerritory() { + return this.territory; + } + + public void setTerritory(Territory territory) { + this.territory = territory; + } + + public VersionUid getVersionUid() { + return this.versionUid; + } + + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/GECCOLaborbefundComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/GECCOLaborbefundComposition.java index d720e616b..ff08cb13a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/GECCOLaborbefundComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/GECCOLaborbefundComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,269 +17,272 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.LaborergebnisObservation; import org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.StatusDefiningCode; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.000636+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-09T11:53:24.000636+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("GECCO_Laborbefund") -public class GECCOLaborbefundComposition implements CompositionEntity, Composition { - /** - * Path: Laborbefund/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Laborbefund/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: Laborbefund/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: Laborbefund/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: Laborbefund/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]/value|value") - private String kategorieValue; - - /** - * Path: Laborbefund/context/Baum/Kategorie/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") - private NullFlavour kategorieNullFlavourDefiningCode; - - /** - * Path: Laborbefund/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Laborbefund/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Laborbefund/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Laborbefund/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Laborbefund/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Laborbefund/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Laborbefund/Laborergebnis - * Description: Das Ergebnis - einschließlich der Befunde und der Interpretation des Labors - einer Untersuchung, die an Proben durchgeführt wurde, die von einer Einzelperson stammen oder mit dieser Person zusammenhängen. - */ - @Path("/content[openEHR-EHR-OBSERVATION.laboratory_test_result.v1]") - private LaborergebnisObservation laborergebnis; - - /** - * Path: Laborbefund/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Laborbefund/language - */ - @Path("/language") - private Language language; - - /** - * Path: Laborbefund/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Laborbefund/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorieValue(String kategorieValue) { - this.kategorieValue = kategorieValue; - } - - public String getKategorieValue() { - return this.kategorieValue ; - } - - public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { - this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; - } - - public NullFlavour getKategorieNullFlavourDefiningCode() { - return this.kategorieNullFlavourDefiningCode ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } +public class GECCOLaborbefundComposition implements CompositionEntity { + /** + * Path: Laborbefund/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Laborbefund/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: Laborbefund/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: Laborbefund/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: Laborbefund/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]/value|value") + private String kategorieValue; + + /** + * Path: Laborbefund/context/Baum/Kategorie/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") + private NullFlavour kategorieNullFlavourDefiningCode; + + /** + * Path: Laborbefund/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Laborbefund/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Laborbefund/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Laborbefund/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Laborbefund/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Laborbefund/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Laborbefund/Laborergebnis + * Description: Das Ergebnis - einschließlich der Befunde und der Interpretation des Labors - einer Untersuchung, die an Proben durchgeführt wurde, die von einer Einzelperson stammen oder mit dieser Person zusammenhängen. + */ + @Path("/content[openEHR-EHR-OBSERVATION.laboratory_test_result.v1]") + private LaborergebnisObservation laborergebnis; + + /** + * Path: Laborbefund/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Laborbefund/language + */ + @Path("/language") + private Language language; + + /** + * Path: Laborbefund/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Laborbefund/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public String getKategorieValue() { + return this.kategorieValue; + } + + public void setKategorieValue(String kategorieValue) { + this.kategorieValue = kategorieValue; + } + + public NullFlavour getKategorieNullFlavourDefiningCode() { + return this.kategorieNullFlavourDefiningCode; + } + + public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { + this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } - public void setLaborergebnis(LaborergebnisObservation laborergebnis) { - this.laborergebnis = laborergebnis; - } + public LaborergebnisObservation getLaborergebnis() { + return this.laborergebnis; + } - public LaborergebnisObservation getLaborergebnis() { - return this.laborergebnis ; - } + public void setLaborergebnis(LaborergebnisObservation laborergebnis) { + this.laborergebnis = laborergebnis; + } - public void setComposer(PartyProxy composer) { - this.composer = composer; - } + public PartyProxy getComposer() { + return this.composer; + } - public PartyProxy getComposer() { - return this.composer ; - } + public void setComposer(PartyProxy composer) { + this.composer = composer; + } - public void setLanguage(Language language) { - this.language = language; - } + public Language getLanguage() { + return this.language; + } - public Language getLanguage() { - return this.language ; - } + public void setLanguage(Language language) { + this.language = language; + } - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } + public FeederAudit getFeederAudit() { + return this.feederAudit; + } - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } - public void setTerritory(Territory territory) { - this.territory = territory; - } + public Territory getTerritory() { + return this.territory; + } - public Territory getTerritory() { - return this.territory ; - } + public void setTerritory(Territory territory) { + this.territory = territory; + } - public VersionUid getVersionUid() { - return this.versionUid ; - } + public VersionUid getVersionUid() { + return this.versionUid; + } - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccomedikationcomposition/GECCOMedikationComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccomedikationcomposition/GECCOMedikationComposition.java index 321f7959b..aedc61b5d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccomedikationcomposition/GECCOMedikationComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccomedikationcomposition/GECCOMedikationComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,288 +17,291 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.geccomedikationcomposition.definition.AceHemmerObservation; import org.ehrbase.fhirbridge.ehr.opt.geccomedikationcomposition.definition.AntikoagulanzienObservation; import org.ehrbase.fhirbridge.ehr.opt.geccomedikationcomposition.definition.Covid19TherapieObservation; import org.ehrbase.fhirbridge.ehr.opt.geccomedikationcomposition.definition.ImmunglobulineObservation; import org.ehrbase.fhirbridge.ehr.opt.geccomedikationcomposition.definition.KategorieDefiningCode; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-04-30T13:16:38.120261+02:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-04-30T13:16:38.120261+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("GECCO_Medikation") -public class GECCOMedikationComposition implements CompositionEntity, Composition { - /** - * Path: Medikation/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Medikation/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: Medikation/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]/value|defining_code") - private KategorieDefiningCode kategorieDefiningCode; - - /** - * Path: Medikation/context/Baum/Kategorie/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") - private NullFlavour kategorieNullFlavourDefiningCode; - - /** - * Path: Medikation/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Medikation/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Medikation/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Medikation/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Medikation/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Medikation/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Medikation/COVID-19 Therapie - * Description: Eine Snapshot-Ansicht über die Anwendung eines bestimmten Medikaments. - */ - @Path("/content[openEHR-EHR-OBSERVATION.medication_statement.v0 and name/value='COVID-19 Therapie']") - private Covid19TherapieObservation covid19Therapie; - - /** - * Path: Medikation/ACE-Hemmer - * Description: Eine Snapshot-Ansicht über die Anwendung eines bestimmten Medikaments. - */ - @Path("/content[openEHR-EHR-OBSERVATION.medication_statement.v0 and name/value='ACE-Hemmer']") - private AceHemmerObservation aceHemmer; - - /** - * Path: Medikation/Immunglobuline - * Description: Eine Snapshot-Ansicht über die Anwendung eines bestimmten Medikaments. - */ - @Path("/content[openEHR-EHR-OBSERVATION.medication_statement.v0 and name/value='Immunglobuline']") - private ImmunglobulineObservation immunglobuline; - - /** - * Path: Medikation/Antikoagulanzien - * Description: Eine Snapshot-Ansicht über die Anwendung eines bestimmten Medikaments. - */ - @Path("/content[openEHR-EHR-OBSERVATION.medication_statement.v0 and name/value='Antikoagulanzien']") - private AntikoagulanzienObservation antikoagulanzien; - - /** - * Path: Medikation/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Medikation/language - */ - @Path("/language") - private Language language; - - /** - * Path: Medikation/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Medikation/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setKategorieDefiningCode(KategorieDefiningCode kategorieDefiningCode) { - this.kategorieDefiningCode = kategorieDefiningCode; - } - - public KategorieDefiningCode getKategorieDefiningCode() { - return this.kategorieDefiningCode ; - } - - public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { - this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; - } - - public NullFlavour getKategorieNullFlavourDefiningCode() { - return this.kategorieNullFlavourDefiningCode ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } - - public void setCovid19Therapie(Covid19TherapieObservation covid19Therapie) { - this.covid19Therapie = covid19Therapie; - } - - public Covid19TherapieObservation getCovid19Therapie() { - return this.covid19Therapie ; - } - - public void setAceHemmer(AceHemmerObservation aceHemmer) { - this.aceHemmer = aceHemmer; - } - - public AceHemmerObservation getAceHemmer() { - return this.aceHemmer ; - } +public class GECCOMedikationComposition implements CompositionEntity { + /** + * Path: Medikation/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Medikation/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: Medikation/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]/value|defining_code") + private KategorieDefiningCode kategorieDefiningCode; + + /** + * Path: Medikation/context/Baum/Kategorie/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") + private NullFlavour kategorieNullFlavourDefiningCode; + + /** + * Path: Medikation/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Medikation/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Medikation/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Medikation/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Medikation/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Medikation/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Medikation/COVID-19 Therapie + * Description: Eine Snapshot-Ansicht über die Anwendung eines bestimmten Medikaments. + */ + @Path("/content[openEHR-EHR-OBSERVATION.medication_statement.v0 and name/value='COVID-19 Therapie']") + private Covid19TherapieObservation covid19Therapie; + + /** + * Path: Medikation/ACE-Hemmer + * Description: Eine Snapshot-Ansicht über die Anwendung eines bestimmten Medikaments. + */ + @Path("/content[openEHR-EHR-OBSERVATION.medication_statement.v0 and name/value='ACE-Hemmer']") + private AceHemmerObservation aceHemmer; + + /** + * Path: Medikation/Immunglobuline + * Description: Eine Snapshot-Ansicht über die Anwendung eines bestimmten Medikaments. + */ + @Path("/content[openEHR-EHR-OBSERVATION.medication_statement.v0 and name/value='Immunglobuline']") + private ImmunglobulineObservation immunglobuline; + + /** + * Path: Medikation/Antikoagulanzien + * Description: Eine Snapshot-Ansicht über die Anwendung eines bestimmten Medikaments. + */ + @Path("/content[openEHR-EHR-OBSERVATION.medication_statement.v0 and name/value='Antikoagulanzien']") + private AntikoagulanzienObservation antikoagulanzien; + + /** + * Path: Medikation/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Medikation/language + */ + @Path("/language") + private Language language; + + /** + * Path: Medikation/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Medikation/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public KategorieDefiningCode getKategorieDefiningCode() { + return this.kategorieDefiningCode; + } + + public void setKategorieDefiningCode(KategorieDefiningCode kategorieDefiningCode) { + this.kategorieDefiningCode = kategorieDefiningCode; + } + + public NullFlavour getKategorieNullFlavourDefiningCode() { + return this.kategorieNullFlavourDefiningCode; + } + + public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { + this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public Covid19TherapieObservation getCovid19Therapie() { + return this.covid19Therapie; + } + + public void setCovid19Therapie(Covid19TherapieObservation covid19Therapie) { + this.covid19Therapie = covid19Therapie; + } + + public AceHemmerObservation getAceHemmer() { + return this.aceHemmer; + } + + public void setAceHemmer(AceHemmerObservation aceHemmer) { + this.aceHemmer = aceHemmer; + } - public void setImmunglobuline(ImmunglobulineObservation immunglobuline) { - this.immunglobuline = immunglobuline; - } + public ImmunglobulineObservation getImmunglobuline() { + return this.immunglobuline; + } - public ImmunglobulineObservation getImmunglobuline() { - return this.immunglobuline ; - } + public void setImmunglobuline(ImmunglobulineObservation immunglobuline) { + this.immunglobuline = immunglobuline; + } - public void setAntikoagulanzien(AntikoagulanzienObservation antikoagulanzien) { - this.antikoagulanzien = antikoagulanzien; - } + public AntikoagulanzienObservation getAntikoagulanzien() { + return this.antikoagulanzien; + } - public AntikoagulanzienObservation getAntikoagulanzien() { - return this.antikoagulanzien ; - } + public void setAntikoagulanzien(AntikoagulanzienObservation antikoagulanzien) { + this.antikoagulanzien = antikoagulanzien; + } - public void setComposer(PartyProxy composer) { - this.composer = composer; - } + public PartyProxy getComposer() { + return this.composer; + } - public PartyProxy getComposer() { - return this.composer ; - } + public void setComposer(PartyProxy composer) { + this.composer = composer; + } - public void setLanguage(Language language) { - this.language = language; - } + public Language getLanguage() { + return this.language; + } - public Language getLanguage() { - return this.language ; - } + public void setLanguage(Language language) { + this.language = language; + } - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } + public FeederAudit getFeederAudit() { + return this.feederAudit; + } - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } - public void setTerritory(Territory territory) { - this.territory = territory; - } + public Territory getTerritory() { + return this.territory; + } - public Territory getTerritory() { - return this.territory ; - } + public void setTerritory(Territory territory) { + this.territory = territory; + } - public VersionUid getVersionUid() { - return this.versionUid ; - } + public VersionUid getVersionUid() { + return this.versionUid; + } - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccopersonendatencomposition/GECCOPersonendatenComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccopersonendatencomposition/GECCOPersonendatenComposition.java index ccc77eee6..ad20318dc 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccopersonendatencomposition/GECCOPersonendatenComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccopersonendatencomposition/GECCOPersonendatenComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,288 +17,291 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.geccopersonendatencomposition.definition.AlterObservation; import org.ehrbase.fhirbridge.ehr.opt.geccopersonendatencomposition.definition.GeccoPersonendatenKategorieElement; import org.ehrbase.fhirbridge.ehr.opt.geccopersonendatencomposition.definition.GeschlechtEvaluation; import org.ehrbase.fhirbridge.ehr.opt.geccopersonendatencomposition.definition.PersonendatenAdminEntry; import org.ehrbase.fhirbridge.ehr.opt.geccopersonendatencomposition.definition.StatusDefiningCode; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-15T15:57:50.474612+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-15T15:57:50.474612+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("GECCO_Personendaten") -public class GECCOPersonendatenComposition implements CompositionEntity, Composition { - /** - * Path: GECCO_Personendaten/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: GECCO_Personendaten/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: GECCO_Personendaten/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: GECCO_Personendaten/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: GECCO_Personendaten/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]") - private List<GeccoPersonendatenKategorieElement> kategorie; - - /** - * Path: GECCO_Personendaten/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: GECCO_Personendaten/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: GECCO_Personendaten/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: GECCO_Personendaten/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: GECCO_Personendaten/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: GECCO_Personendaten/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: GECCO_Personendaten/Personendaten - * Description: Demografische Daten zu einer Person wie Geburtsdatum und Telefonnummer. - */ - @Path("/content[openEHR-EHR-ADMIN_ENTRY.person_data.v0]") - private PersonendatenAdminEntry personendaten; - - /** - * Path: GECCO_Personendaten/Alter - * Description: Angaben über das Alter einer Person zu einem bestimmten Zeitpunkt. - */ - @Path("/content[openEHR-EHR-OBSERVATION.age.v0]") - private AlterObservation alter; - - /** - * Path: GECCO_Personendaten/Geschlecht - * Description: Detaillierte Beschreibung des Geschlechts einer Person. - */ - @Path("/content[openEHR-EHR-EVALUATION.gender.v1]") - private GeschlechtEvaluation geschlecht; - - /** - * Path: GECCO_Personendaten/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: GECCO_Personendaten/language - */ - @Path("/language") - private Language language; - - /** - * Path: GECCO_Personendaten/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: GECCO_Personendaten/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorie(List<GeccoPersonendatenKategorieElement> kategorie) { - this.kategorie = kategorie; - } - - public List<GeccoPersonendatenKategorieElement> getKategorie() { - return this.kategorie ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } - - public void setPersonendaten(PersonendatenAdminEntry personendaten) { - this.personendaten = personendaten; - } - - public PersonendatenAdminEntry getPersonendaten() { - return this.personendaten ; - } +public class GECCOPersonendatenComposition implements CompositionEntity { + /** + * Path: GECCO_Personendaten/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: GECCO_Personendaten/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: GECCO_Personendaten/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: GECCO_Personendaten/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: GECCO_Personendaten/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]") + private List<GeccoPersonendatenKategorieElement> kategorie; + + /** + * Path: GECCO_Personendaten/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: GECCO_Personendaten/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: GECCO_Personendaten/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: GECCO_Personendaten/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: GECCO_Personendaten/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: GECCO_Personendaten/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: GECCO_Personendaten/Personendaten + * Description: Demografische Daten zu einer Person wie Geburtsdatum und Telefonnummer. + */ + @Path("/content[openEHR-EHR-ADMIN_ENTRY.person_data.v0]") + private PersonendatenAdminEntry personendaten; + + /** + * Path: GECCO_Personendaten/Alter + * Description: Angaben über das Alter einer Person zu einem bestimmten Zeitpunkt. + */ + @Path("/content[openEHR-EHR-OBSERVATION.age.v0]") + private AlterObservation alter; + + /** + * Path: GECCO_Personendaten/Geschlecht + * Description: Detaillierte Beschreibung des Geschlechts einer Person. + */ + @Path("/content[openEHR-EHR-EVALUATION.gender.v1]") + private GeschlechtEvaluation geschlecht; + + /** + * Path: GECCO_Personendaten/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: GECCO_Personendaten/language + */ + @Path("/language") + private Language language; + + /** + * Path: GECCO_Personendaten/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: GECCO_Personendaten/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public List<GeccoPersonendatenKategorieElement> getKategorie() { + return this.kategorie; + } + + public void setKategorie(List<GeccoPersonendatenKategorieElement> kategorie) { + this.kategorie = kategorie; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public PersonendatenAdminEntry getPersonendaten() { + return this.personendaten; + } + + public void setPersonendaten(PersonendatenAdminEntry personendaten) { + this.personendaten = personendaten; + } - public void setAlter(AlterObservation alter) { - this.alter = alter; - } + public AlterObservation getAlter() { + return this.alter; + } - public AlterObservation getAlter() { - return this.alter ; - } + public void setAlter(AlterObservation alter) { + this.alter = alter; + } - public void setGeschlecht(GeschlechtEvaluation geschlecht) { - this.geschlecht = geschlecht; - } + public GeschlechtEvaluation getGeschlecht() { + return this.geschlecht; + } - public GeschlechtEvaluation getGeschlecht() { - return this.geschlecht ; - } + public void setGeschlecht(GeschlechtEvaluation geschlecht) { + this.geschlecht = geschlecht; + } - public void setComposer(PartyProxy composer) { - this.composer = composer; - } + public PartyProxy getComposer() { + return this.composer; + } - public PartyProxy getComposer() { - return this.composer ; - } + public void setComposer(PartyProxy composer) { + this.composer = composer; + } - public void setLanguage(Language language) { - this.language = language; - } + public Language getLanguage() { + return this.language; + } - public Language getLanguage() { - return this.language ; - } + public void setLanguage(Language language) { + this.language = language; + } - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } + public FeederAudit getFeederAudit() { + return this.feederAudit; + } - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } - public void setTerritory(Territory territory) { - this.territory = territory; - } + public Territory getTerritory() { + return this.territory; + } - public Territory getTerritory() { - return this.territory ; - } + public void setTerritory(Territory territory) { + this.territory = territory; + } - public VersionUid getVersionUid() { - return this.versionUid ; - } + public VersionUid getVersionUid() { + return this.versionUid; + } - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoprozedurcomposition/GECCOProzedurComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoprozedurcomposition/GECCOProzedurComposition.java index 67c1ee068..528520a76 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoprozedurcomposition/GECCOProzedurComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoprozedurcomposition/GECCOProzedurComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -20,259 +16,262 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.geccoprozedurcomposition.definition.GeccoProzedurKategorieElement; import org.ehrbase.fhirbridge.ehr.opt.geccoprozedurcomposition.definition.NichtDurchgefuehrteProzedurEvaluation; import org.ehrbase.fhirbridge.ehr.opt.geccoprozedurcomposition.definition.ProzedurAction; import org.ehrbase.fhirbridge.ehr.opt.geccoprozedurcomposition.definition.UnbekannteProzedurEvaluation; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-01T12:17:23.938964+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.0.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-01T12:17:23.938964+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.0.0" ) @Template("GECCO_Prozedur") -public class GECCOProzedurComposition implements Composition, CompositionEntity { - /** - * Path: GECCO_Prozedur/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: GECCO_Prozedur/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: GECCO_Prozedur/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]") - private List<GeccoProzedurKategorieElement> kategorie; - - /** - * Path: GECCO_Prozedur/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: GECCO_Prozedur/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: GECCO_Prozedur/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: GECCO_Prozedur/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: GECCO_Prozedur/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: GECCO_Prozedur/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: GECCO_Prozedur/Prozedur - * Description: Eine klinische Aktivität, die zur Früherkennung, Untersuchung, Diagnose, Heilung, Therapie, Bewertung oder in Hinsicht auf palliative Maßnahmen durchgeführt wird. - */ - @Path("/content[openEHR-EHR-ACTION.procedure.v1]") - private ProzedurAction prozedur; - - /** - * Path: GECCO_Prozedur/Nicht durchgeführte Prozedur - * Description: Ein Bericht über den Ausschluss eines/r Problems/Diagnose, familiäre Krankengeschichte, Medikation, Nebenwirkung/Allergens oder eines anderen klinischen Ereignisses, welche/s zur Zeit nicht oder noch nie vorhanden war. - */ - @Path("/content[openEHR-EHR-EVALUATION.exclusion_specific.v1 and name/value='Nicht durchgeführte Prozedur']") - private NichtDurchgefuehrteProzedurEvaluation nichtDurchgefuehrteProzedur; - - /** - * Path: GECCO_Prozedur/Unbekannte Prozedur - * Description: Aussage darüber, dass bestimmte Gesundheitsinformationen zum Zeitpukt der Erfassung nicht in der Krankenakte oder einem Schriftstück erfasst werden können, da keine Kenntnisse darüber vorhanden sind. - */ - @Path("/content[openEHR-EHR-EVALUATION.absence.v2 and name/value='Unbekannte Prozedur']") - private UnbekannteProzedurEvaluation unbekannteProzedur; - - /** - * Path: GECCO_Prozedur/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: GECCO_Prozedur/language - */ - @Path("/language") - private Language language; - - /** - * Path: GECCO_Prozedur/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: GECCO_Prozedur/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setKategorie(List<GeccoProzedurKategorieElement> kategorie) { - this.kategorie = kategorie; - } - - public List<GeccoProzedurKategorieElement> getKategorie() { - return this.kategorie ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } - - public void setProzedur(ProzedurAction prozedur) { - this.prozedur = prozedur; - } - - public ProzedurAction getProzedur() { - return this.prozedur ; - } - - public void setNichtDurchgefuehrteProzedur( - NichtDurchgefuehrteProzedurEvaluation nichtDurchgefuehrteProzedur) { - this.nichtDurchgefuehrteProzedur = nichtDurchgefuehrteProzedur; - } - - public NichtDurchgefuehrteProzedurEvaluation getNichtDurchgefuehrteProzedur() { - return this.nichtDurchgefuehrteProzedur ; - } - - public void setUnbekannteProzedur(UnbekannteProzedurEvaluation unbekannteProzedur) { - this.unbekannteProzedur = unbekannteProzedur; - } - - public UnbekannteProzedurEvaluation getUnbekannteProzedur() { - return this.unbekannteProzedur ; - } +public class GECCOProzedurComposition implements CompositionEntity { + /** + * Path: GECCO_Prozedur/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: GECCO_Prozedur/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: GECCO_Prozedur/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]") + private List<GeccoProzedurKategorieElement> kategorie; + + /** + * Path: GECCO_Prozedur/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: GECCO_Prozedur/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: GECCO_Prozedur/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: GECCO_Prozedur/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: GECCO_Prozedur/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: GECCO_Prozedur/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: GECCO_Prozedur/Prozedur + * Description: Eine klinische Aktivität, die zur Früherkennung, Untersuchung, Diagnose, Heilung, Therapie, Bewertung oder in Hinsicht auf palliative Maßnahmen durchgeführt wird. + */ + @Path("/content[openEHR-EHR-ACTION.procedure.v1]") + private ProzedurAction prozedur; + + /** + * Path: GECCO_Prozedur/Nicht durchgeführte Prozedur + * Description: Ein Bericht über den Ausschluss eines/r Problems/Diagnose, familiäre Krankengeschichte, Medikation, Nebenwirkung/Allergens oder eines anderen klinischen Ereignisses, welche/s zur Zeit nicht oder noch nie vorhanden war. + */ + @Path("/content[openEHR-EHR-EVALUATION.exclusion_specific.v1 and name/value='Nicht durchgeführte Prozedur']") + private NichtDurchgefuehrteProzedurEvaluation nichtDurchgefuehrteProzedur; + + /** + * Path: GECCO_Prozedur/Unbekannte Prozedur + * Description: Aussage darüber, dass bestimmte Gesundheitsinformationen zum Zeitpukt der Erfassung nicht in der Krankenakte oder einem Schriftstück erfasst werden können, da keine Kenntnisse darüber vorhanden sind. + */ + @Path("/content[openEHR-EHR-EVALUATION.absence.v2 and name/value='Unbekannte Prozedur']") + private UnbekannteProzedurEvaluation unbekannteProzedur; + + /** + * Path: GECCO_Prozedur/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: GECCO_Prozedur/language + */ + @Path("/language") + private Language language; + + /** + * Path: GECCO_Prozedur/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: GECCO_Prozedur/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public List<GeccoProzedurKategorieElement> getKategorie() { + return this.kategorie; + } + + public void setKategorie(List<GeccoProzedurKategorieElement> kategorie) { + this.kategorie = kategorie; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public ProzedurAction getProzedur() { + return this.prozedur; + } + + public void setProzedur(ProzedurAction prozedur) { + this.prozedur = prozedur; + } + + public NichtDurchgefuehrteProzedurEvaluation getNichtDurchgefuehrteProzedur() { + return this.nichtDurchgefuehrteProzedur; + } + + public void setNichtDurchgefuehrteProzedur( + NichtDurchgefuehrteProzedurEvaluation nichtDurchgefuehrteProzedur) { + this.nichtDurchgefuehrteProzedur = nichtDurchgefuehrteProzedur; + } + + public UnbekannteProzedurEvaluation getUnbekannteProzedur() { + return this.unbekannteProzedur; + } + + public void setUnbekannteProzedur(UnbekannteProzedurEvaluation unbekannteProzedur) { + this.unbekannteProzedur = unbekannteProzedur; + } - public void setComposer(PartyProxy composer) { - this.composer = composer; - } - - public PartyProxy getComposer() { - return this.composer ; - } - - public void setLanguage(Language language) { - this.language = language; - } - - public Language getLanguage() { - return this.language ; - } - - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } - - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } - - public void setTerritory(Territory territory) { - this.territory = territory; - } - - public Territory getTerritory() { - return this.territory ; - } - - public VersionUid getVersionUid() { - return this.versionUid ; - } - - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public PartyProxy getComposer() { + return this.composer; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } + + public Language getLanguage() { + return this.language; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public Territory getTerritory() { + return this.territory; + } + + public void setTerritory(Territory territory) { + this.territory = territory; + } + + public VersionUid getVersionUid() { + return this.versionUid; + } + + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoradiologischerbefundcomposition/GECCORadiologischerBefundComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoradiologischerbefundcomposition/GECCORadiologischerBefundComposition.java index b8df699cd..8cb6f8846 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoradiologischerbefundcomposition/GECCORadiologischerBefundComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoradiologischerbefundcomposition/GECCORadiologischerBefundComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,257 +17,260 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.geccoradiologischerbefundcomposition.definition.BildgebendesUntersuchungsergebnisObservation; import org.ehrbase.fhirbridge.ehr.opt.geccoradiologischerbefundcomposition.definition.RadiologischerBefundKategorieElement; import org.ehrbase.fhirbridge.ehr.opt.geccoradiologischerbefundcomposition.definition.StatusDefiningCode; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:47.209809+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-09T11:53:47.209809+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("GECCO_Radiologischer Befund") -public class GECCORadiologischerBefundComposition implements CompositionEntity, Composition { - /** - * Path: Radiologischer Befund/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Radiologischer Befund/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: Radiologischer Befund/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: Radiologischer Befund/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: Radiologischer Befund/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]") - private List<RadiologischerBefundKategorieElement> kategorie; - - /** - * Path: Radiologischer Befund/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Radiologischer Befund/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Radiologischer Befund/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Radiologischer Befund/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Radiologischer Befund/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Radiologischer Befund/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Radiologischer Befund/Bildgebendes Untersuchungsergebnis - * Description: Zur Darstellung der Ergebnisse und der Interpretationen einer durchgeführten bildgebenden Untersuchung. - */ - @Path("/content[openEHR-EHR-OBSERVATION.imaging_exam_result.v0]") - private List<BildgebendesUntersuchungsergebnisObservation> bildgebendesUntersuchungsergebnis; - - /** - * Path: Radiologischer Befund/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Radiologischer Befund/language - */ - @Path("/language") - private Language language; - - /** - * Path: Radiologischer Befund/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Radiologischer Befund/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorie(List<RadiologischerBefundKategorieElement> kategorie) { - this.kategorie = kategorie; - } - - public List<RadiologischerBefundKategorieElement> getKategorie() { - return this.kategorie ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } - - public void setBildgebendesUntersuchungsergebnis( - List<BildgebendesUntersuchungsergebnisObservation> bildgebendesUntersuchungsergebnis) { - this.bildgebendesUntersuchungsergebnis = bildgebendesUntersuchungsergebnis; - } - - public List<BildgebendesUntersuchungsergebnisObservation> getBildgebendesUntersuchungsergebnis() { - return this.bildgebendesUntersuchungsergebnis ; - } +public class GECCORadiologischerBefundComposition implements CompositionEntity { + /** + * Path: Radiologischer Befund/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Radiologischer Befund/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: Radiologischer Befund/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: Radiologischer Befund/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: Radiologischer Befund/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]") + private List<RadiologischerBefundKategorieElement> kategorie; + + /** + * Path: Radiologischer Befund/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Radiologischer Befund/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Radiologischer Befund/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Radiologischer Befund/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Radiologischer Befund/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Radiologischer Befund/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Radiologischer Befund/Bildgebendes Untersuchungsergebnis + * Description: Zur Darstellung der Ergebnisse und der Interpretationen einer durchgeführten bildgebenden Untersuchung. + */ + @Path("/content[openEHR-EHR-OBSERVATION.imaging_exam_result.v0]") + private List<BildgebendesUntersuchungsergebnisObservation> bildgebendesUntersuchungsergebnis; + + /** + * Path: Radiologischer Befund/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Radiologischer Befund/language + */ + @Path("/language") + private Language language; + + /** + * Path: Radiologischer Befund/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Radiologischer Befund/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public List<RadiologischerBefundKategorieElement> getKategorie() { + return this.kategorie; + } + + public void setKategorie(List<RadiologischerBefundKategorieElement> kategorie) { + this.kategorie = kategorie; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public List<BildgebendesUntersuchungsergebnisObservation> getBildgebendesUntersuchungsergebnis() { + return this.bildgebendesUntersuchungsergebnis; + } + + public void setBildgebendesUntersuchungsergebnis( + List<BildgebendesUntersuchungsergebnisObservation> bildgebendesUntersuchungsergebnis) { + this.bildgebendesUntersuchungsergebnis = bildgebendesUntersuchungsergebnis; + } - public void setComposer(PartyProxy composer) { - this.composer = composer; - } - - public PartyProxy getComposer() { - return this.composer ; - } - - public void setLanguage(Language language) { - this.language = language; - } - - public Language getLanguage() { - return this.language ; - } - - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } - - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } - - public void setTerritory(Territory territory) { - this.territory = territory; - } - - public Territory getTerritory() { - return this.territory ; - } - - public VersionUid getVersionUid() { - return this.versionUid ; - } - - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public PartyProxy getComposer() { + return this.composer; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } + + public Language getLanguage() { + return this.language; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public Territory getTerritory() { + return this.territory; + } + + public void setTerritory(Territory territory) { + this.territory = territory; + } + + public VersionUid getVersionUid() { + return this.versionUid; + } + + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoserologischerbefundcomposition/GECCOSerologischerBefundComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoserologischerbefundcomposition/GECCOSerologischerBefundComposition.java index 87c6856b7..b2d0d2649 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoserologischerbefundcomposition/GECCOSerologischerBefundComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoserologischerbefundcomposition/GECCOSerologischerBefundComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,287 +17,290 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.geccoserologischerbefundcomposition.definition.BefundObservation; import org.ehrbase.fhirbridge.ehr.opt.geccoserologischerbefundcomposition.definition.GeccoSerologischerBefundKategorieLoincElement; import org.ehrbase.fhirbridge.ehr.opt.geccoserologischerbefundcomposition.definition.KategorieDefiningCode; import org.ehrbase.fhirbridge.ehr.opt.geccoserologischerbefundcomposition.definition.StatusDefiningCode; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-04-22T17:35:13.417995+02:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-04-22T17:35:13.417995+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("GECCO_Serologischer Befund") -public class GECCOSerologischerBefundComposition implements CompositionEntity, Composition { - /** - * Path: GECCO_Serologischer Befund/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: GECCO_Serologischer Befund/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001 and name/value='Tree']/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: GECCO_Serologischer Befund/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001 and name/value='Tree']/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: GECCO_Serologischer Befund/context/Tree/Status/null_flavour - */ - @Path("/context/other_context[at0001 and name/value='Tree']/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: GECCO_Serologischer Befund/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001 and name/value='Tree']/items[at0005 and name/value='Kategorie']/value|defining_code") - private KategorieDefiningCode kategorieDefiningCode; - - /** - * Path: GECCO_Serologischer Befund/context/Tree/Kategorie/null_flavour - */ - @Path("/context/other_context[at0001 and name/value='Tree']/items[at0005 and name/value='Kategorie']/null_flavour|defining_code") - private NullFlavour kategorieNullFlavourDefiningCode; - - /** - * Path: GECCO_Serologischer Befund/context/Kategorie (LOINC) - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001 and name/value='Tree']/items[at0005 and name/value='Kategorie (LOINC)']") - private List<GeccoSerologischerBefundKategorieLoincElement> kategorieLoinc; - - /** - * Path: GECCO_Serologischer Befund/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: GECCO_Serologischer Befund/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: GECCO_Serologischer Befund/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: GECCO_Serologischer Befund/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: GECCO_Serologischer Befund/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: GECCO_Serologischer Befund/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: GECCO_Serologischer Befund/Befund - * Description: Das Ergebnis - einschließlich der Befunde und der Interpretation des Labors - einer Untersuchung, die an Proben durchgeführt wurde, die von einer Einzelperson stammen oder mit dieser Person zusammenhängen. - */ - @Path("/content[openEHR-EHR-OBSERVATION.laboratory_test_result.v1 and name/value='Befund']") - private BefundObservation befund; - - /** - * Path: GECCO_Serologischer Befund/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: GECCO_Serologischer Befund/language - */ - @Path("/language") - private Language language; - - /** - * Path: GECCO_Serologischer Befund/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: GECCO_Serologischer Befund/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorieDefiningCode(KategorieDefiningCode kategorieDefiningCode) { - this.kategorieDefiningCode = kategorieDefiningCode; - } - - public KategorieDefiningCode getKategorieDefiningCode() { - return this.kategorieDefiningCode ; - } - - public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { - this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; - } - - public NullFlavour getKategorieNullFlavourDefiningCode() { - return this.kategorieNullFlavourDefiningCode ; - } - - public void setKategorieLoinc( - List<GeccoSerologischerBefundKategorieLoincElement> kategorieLoinc) { - this.kategorieLoinc = kategorieLoinc; - } - - public List<GeccoSerologischerBefundKategorieLoincElement> getKategorieLoinc() { - return this.kategorieLoinc ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } +public class GECCOSerologischerBefundComposition implements CompositionEntity { + /** + * Path: GECCO_Serologischer Befund/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: GECCO_Serologischer Befund/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001 and name/value='Tree']/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: GECCO_Serologischer Befund/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001 and name/value='Tree']/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: GECCO_Serologischer Befund/context/Tree/Status/null_flavour + */ + @Path("/context/other_context[at0001 and name/value='Tree']/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: GECCO_Serologischer Befund/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001 and name/value='Tree']/items[at0005 and name/value='Kategorie']/value|defining_code") + private KategorieDefiningCode kategorieDefiningCode; + + /** + * Path: GECCO_Serologischer Befund/context/Tree/Kategorie/null_flavour + */ + @Path("/context/other_context[at0001 and name/value='Tree']/items[at0005 and name/value='Kategorie']/null_flavour|defining_code") + private NullFlavour kategorieNullFlavourDefiningCode; + + /** + * Path: GECCO_Serologischer Befund/context/Kategorie (LOINC) + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001 and name/value='Tree']/items[at0005 and name/value='Kategorie (LOINC)']") + private List<GeccoSerologischerBefundKategorieLoincElement> kategorieLoinc; + + /** + * Path: GECCO_Serologischer Befund/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: GECCO_Serologischer Befund/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: GECCO_Serologischer Befund/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: GECCO_Serologischer Befund/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: GECCO_Serologischer Befund/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: GECCO_Serologischer Befund/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: GECCO_Serologischer Befund/Befund + * Description: Das Ergebnis - einschließlich der Befunde und der Interpretation des Labors - einer Untersuchung, die an Proben durchgeführt wurde, die von einer Einzelperson stammen oder mit dieser Person zusammenhängen. + */ + @Path("/content[openEHR-EHR-OBSERVATION.laboratory_test_result.v1 and name/value='Befund']") + private BefundObservation befund; + + /** + * Path: GECCO_Serologischer Befund/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: GECCO_Serologischer Befund/language + */ + @Path("/language") + private Language language; + + /** + * Path: GECCO_Serologischer Befund/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: GECCO_Serologischer Befund/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public KategorieDefiningCode getKategorieDefiningCode() { + return this.kategorieDefiningCode; + } + + public void setKategorieDefiningCode(KategorieDefiningCode kategorieDefiningCode) { + this.kategorieDefiningCode = kategorieDefiningCode; + } + + public NullFlavour getKategorieNullFlavourDefiningCode() { + return this.kategorieNullFlavourDefiningCode; + } + + public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { + this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; + } + + public List<GeccoSerologischerBefundKategorieLoincElement> getKategorieLoinc() { + return this.kategorieLoinc; + } + + public void setKategorieLoinc( + List<GeccoSerologischerBefundKategorieLoincElement> kategorieLoinc) { + this.kategorieLoinc = kategorieLoinc; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } - - public void setBefund(BefundObservation befund) { - this.befund = befund; - } - - public BefundObservation getBefund() { - return this.befund ; - } - - public void setComposer(PartyProxy composer) { - this.composer = composer; - } - - public PartyProxy getComposer() { - return this.composer ; - } - - public void setLanguage(Language language) { - this.language = language; - } - - public Language getLanguage() { - return this.language ; - } - - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } - - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } - - public void setTerritory(Territory territory) { - this.territory = territory; - } - - public Territory getTerritory() { - return this.territory ; - } - - public VersionUid getVersionUid() { - return this.versionUid ; - } - - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public BefundObservation getBefund() { + return this.befund; + } + + public void setBefund(BefundObservation befund) { + this.befund = befund; + } + + public PartyProxy getComposer() { + return this.composer; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } + + public Language getLanguage() { + return this.language; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public Territory getTerritory() { + return this.territory; + } + + public void setTerritory(Territory territory) { + this.territory = territory; + } + + public VersionUid getVersionUid() { + return this.versionUid; + } + + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccovirologischerbefundcomposition/GECCOVirologischerBefundComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccovirologischerbefundcomposition/GECCOVirologischerBefundComposition.java index a2b21e17e..64e808db2 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccovirologischerbefundcomposition/GECCOVirologischerBefundComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccovirologischerbefundcomposition/GECCOVirologischerBefundComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,287 +17,290 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.geccovirologischerbefundcomposition.definition.BefundObservation; import org.ehrbase.fhirbridge.ehr.opt.geccovirologischerbefundcomposition.definition.GeccoVirologischerBefundKategorieLoincElement; import org.ehrbase.fhirbridge.ehr.opt.geccovirologischerbefundcomposition.definition.KategorieDefiningCode; import org.ehrbase.fhirbridge.ehr.opt.geccovirologischerbefundcomposition.definition.StatusDefiningCode; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-17T16:15:08.473585100+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-17T16:15:08.473585100+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("GECCO_Virologischer Befund") -public class GECCOVirologischerBefundComposition implements Composition, CompositionEntity { - /** - * Path: GECCO_Virologischer Befund/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: GECCO_Virologischer Befund/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001 and name/value='Tree']/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: GECCO_Virologischer Befund/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001 and name/value='Tree']/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: GECCO_Virologischer Befund/context/Tree/Status/null_flavour - */ - @Path("/context/other_context[at0001 and name/value='Tree']/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: GECCO_Virologischer Befund/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001 and name/value='Tree']/items[at0005 and name/value='Kategorie']/value|defining_code") - private KategorieDefiningCode kategorieDefiningCode; - - /** - * Path: GECCO_Virologischer Befund/context/Tree/Kategorie/null_flavour - */ - @Path("/context/other_context[at0001 and name/value='Tree']/items[at0005 and name/value='Kategorie']/null_flavour|defining_code") - private NullFlavour kategorieNullFlavourDefiningCode; - - /** - * Path: GECCO_Virologischer Befund/context/Kategorie (LOINC) - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001 and name/value='Tree']/items[at0005 and name/value='Kategorie (LOINC)']") - private List<GeccoVirologischerBefundKategorieLoincElement> kategorieLoinc; - - /** - * Path: GECCO_Virologischer Befund/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: GECCO_Virologischer Befund/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: GECCO_Virologischer Befund/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: GECCO_Virologischer Befund/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: GECCO_Virologischer Befund/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: GECCO_Virologischer Befund/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: GECCO_Virologischer Befund/Befund - * Description: Das Ergebnis - einschließlich der Befunde und der Interpretation des Labors - einer Untersuchung, die an Proben durchgeführt wurde, die von einer Einzelperson stammen oder mit dieser Person zusammenhängen. - */ - @Path("/content[openEHR-EHR-OBSERVATION.laboratory_test_result.v1 and name/value='Befund']") - private BefundObservation befund; - - /** - * Path: GECCO_Virologischer Befund/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: GECCO_Virologischer Befund/language - */ - @Path("/language") - private Language language; - - /** - * Path: GECCO_Virologischer Befund/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: GECCO_Virologischer Befund/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorieDefiningCode(KategorieDefiningCode kategorieDefiningCode) { - this.kategorieDefiningCode = kategorieDefiningCode; - } - - public KategorieDefiningCode getKategorieDefiningCode() { - return this.kategorieDefiningCode ; - } - - public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { - this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; - } - - public NullFlavour getKategorieNullFlavourDefiningCode() { - return this.kategorieNullFlavourDefiningCode ; - } - - public void setKategorieLoinc( - List<GeccoVirologischerBefundKategorieLoincElement> kategorieLoinc) { - this.kategorieLoinc = kategorieLoinc; - } - - public List<GeccoVirologischerBefundKategorieLoincElement> getKategorieLoinc() { - return this.kategorieLoinc ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } +public class GECCOVirologischerBefundComposition implements CompositionEntity { + /** + * Path: GECCO_Virologischer Befund/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: GECCO_Virologischer Befund/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001 and name/value='Tree']/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: GECCO_Virologischer Befund/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001 and name/value='Tree']/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: GECCO_Virologischer Befund/context/Tree/Status/null_flavour + */ + @Path("/context/other_context[at0001 and name/value='Tree']/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: GECCO_Virologischer Befund/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001 and name/value='Tree']/items[at0005 and name/value='Kategorie']/value|defining_code") + private KategorieDefiningCode kategorieDefiningCode; + + /** + * Path: GECCO_Virologischer Befund/context/Tree/Kategorie/null_flavour + */ + @Path("/context/other_context[at0001 and name/value='Tree']/items[at0005 and name/value='Kategorie']/null_flavour|defining_code") + private NullFlavour kategorieNullFlavourDefiningCode; + + /** + * Path: GECCO_Virologischer Befund/context/Kategorie (LOINC) + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001 and name/value='Tree']/items[at0005 and name/value='Kategorie (LOINC)']") + private List<GeccoVirologischerBefundKategorieLoincElement> kategorieLoinc; + + /** + * Path: GECCO_Virologischer Befund/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: GECCO_Virologischer Befund/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: GECCO_Virologischer Befund/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: GECCO_Virologischer Befund/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: GECCO_Virologischer Befund/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: GECCO_Virologischer Befund/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: GECCO_Virologischer Befund/Befund + * Description: Das Ergebnis - einschließlich der Befunde und der Interpretation des Labors - einer Untersuchung, die an Proben durchgeführt wurde, die von einer Einzelperson stammen oder mit dieser Person zusammenhängen. + */ + @Path("/content[openEHR-EHR-OBSERVATION.laboratory_test_result.v1 and name/value='Befund']") + private BefundObservation befund; + + /** + * Path: GECCO_Virologischer Befund/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: GECCO_Virologischer Befund/language + */ + @Path("/language") + private Language language; + + /** + * Path: GECCO_Virologischer Befund/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: GECCO_Virologischer Befund/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public KategorieDefiningCode getKategorieDefiningCode() { + return this.kategorieDefiningCode; + } + + public void setKategorieDefiningCode(KategorieDefiningCode kategorieDefiningCode) { + this.kategorieDefiningCode = kategorieDefiningCode; + } + + public NullFlavour getKategorieNullFlavourDefiningCode() { + return this.kategorieNullFlavourDefiningCode; + } + + public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { + this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; + } + + public List<GeccoVirologischerBefundKategorieLoincElement> getKategorieLoinc() { + return this.kategorieLoinc; + } + + public void setKategorieLoinc( + List<GeccoVirologischerBefundKategorieLoincElement> kategorieLoinc) { + this.kategorieLoinc = kategorieLoinc; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } - - public void setBefund(BefundObservation befund) { - this.befund = befund; - } - - public BefundObservation getBefund() { - return this.befund ; - } - - public void setComposer(PartyProxy composer) { - this.composer = composer; - } - - public PartyProxy getComposer() { - return this.composer ; - } - - public void setLanguage(Language language) { - this.language = language; - } - - public Language getLanguage() { - return this.language ; - } - - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } - - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } - - public void setTerritory(Territory territory) { - this.territory = territory; - } - - public Territory getTerritory() { - return this.territory ; - } - - public VersionUid getVersionUid() { - return this.versionUid ; - } - - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public BefundObservation getBefund() { + return this.befund; + } + + public void setBefund(BefundObservation befund) { + this.befund = befund; + } + + public PartyProxy getComposer() { + return this.composer; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } + + public Language getLanguage() { + return this.language; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public Territory getTerritory() { + return this.territory; + } + + public void setTerritory(Territory territory) { + this.territory = territory; + } + + public VersionUid getVersionUid() { + return this.versionUid; + } + + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/herzfrequenzcomposition/HerzfrequenzComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/herzfrequenzcomposition/HerzfrequenzComposition.java index f2fc2d6ef..34226acc0 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/herzfrequenzcomposition/HerzfrequenzComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/herzfrequenzcomposition/HerzfrequenzComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -20,210 +16,213 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.herzfrequenzcomposition.definition.HerzfrequenzObservation; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:58.149789+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-09T11:53:58.149789+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("Herzfrequenz") -public class HerzfrequenzComposition implements CompositionEntity, Composition { - /** - * Path: Herzfrequenz/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Herzfrequenz/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: Herzfrequenz/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Herzfrequenz/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Herzfrequenz/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Herzfrequenz/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Herzfrequenz/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Herzfrequenz/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Herzfrequenz/Herzfrequenz - * Description: Die Frequenz und zugehörige Attribute für die Puls- oder Herzfrequenz. - */ - @Path("/content[openEHR-EHR-OBSERVATION.pulse.v2 and name/value='Herzfrequenz']") - private HerzfrequenzObservation herzfrequenz; - - /** - * Path: Herzfrequenz/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Herzfrequenz/language - */ - @Path("/language") - private Language language; - - /** - * Path: Herzfrequenz/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Herzfrequenz/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } - - public void setHerzfrequenz(HerzfrequenzObservation herzfrequenz) { - this.herzfrequenz = herzfrequenz; - } - - public HerzfrequenzObservation getHerzfrequenz() { - return this.herzfrequenz ; - } - - public void setComposer(PartyProxy composer) { - this.composer = composer; - } - - public PartyProxy getComposer() { - return this.composer ; - } - - public void setLanguage(Language language) { - this.language = language; - } - - public Language getLanguage() { - return this.language ; - } - - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } - - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } +public class HerzfrequenzComposition implements CompositionEntity { + /** + * Path: Herzfrequenz/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Herzfrequenz/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: Herzfrequenz/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Herzfrequenz/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Herzfrequenz/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Herzfrequenz/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Herzfrequenz/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Herzfrequenz/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Herzfrequenz/Herzfrequenz + * Description: Die Frequenz und zugehörige Attribute für die Puls- oder Herzfrequenz. + */ + @Path("/content[openEHR-EHR-OBSERVATION.pulse.v2 and name/value='Herzfrequenz']") + private HerzfrequenzObservation herzfrequenz; + + /** + * Path: Herzfrequenz/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Herzfrequenz/language + */ + @Path("/language") + private Language language; + + /** + * Path: Herzfrequenz/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Herzfrequenz/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public HerzfrequenzObservation getHerzfrequenz() { + return this.herzfrequenz; + } + + public void setHerzfrequenz(HerzfrequenzObservation herzfrequenz) { + this.herzfrequenz = herzfrequenz; + } + + public PartyProxy getComposer() { + return this.composer; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } + + public Language getLanguage() { + return this.language; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } - public void setTerritory(Territory territory) { - this.territory = territory; - } + public Territory getTerritory() { + return this.territory; + } - public Territory getTerritory() { - return this.territory ; - } + public void setTerritory(Territory territory) { + this.territory = territory; + } - public VersionUid getVersionUid() { - return this.versionUid ; - } + public VersionUid getVersionUid() { + return this.versionUid; + } - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/intensivmedizinischesmonitoringkorpertemperaturcomposition/IntensivmedizinischesMonitoringKorpertemperaturComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/intensivmedizinischesmonitoringkorpertemperaturcomposition/IntensivmedizinischesMonitoringKorpertemperaturComposition.java index a66e731dc..c33fc661e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/intensivmedizinischesmonitoringkorpertemperaturcomposition/IntensivmedizinischesMonitoringKorpertemperaturComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/intensivmedizinischesmonitoringkorpertemperaturcomposition/IntensivmedizinischesMonitoringKorpertemperaturComposition.java @@ -4,10 +4,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -20,270 +16,273 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.intensivmedizinischesmonitoringkorpertemperaturcomposition.definition.FallidentifikationCluster; import org.ehrbase.fhirbridge.ehr.opt.intensivmedizinischesmonitoringkorpertemperaturcomposition.definition.KoerpertemperaturObservation; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.report.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:54:08.533114+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-09T11:54:08.533114+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("Intensivmedizinisches Monitoring Korpertemperatur") -public class IntensivmedizinischesMonitoringKorpertemperaturComposition implements CompositionEntity, Composition { - /** - * Path: Bericht/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Bericht/context/Bericht Name - * Description: Identifizierungsmerkmal des Berichts. - */ - @Path("/context/other_context[at0001]/items[at0002 and name/value='Bericht Name']/value|value") - private String berichtNameValue; - - /** - * Path: Bericht/context/Tree/Bericht Name/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0002 and name/value='Bericht Name']/null_flavour|defining_code") - private NullFlavour berichtNameNullFlavourDefiningCode; - - /** - * Path: Bericht/context/Status - * Description: Der Status des gesamten Berichts. Hinweis: Dies ist nicht der Status einer Berichtskomponente. - */ - @Path("/context/other_context[at0001]/items[at0005]/value|value") - private String statusValue; - - /** - * Path: Bericht/context/Tree/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: Bericht/context/Fallidentifikation - * Description: Zur Erfassung von Details zur Identifikation eines Falls im Gesundheitswesen. - */ - @Path("/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.case_identification.v0]") - private FallidentifikationCluster fallidentifikation; - - /** - * Path: Bericht/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Bericht/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Bericht/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Bericht/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Bericht/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Bericht/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Bericht/Körpertemperatur - * Description: Eine Messung der Körpertemperatur an einer bestimmten Stelle als Surrogat für den gesamten Körper der Person. - */ - @Path("/content[openEHR-EHR-OBSERVATION.body_temperature.v2]") - private List<KoerpertemperaturObservation> koerpertemperatur; - - /** - * Path: Bericht/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Bericht/language - */ - @Path("/language") - private Language language; - - /** - * Path: Bericht/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Bericht/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setBerichtNameValue(String berichtNameValue) { - this.berichtNameValue = berichtNameValue; - } - - public String getBerichtNameValue() { - return this.berichtNameValue ; - } - - public void setBerichtNameNullFlavourDefiningCode( - NullFlavour berichtNameNullFlavourDefiningCode) { - this.berichtNameNullFlavourDefiningCode = berichtNameNullFlavourDefiningCode; - } - - public NullFlavour getBerichtNameNullFlavourDefiningCode() { - return this.berichtNameNullFlavourDefiningCode ; - } - - public void setStatusValue(String statusValue) { - this.statusValue = statusValue; - } - - public String getStatusValue() { - return this.statusValue ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setFallidentifikation(FallidentifikationCluster fallidentifikation) { - this.fallidentifikation = fallidentifikation; - } - - public FallidentifikationCluster getFallidentifikation() { - return this.fallidentifikation ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } - - public void setKoerpertemperatur(List<KoerpertemperaturObservation> koerpertemperatur) { - this.koerpertemperatur = koerpertemperatur; - } - - public List<KoerpertemperaturObservation> getKoerpertemperatur() { - return this.koerpertemperatur ; - } - - public void setComposer(PartyProxy composer) { - this.composer = composer; - } - - public PartyProxy getComposer() { - return this.composer ; - } - - public void setLanguage(Language language) { - this.language = language; - } - - public Language getLanguage() { - return this.language ; - } +public class IntensivmedizinischesMonitoringKorpertemperaturComposition implements CompositionEntity { + /** + * Path: Bericht/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Bericht/context/Bericht Name + * Description: Identifizierungsmerkmal des Berichts. + */ + @Path("/context/other_context[at0001]/items[at0002 and name/value='Bericht Name']/value|value") + private String berichtNameValue; + + /** + * Path: Bericht/context/Tree/Bericht Name/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0002 and name/value='Bericht Name']/null_flavour|defining_code") + private NullFlavour berichtNameNullFlavourDefiningCode; + + /** + * Path: Bericht/context/Status + * Description: Der Status des gesamten Berichts. Hinweis: Dies ist nicht der Status einer Berichtskomponente. + */ + @Path("/context/other_context[at0001]/items[at0005]/value|value") + private String statusValue; + + /** + * Path: Bericht/context/Tree/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: Bericht/context/Fallidentifikation + * Description: Zur Erfassung von Details zur Identifikation eines Falls im Gesundheitswesen. + */ + @Path("/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.case_identification.v0]") + private FallidentifikationCluster fallidentifikation; + + /** + * Path: Bericht/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Bericht/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Bericht/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Bericht/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Bericht/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Bericht/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Bericht/Körpertemperatur + * Description: Eine Messung der Körpertemperatur an einer bestimmten Stelle als Surrogat für den gesamten Körper der Person. + */ + @Path("/content[openEHR-EHR-OBSERVATION.body_temperature.v2]") + private List<KoerpertemperaturObservation> koerpertemperatur; + + /** + * Path: Bericht/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Bericht/language + */ + @Path("/language") + private Language language; + + /** + * Path: Bericht/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Bericht/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public String getBerichtNameValue() { + return this.berichtNameValue; + } + + public void setBerichtNameValue(String berichtNameValue) { + this.berichtNameValue = berichtNameValue; + } + + public NullFlavour getBerichtNameNullFlavourDefiningCode() { + return this.berichtNameNullFlavourDefiningCode; + } + + public void setBerichtNameNullFlavourDefiningCode( + NullFlavour berichtNameNullFlavourDefiningCode) { + this.berichtNameNullFlavourDefiningCode = berichtNameNullFlavourDefiningCode; + } + + public String getStatusValue() { + return this.statusValue; + } + + public void setStatusValue(String statusValue) { + this.statusValue = statusValue; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public FallidentifikationCluster getFallidentifikation() { + return this.fallidentifikation; + } + + public void setFallidentifikation(FallidentifikationCluster fallidentifikation) { + this.fallidentifikation = fallidentifikation; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } + public List<KoerpertemperaturObservation> getKoerpertemperatur() { + return this.koerpertemperatur; + } + + public void setKoerpertemperatur(List<KoerpertemperaturObservation> koerpertemperatur) { + this.koerpertemperatur = koerpertemperatur; + } + + public PartyProxy getComposer() { + return this.composer; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } + + public Language getLanguage() { + return this.language; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit; + } - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } - public void setTerritory(Territory territory) { - this.territory = territory; - } + public Territory getTerritory() { + return this.territory; + } - public Territory getTerritory() { - return this.territory ; - } + public void setTerritory(Territory territory) { + this.territory = territory; + } - public VersionUid getVersionUid() { - return this.versionUid ; - } + public VersionUid getVersionUid() { + return this.versionUid; + } - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/kennzeichnungerregernachweissarscov2composition/KennzeichnungErregernachweisSARSCoV2Composition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/kennzeichnungerregernachweissarscov2composition/KennzeichnungErregernachweisSARSCoV2Composition.java index 35f8e2d0a..c42c8c47c 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/kennzeichnungerregernachweissarscov2composition/KennzeichnungErregernachweisSARSCoV2Composition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/kennzeichnungerregernachweissarscov2composition/KennzeichnungErregernachweisSARSCoV2Composition.java @@ -4,10 +4,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -20,242 +16,245 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.kennzeichnungerregernachweissarscov2composition.definition.FallidentifikationCluster; import org.ehrbase.fhirbridge.ehr.opt.kennzeichnungerregernachweissarscov2composition.definition.KennzeichnungErregernachweisEvaluation; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.report.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:54:20.601029+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-09T11:54:20.601029+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("Kennzeichnung Erregernachweis SARS-CoV-2") -public class KennzeichnungErregernachweisSARSCoV2Composition implements CompositionEntity, Composition { - /** - * Path: Kennzeichnung Erregernachweis SARS-CoV-2/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Kennzeichnung Erregernachweis SARS-CoV-2/context/Bericht Name - * Description: Identifizierungsmerkmal des Berichts. - */ - @Path("/context/other_context[at0001]/items[at0002 and name/value='Bericht Name']/value|value") - private String berichtNameValue; - - /** - * Path: Kennzeichnung Erregernachweis SARS-CoV-2/context/Tree/Bericht Name/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0002 and name/value='Bericht Name']/null_flavour|defining_code") - private NullFlavour berichtNameNullFlavourDefiningCode; - - /** - * Path: Kennzeichnung Erregernachweis SARS-CoV-2/context/Fallidentifikation - * Description: Zur Erfassung von Details zur Identifikation eines Falls im Gesundheitswesen. - */ - @Path("/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.case_identification.v0]") - private FallidentifikationCluster fallidentifikation; - - /** - * Path: Kennzeichnung Erregernachweis SARS-CoV-2/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Kennzeichnung Erregernachweis SARS-CoV-2/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Kennzeichnung Erregernachweis SARS-CoV-2/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Kennzeichnung Erregernachweis SARS-CoV-2/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Kennzeichnung Erregernachweis SARS-CoV-2/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Kennzeichnung Erregernachweis SARS-CoV-2/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Kennzeichnung Erregernachweis SARS-CoV-2/Kennzeichnung Erregernachweis - * Description: Dokumentation eines Nachweis eines Erregers bei einem Patienten. - */ - @Path("/content[openEHR-EHR-EVALUATION.flag_pathogen.v0]") - private KennzeichnungErregernachweisEvaluation kennzeichnungErregernachweis; - - /** - * Path: Kennzeichnung Erregernachweis SARS-CoV-2/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Kennzeichnung Erregernachweis SARS-CoV-2/language - */ - @Path("/language") - private Language language; - - /** - * Path: Kennzeichnung Erregernachweis SARS-CoV-2/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Kennzeichnung Erregernachweis SARS-CoV-2/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setBerichtNameValue(String berichtNameValue) { - this.berichtNameValue = berichtNameValue; - } - - public String getBerichtNameValue() { - return this.berichtNameValue ; - } - - public void setBerichtNameNullFlavourDefiningCode( - NullFlavour berichtNameNullFlavourDefiningCode) { - this.berichtNameNullFlavourDefiningCode = berichtNameNullFlavourDefiningCode; - } - - public NullFlavour getBerichtNameNullFlavourDefiningCode() { - return this.berichtNameNullFlavourDefiningCode ; - } - - public void setFallidentifikation(FallidentifikationCluster fallidentifikation) { - this.fallidentifikation = fallidentifikation; - } - - public FallidentifikationCluster getFallidentifikation() { - return this.fallidentifikation ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } - - public void setKennzeichnungErregernachweis( - KennzeichnungErregernachweisEvaluation kennzeichnungErregernachweis) { - this.kennzeichnungErregernachweis = kennzeichnungErregernachweis; - } - - public KennzeichnungErregernachweisEvaluation getKennzeichnungErregernachweis() { - return this.kennzeichnungErregernachweis ; - } - - public void setComposer(PartyProxy composer) { - this.composer = composer; - } - - public PartyProxy getComposer() { - return this.composer ; - } - - public void setLanguage(Language language) { - this.language = language; - } - - public Language getLanguage() { - return this.language ; - } - - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } - - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } - - public void setTerritory(Territory territory) { - this.territory = territory; - } - - public Territory getTerritory() { - return this.territory ; - } - - public VersionUid getVersionUid() { - return this.versionUid ; - } - - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } +public class KennzeichnungErregernachweisSARSCoV2Composition implements CompositionEntity { + /** + * Path: Kennzeichnung Erregernachweis SARS-CoV-2/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Kennzeichnung Erregernachweis SARS-CoV-2/context/Bericht Name + * Description: Identifizierungsmerkmal des Berichts. + */ + @Path("/context/other_context[at0001]/items[at0002 and name/value='Bericht Name']/value|value") + private String berichtNameValue; + + /** + * Path: Kennzeichnung Erregernachweis SARS-CoV-2/context/Tree/Bericht Name/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0002 and name/value='Bericht Name']/null_flavour|defining_code") + private NullFlavour berichtNameNullFlavourDefiningCode; + + /** + * Path: Kennzeichnung Erregernachweis SARS-CoV-2/context/Fallidentifikation + * Description: Zur Erfassung von Details zur Identifikation eines Falls im Gesundheitswesen. + */ + @Path("/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.case_identification.v0]") + private FallidentifikationCluster fallidentifikation; + + /** + * Path: Kennzeichnung Erregernachweis SARS-CoV-2/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Kennzeichnung Erregernachweis SARS-CoV-2/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Kennzeichnung Erregernachweis SARS-CoV-2/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Kennzeichnung Erregernachweis SARS-CoV-2/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Kennzeichnung Erregernachweis SARS-CoV-2/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Kennzeichnung Erregernachweis SARS-CoV-2/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Kennzeichnung Erregernachweis SARS-CoV-2/Kennzeichnung Erregernachweis + * Description: Dokumentation eines Nachweis eines Erregers bei einem Patienten. + */ + @Path("/content[openEHR-EHR-EVALUATION.flag_pathogen.v0]") + private KennzeichnungErregernachweisEvaluation kennzeichnungErregernachweis; + + /** + * Path: Kennzeichnung Erregernachweis SARS-CoV-2/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Kennzeichnung Erregernachweis SARS-CoV-2/language + */ + @Path("/language") + private Language language; + + /** + * Path: Kennzeichnung Erregernachweis SARS-CoV-2/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Kennzeichnung Erregernachweis SARS-CoV-2/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public String getBerichtNameValue() { + return this.berichtNameValue; + } + + public void setBerichtNameValue(String berichtNameValue) { + this.berichtNameValue = berichtNameValue; + } + + public NullFlavour getBerichtNameNullFlavourDefiningCode() { + return this.berichtNameNullFlavourDefiningCode; + } + + public void setBerichtNameNullFlavourDefiningCode( + NullFlavour berichtNameNullFlavourDefiningCode) { + this.berichtNameNullFlavourDefiningCode = berichtNameNullFlavourDefiningCode; + } + + public FallidentifikationCluster getFallidentifikation() { + return this.fallidentifikation; + } + + public void setFallidentifikation(FallidentifikationCluster fallidentifikation) { + this.fallidentifikation = fallidentifikation; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public KennzeichnungErregernachweisEvaluation getKennzeichnungErregernachweis() { + return this.kennzeichnungErregernachweis; + } + + public void setKennzeichnungErregernachweis( + KennzeichnungErregernachweisEvaluation kennzeichnungErregernachweis) { + this.kennzeichnungErregernachweis = kennzeichnungErregernachweis; + } + + public PartyProxy getComposer() { + return this.composer; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } + + public Language getLanguage() { + return this.language; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public Territory getTerritory() { + return this.territory; + } + + public void setTerritory(Territory territory) { + this.territory = territory; + } + + public VersionUid getVersionUid() { + return this.versionUid; + } + + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/klinischefrailtyskalacomposition/KlinischeFrailtySkalaComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/klinischefrailtyskalacomposition/KlinischeFrailtySkalaComposition.java index 060371fad..4479b97e7 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/klinischefrailtyskalacomposition/KlinischeFrailtySkalaComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/klinischefrailtyskalacomposition/KlinischeFrailtySkalaComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,271 +17,274 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.klinischefrailtyskalacomposition.definition.KlinischeFrailtySkalaCfsObservation; import org.ehrbase.fhirbridge.ehr.opt.klinischefrailtyskalacomposition.definition.StatusDefiningCode; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T12:08:57.436654+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-09T12:08:57.436654+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("Klinische Frailty-Skala") -public class KlinischeFrailtySkalaComposition implements CompositionEntity, Composition { - /** - * Path: Klinische Frailty-Skala/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Klinische Frailty-Skala/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: Klinische Frailty-Skala/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: Klinische Frailty-Skala/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: Klinische Frailty-Skala/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]/value|value") - private String kategorieValue; - - /** - * Path: Klinische Frailty-Skala/context/Baum/Kategorie/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") - private NullFlavour kategorieNullFlavourDefiningCode; - - /** - * Path: Klinische Frailty-Skala/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Klinische Frailty-Skala/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Klinische Frailty-Skala/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Klinische Frailty-Skala/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Klinische Frailty-Skala/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Klinische Frailty-Skala/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Klinische Frailty-Skala/Klinische Frailty-Skala (CFS) - * Description: Eine Bewertungsskala, die zum Screening auf Fragilität und zur allgemeinen Schichtung von Fitness- und Fragilitätsgraden bei einem älteren Erwachsenen verwendet wird. - * Comment: Bekannt auch unter der Bezeichnung Rockwood Klinische Frailty Skala - */ - @Path("/content[openEHR-EHR-OBSERVATION.clinical_frailty_scale.v1]") - private KlinischeFrailtySkalaCfsObservation klinischeFrailtySkalaCfs; - - /** - * Path: Klinische Frailty-Skala/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Klinische Frailty-Skala/language - */ - @Path("/language") - private Language language; - - /** - * Path: Klinische Frailty-Skala/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Klinische Frailty-Skala/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorieValue(String kategorieValue) { - this.kategorieValue = kategorieValue; - } - - public String getKategorieValue() { - return this.kategorieValue ; - } - - public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { - this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; - } - - public NullFlavour getKategorieNullFlavourDefiningCode() { - return this.kategorieNullFlavourDefiningCode ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } +public class KlinischeFrailtySkalaComposition implements CompositionEntity { + /** + * Path: Klinische Frailty-Skala/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Klinische Frailty-Skala/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: Klinische Frailty-Skala/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: Klinische Frailty-Skala/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: Klinische Frailty-Skala/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]/value|value") + private String kategorieValue; + + /** + * Path: Klinische Frailty-Skala/context/Baum/Kategorie/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") + private NullFlavour kategorieNullFlavourDefiningCode; + + /** + * Path: Klinische Frailty-Skala/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Klinische Frailty-Skala/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Klinische Frailty-Skala/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Klinische Frailty-Skala/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Klinische Frailty-Skala/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Klinische Frailty-Skala/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Klinische Frailty-Skala/Klinische Frailty-Skala (CFS) + * Description: Eine Bewertungsskala, die zum Screening auf Fragilität und zur allgemeinen Schichtung von Fitness- und Fragilitätsgraden bei einem älteren Erwachsenen verwendet wird. + * Comment: Bekannt auch unter der Bezeichnung Rockwood Klinische Frailty Skala + */ + @Path("/content[openEHR-EHR-OBSERVATION.clinical_frailty_scale.v1]") + private KlinischeFrailtySkalaCfsObservation klinischeFrailtySkalaCfs; + + /** + * Path: Klinische Frailty-Skala/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Klinische Frailty-Skala/language + */ + @Path("/language") + private Language language; + + /** + * Path: Klinische Frailty-Skala/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Klinische Frailty-Skala/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public String getKategorieValue() { + return this.kategorieValue; + } + + public void setKategorieValue(String kategorieValue) { + this.kategorieValue = kategorieValue; + } + + public NullFlavour getKategorieNullFlavourDefiningCode() { + return this.kategorieNullFlavourDefiningCode; + } + + public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { + this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public KlinischeFrailtySkalaCfsObservation getKlinischeFrailtySkalaCfs() { + return this.klinischeFrailtySkalaCfs; + } - public void setKlinischeFrailtySkalaCfs( - KlinischeFrailtySkalaCfsObservation klinischeFrailtySkalaCfs) { - this.klinischeFrailtySkalaCfs = klinischeFrailtySkalaCfs; - } - - public KlinischeFrailtySkalaCfsObservation getKlinischeFrailtySkalaCfs() { - return this.klinischeFrailtySkalaCfs ; - } - - public void setComposer(PartyProxy composer) { - this.composer = composer; - } - - public PartyProxy getComposer() { - return this.composer ; - } - - public void setLanguage(Language language) { - this.language = language; - } - - public Language getLanguage() { - return this.language ; - } - - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } - - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } - - public void setTerritory(Territory territory) { - this.territory = territory; - } - - public Territory getTerritory() { - return this.territory ; - } - - public VersionUid getVersionUid() { - return this.versionUid ; - } - - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setKlinischeFrailtySkalaCfs( + KlinischeFrailtySkalaCfsObservation klinischeFrailtySkalaCfs) { + this.klinischeFrailtySkalaCfs = klinischeFrailtySkalaCfs; + } + + public PartyProxy getComposer() { + return this.composer; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } + + public Language getLanguage() { + return this.language; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public Territory getTerritory() { + return this.territory; + } + + public void setTerritory(Territory territory) { + this.territory = territory; + } + + public VersionUid getVersionUid() { + return this.versionUid; + } + + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/koerpergewichtcomposition/KoerpergewichtComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/koerpergewichtcomposition/KoerpergewichtComposition.java index d954636ee..e72ea74bf 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/koerpergewichtcomposition/KoerpergewichtComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/koerpergewichtcomposition/KoerpergewichtComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,269 +17,272 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.koerpergewichtcomposition.definition.KoerpergewichtObservation; import org.ehrbase.fhirbridge.ehr.opt.koerpergewichtcomposition.definition.StatusDefiningCode; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:55:31.928349+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-09T11:55:31.928349+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("Körpergewicht") -public class KoerpergewichtComposition implements CompositionEntity, Composition { - /** - * Path: Körpergewicht/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Körpergewicht/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: Körpergewicht/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: Körpergewicht/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: Körpergewicht/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]/value|value") - private String kategorieValue; - - /** - * Path: Körpergewicht/context/Baum/Kategorie/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") - private NullFlavour kategorieNullFlavourDefiningCode; - - /** - * Path: Körpergewicht/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Körpergewicht/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Körpergewicht/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Körpergewicht/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Körpergewicht/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Körpergewicht/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Körpergewicht/Körpergewicht - * Description: Messung des Körpergewichts eines Individuums. - */ - @Path("/content[openEHR-EHR-OBSERVATION.body_weight.v2]") - private KoerpergewichtObservation koerpergewicht; - - /** - * Path: Körpergewicht/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Körpergewicht/language - */ - @Path("/language") - private Language language; - - /** - * Path: Körpergewicht/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Körpergewicht/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorieValue(String kategorieValue) { - this.kategorieValue = kategorieValue; - } - - public String getKategorieValue() { - return this.kategorieValue ; - } - - public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { - this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; - } - - public NullFlavour getKategorieNullFlavourDefiningCode() { - return this.kategorieNullFlavourDefiningCode ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } +public class KoerpergewichtComposition implements CompositionEntity { + /** + * Path: Körpergewicht/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Körpergewicht/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: Körpergewicht/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: Körpergewicht/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: Körpergewicht/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]/value|value") + private String kategorieValue; + + /** + * Path: Körpergewicht/context/Baum/Kategorie/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") + private NullFlavour kategorieNullFlavourDefiningCode; + + /** + * Path: Körpergewicht/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Körpergewicht/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Körpergewicht/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Körpergewicht/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Körpergewicht/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Körpergewicht/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Körpergewicht/Körpergewicht + * Description: Messung des Körpergewichts eines Individuums. + */ + @Path("/content[openEHR-EHR-OBSERVATION.body_weight.v2]") + private KoerpergewichtObservation koerpergewicht; + + /** + * Path: Körpergewicht/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Körpergewicht/language + */ + @Path("/language") + private Language language; + + /** + * Path: Körpergewicht/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Körpergewicht/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public String getKategorieValue() { + return this.kategorieValue; + } + + public void setKategorieValue(String kategorieValue) { + this.kategorieValue = kategorieValue; + } + + public NullFlavour getKategorieNullFlavourDefiningCode() { + return this.kategorieNullFlavourDefiningCode; + } + + public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { + this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } - public void setKoerpergewicht(KoerpergewichtObservation koerpergewicht) { - this.koerpergewicht = koerpergewicht; - } + public KoerpergewichtObservation getKoerpergewicht() { + return this.koerpergewicht; + } - public KoerpergewichtObservation getKoerpergewicht() { - return this.koerpergewicht ; - } + public void setKoerpergewicht(KoerpergewichtObservation koerpergewicht) { + this.koerpergewicht = koerpergewicht; + } - public void setComposer(PartyProxy composer) { - this.composer = composer; - } + public PartyProxy getComposer() { + return this.composer; + } - public PartyProxy getComposer() { - return this.composer ; - } + public void setComposer(PartyProxy composer) { + this.composer = composer; + } - public void setLanguage(Language language) { - this.language = language; - } + public Language getLanguage() { + return this.language; + } - public Language getLanguage() { - return this.language ; - } + public void setLanguage(Language language) { + this.language = language; + } - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } + public FeederAudit getFeederAudit() { + return this.feederAudit; + } - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } - public void setTerritory(Territory territory) { - this.territory = territory; - } + public Territory getTerritory() { + return this.territory; + } - public Territory getTerritory() { - return this.territory ; - } + public void setTerritory(Territory territory) { + this.territory = territory; + } - public VersionUid getVersionUid() { - return this.versionUid ; - } + public VersionUid getVersionUid() { + return this.versionUid; + } - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/koerpergroessecomposition/KoerpergroesseComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/koerpergroessecomposition/KoerpergroesseComposition.java index 2d006d9f8..17f99b89b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/koerpergroessecomposition/KoerpergroesseComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/koerpergroessecomposition/KoerpergroesseComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,270 +17,273 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.koerpergroessecomposition.definition.GroesseLaengeObservation; import org.ehrbase.fhirbridge.ehr.opt.koerpergroessecomposition.definition.StatusDefiningCode; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:54:47.011696+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-09T11:54:47.011696+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("Körpergröße") -public class KoerpergroesseComposition implements CompositionEntity, Composition { - /** - * Path: Körpergröße/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Körpergröße/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: Körpergröße/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: Körpergröße/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: Körpergröße/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]/value|value") - private String kategorieValue; - - /** - * Path: Körpergröße/context/Baum/Kategorie/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") - private NullFlavour kategorieNullFlavourDefiningCode; - - /** - * Path: Körpergröße/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Körpergröße/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Körpergröße/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Körpergröße/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Körpergröße/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Körpergröße/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Körpergröße/Größe/Länge - * Description: Größe bzw. Körperlänge wird vom Scheitel bis zur Fußsohle gemessen. - * Comment: Die Größe wird bei der Person in stehender Position und die Körperlänge in liegender Position gemessen. - */ - @Path("/content[openEHR-EHR-OBSERVATION.height.v2]") - private GroesseLaengeObservation groesseLaenge; - - /** - * Path: Körpergröße/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Körpergröße/language - */ - @Path("/language") - private Language language; - - /** - * Path: Körpergröße/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Körpergröße/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorieValue(String kategorieValue) { - this.kategorieValue = kategorieValue; - } - - public String getKategorieValue() { - return this.kategorieValue ; - } - - public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { - this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; - } - - public NullFlavour getKategorieNullFlavourDefiningCode() { - return this.kategorieNullFlavourDefiningCode ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } +public class KoerpergroesseComposition implements CompositionEntity { + /** + * Path: Körpergröße/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Körpergröße/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: Körpergröße/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: Körpergröße/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: Körpergröße/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]/value|value") + private String kategorieValue; + + /** + * Path: Körpergröße/context/Baum/Kategorie/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") + private NullFlavour kategorieNullFlavourDefiningCode; + + /** + * Path: Körpergröße/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Körpergröße/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Körpergröße/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Körpergröße/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Körpergröße/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Körpergröße/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Körpergröße/Größe/Länge + * Description: Größe bzw. Körperlänge wird vom Scheitel bis zur Fußsohle gemessen. + * Comment: Die Größe wird bei der Person in stehender Position und die Körperlänge in liegender Position gemessen. + */ + @Path("/content[openEHR-EHR-OBSERVATION.height.v2]") + private GroesseLaengeObservation groesseLaenge; + + /** + * Path: Körpergröße/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Körpergröße/language + */ + @Path("/language") + private Language language; + + /** + * Path: Körpergröße/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Körpergröße/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public String getKategorieValue() { + return this.kategorieValue; + } + + public void setKategorieValue(String kategorieValue) { + this.kategorieValue = kategorieValue; + } + + public NullFlavour getKategorieNullFlavourDefiningCode() { + return this.kategorieNullFlavourDefiningCode; + } + + public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { + this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } - public void setGroesseLaenge(GroesseLaengeObservation groesseLaenge) { - this.groesseLaenge = groesseLaenge; - } + public GroesseLaengeObservation getGroesseLaenge() { + return this.groesseLaenge; + } - public GroesseLaengeObservation getGroesseLaenge() { - return this.groesseLaenge ; - } + public void setGroesseLaenge(GroesseLaengeObservation groesseLaenge) { + this.groesseLaenge = groesseLaenge; + } - public void setComposer(PartyProxy composer) { - this.composer = composer; - } + public PartyProxy getComposer() { + return this.composer; + } - public PartyProxy getComposer() { - return this.composer ; - } + public void setComposer(PartyProxy composer) { + this.composer = composer; + } - public void setLanguage(Language language) { - this.language = language; - } + public Language getLanguage() { + return this.language; + } - public Language getLanguage() { - return this.language ; - } + public void setLanguage(Language language) { + this.language = language; + } - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } + public FeederAudit getFeederAudit() { + return this.feederAudit; + } - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } - public void setTerritory(Territory territory) { - this.territory = territory; - } + public Territory getTerritory() { + return this.territory; + } - public Territory getTerritory() { - return this.territory ; - } + public void setTerritory(Territory territory) { + this.territory = territory; + } - public VersionUid getVersionUid() { - return this.versionUid ; - } + public VersionUid getVersionUid() { + return this.versionUid; + } - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientauficucomposition/PatientAufICUComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientauficucomposition/PatientAufICUComposition.java index 4da0343a4..fe48d4619 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientauficucomposition/PatientAufICUComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientauficucomposition/PatientAufICUComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,241 +17,244 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.patientauficucomposition.definition.PatientAufDerIntensivstationObservation; import org.ehrbase.fhirbridge.ehr.opt.patientauficucomposition.definition.StatusDefiningCode; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:55:47.571474+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-09T11:55:47.571474+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("Patient auf ICU") -public class PatientAufICUComposition implements CompositionEntity, Composition { - /** - * Path: Patient auf der Intensivstation/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Patient auf der Intensivstation/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: Patient auf der Intensivstation/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: Patient auf der Intensivstation/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: Patient auf der Intensivstation/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Patient auf der Intensivstation/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Patient auf der Intensivstation/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Patient auf der Intensivstation/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Patient auf der Intensivstation/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Patient auf der Intensivstation/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Patient auf der Intensivstation/Patient auf der Intensivstation - * Description: Ein Personen- oder Selbstbeurteilungs-Screening-Fragebogen zu erfolgten Behandlung oder Verwaltungsmaßnahmen. - */ - @Path("/content[openEHR-EHR-OBSERVATION.management_screening.v0 and name/value='Patient auf der Intensivstation']") - private PatientAufDerIntensivstationObservation patientAufDerIntensivstation; - - /** - * Path: Patient auf der Intensivstation/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Patient auf der Intensivstation/language - */ - @Path("/language") - private Language language; - - /** - * Path: Patient auf der Intensivstation/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Patient auf der Intensivstation/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } - - public void setPatientAufDerIntensivstation( - PatientAufDerIntensivstationObservation patientAufDerIntensivstation) { - this.patientAufDerIntensivstation = patientAufDerIntensivstation; - } - - public PatientAufDerIntensivstationObservation getPatientAufDerIntensivstation() { - return this.patientAufDerIntensivstation ; - } - - public void setComposer(PartyProxy composer) { - this.composer = composer; - } - - public PartyProxy getComposer() { - return this.composer ; - } +public class PatientAufICUComposition implements CompositionEntity { + /** + * Path: Patient auf der Intensivstation/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Patient auf der Intensivstation/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: Patient auf der Intensivstation/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: Patient auf der Intensivstation/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: Patient auf der Intensivstation/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Patient auf der Intensivstation/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Patient auf der Intensivstation/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Patient auf der Intensivstation/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Patient auf der Intensivstation/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Patient auf der Intensivstation/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Patient auf der Intensivstation/Patient auf der Intensivstation + * Description: Ein Personen- oder Selbstbeurteilungs-Screening-Fragebogen zu erfolgten Behandlung oder Verwaltungsmaßnahmen. + */ + @Path("/content[openEHR-EHR-OBSERVATION.management_screening.v0 and name/value='Patient auf der Intensivstation']") + private PatientAufDerIntensivstationObservation patientAufDerIntensivstation; + + /** + * Path: Patient auf der Intensivstation/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Patient auf der Intensivstation/language + */ + @Path("/language") + private Language language; + + /** + * Path: Patient auf der Intensivstation/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Patient auf der Intensivstation/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public PatientAufDerIntensivstationObservation getPatientAufDerIntensivstation() { + return this.patientAufDerIntensivstation; + } + + public void setPatientAufDerIntensivstation( + PatientAufDerIntensivstationObservation patientAufDerIntensivstation) { + this.patientAufDerIntensivstation = patientAufDerIntensivstation; + } + + public PartyProxy getComposer() { + return this.composer; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } - public void setLanguage(Language language) { - this.language = language; - } - - public Language getLanguage() { - return this.language ; - } - - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } - - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } - - public void setTerritory(Territory territory) { - this.territory = territory; - } - - public Territory getTerritory() { - return this.territory ; - } - - public VersionUid getVersionUid() { - return this.versionUid ; - } - - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public Language getLanguage() { + return this.language; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public Territory getTerritory() { + return this.territory; + } + + public void setTerritory(Territory territory) { + this.territory = territory; + } + + public VersionUid getVersionUid() { + return this.versionUid; + } + + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/prozedurcomposition/ProzedurComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/prozedurcomposition/ProzedurComposition.java index 31a5e9730..5bfd6fbad 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/prozedurcomposition/ProzedurComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/prozedurcomposition/ProzedurComposition.java @@ -4,10 +4,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -20,240 +16,243 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.prozedurcomposition.definition.FallidentifikationCluster; import org.ehrbase.fhirbridge.ehr.opt.prozedurcomposition.definition.ProzedurAction; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.report.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:55:59.431635+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-09T11:55:59.431635+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("Prozedur") -public class ProzedurComposition implements CompositionEntity, Composition { - /** - * Path: Prozedur/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Prozedur/context/Bericht ID - * Description: Identifizierungsmerkmal des Berichts. - */ - @Path("/context/other_context[at0001]/items[at0002]/value|value") - private String berichtIdValue; - - /** - * Path: Prozedur/context/Tree/Bericht ID/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0002]/null_flavour|defining_code") - private NullFlavour berichtIdNullFlavourDefiningCode; - - /** - * Path: Prozedur/context/Fallidentifikation - * Description: Zur Erfassung von Details zur Identifikation eines Falls im Gesundheitswesen. - */ - @Path("/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.case_identification.v0]") - private FallidentifikationCluster fallidentifikation; - - /** - * Path: Prozedur/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Prozedur/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Prozedur/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Prozedur/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Prozedur/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Prozedur/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Prozedur/Prozedur - * Description: Eine klinische Aktivität, die zur Früherkennung, Untersuchung, Diagnose, Heilung, Therapie, Bewertung oder in Hinsicht auf palliative Maßnahmen durchgeführt wird. - */ - @Path("/content[openEHR-EHR-ACTION.procedure.v1]") - private ProzedurAction prozedur; - - /** - * Path: Prozedur/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Prozedur/language - */ - @Path("/language") - private Language language; - - /** - * Path: Prozedur/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Prozedur/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setBerichtIdValue(String berichtIdValue) { - this.berichtIdValue = berichtIdValue; - } - - public String getBerichtIdValue() { - return this.berichtIdValue ; - } - - public void setBerichtIdNullFlavourDefiningCode(NullFlavour berichtIdNullFlavourDefiningCode) { - this.berichtIdNullFlavourDefiningCode = berichtIdNullFlavourDefiningCode; - } - - public NullFlavour getBerichtIdNullFlavourDefiningCode() { - return this.berichtIdNullFlavourDefiningCode ; - } - - public void setFallidentifikation(FallidentifikationCluster fallidentifikation) { - this.fallidentifikation = fallidentifikation; - } - - public FallidentifikationCluster getFallidentifikation() { - return this.fallidentifikation ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } - - public void setProzedur(ProzedurAction prozedur) { - this.prozedur = prozedur; - } - - public ProzedurAction getProzedur() { - return this.prozedur ; - } - - public void setComposer(PartyProxy composer) { - this.composer = composer; - } - - public PartyProxy getComposer() { - return this.composer ; - } +public class ProzedurComposition implements CompositionEntity { + /** + * Path: Prozedur/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Prozedur/context/Bericht ID + * Description: Identifizierungsmerkmal des Berichts. + */ + @Path("/context/other_context[at0001]/items[at0002]/value|value") + private String berichtIdValue; + + /** + * Path: Prozedur/context/Tree/Bericht ID/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0002]/null_flavour|defining_code") + private NullFlavour berichtIdNullFlavourDefiningCode; + + /** + * Path: Prozedur/context/Fallidentifikation + * Description: Zur Erfassung von Details zur Identifikation eines Falls im Gesundheitswesen. + */ + @Path("/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.case_identification.v0]") + private FallidentifikationCluster fallidentifikation; + + /** + * Path: Prozedur/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Prozedur/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Prozedur/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Prozedur/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Prozedur/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Prozedur/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Prozedur/Prozedur + * Description: Eine klinische Aktivität, die zur Früherkennung, Untersuchung, Diagnose, Heilung, Therapie, Bewertung oder in Hinsicht auf palliative Maßnahmen durchgeführt wird. + */ + @Path("/content[openEHR-EHR-ACTION.procedure.v1]") + private ProzedurAction prozedur; + + /** + * Path: Prozedur/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Prozedur/language + */ + @Path("/language") + private Language language; + + /** + * Path: Prozedur/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Prozedur/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public String getBerichtIdValue() { + return this.berichtIdValue; + } + + public void setBerichtIdValue(String berichtIdValue) { + this.berichtIdValue = berichtIdValue; + } + + public NullFlavour getBerichtIdNullFlavourDefiningCode() { + return this.berichtIdNullFlavourDefiningCode; + } + + public void setBerichtIdNullFlavourDefiningCode(NullFlavour berichtIdNullFlavourDefiningCode) { + this.berichtIdNullFlavourDefiningCode = berichtIdNullFlavourDefiningCode; + } + + public FallidentifikationCluster getFallidentifikation() { + return this.fallidentifikation; + } + + public void setFallidentifikation(FallidentifikationCluster fallidentifikation) { + this.fallidentifikation = fallidentifikation; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public ProzedurAction getProzedur() { + return this.prozedur; + } + + public void setProzedur(ProzedurAction prozedur) { + this.prozedur = prozedur; + } + + public PartyProxy getComposer() { + return this.composer; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } - public void setLanguage(Language language) { - this.language = language; - } + public Language getLanguage() { + return this.language; + } - public Language getLanguage() { - return this.language ; - } + public void setLanguage(Language language) { + this.language = language; + } - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } + public FeederAudit getFeederAudit() { + return this.feederAudit; + } - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } - public void setTerritory(Territory territory) { - this.territory = territory; - } + public Territory getTerritory() { + return this.territory; + } - public Territory getTerritory() { - return this.territory ; - } + public void setTerritory(Territory territory) { + this.territory = territory; + } - public VersionUid getVersionUid() { - return this.versionUid ; - } + public VersionUid getVersionUid() { + return this.versionUid; + } - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/pulsoxymetriecomposition/PulsoxymetrieComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/pulsoxymetriecomposition/PulsoxymetrieComposition.java index b1b3a1181..71766817b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/pulsoxymetriecomposition/PulsoxymetrieComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/pulsoxymetriecomposition/PulsoxymetrieComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,269 +17,272 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.pulsoxymetriecomposition.definition.PulsoxymetrieObservation; import org.ehrbase.fhirbridge.ehr.opt.pulsoxymetriecomposition.definition.StatusDefiningCode; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:56:12.153073+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-09T11:56:12.153073+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("Pulsoxymetrie") -public class PulsoxymetrieComposition implements CompositionEntity, Composition { - /** - * Path: Pulsoxymetrie/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Pulsoxymetrie/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: Pulsoxymetrie/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: Pulsoxymetrie/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: Pulsoxymetrie/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]/value|value") - private String kategorieValue; - - /** - * Path: Pulsoxymetrie/context/Baum/Kategorie/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") - private NullFlavour kategorieNullFlavourDefiningCode; - - /** - * Path: Pulsoxymetrie/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Pulsoxymetrie/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Pulsoxymetrie/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Pulsoxymetrie/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Pulsoxymetrie/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Pulsoxymetrie/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Pulsoxymetrie/Pulsoxymetrie - * Description: Blutsauerstoff und verwandte Messungen, die mittels Pulsoxymetrie oder Puls-CO-Oximetrie gemessen wurden. - */ - @Path("/content[openEHR-EHR-OBSERVATION.pulse_oximetry.v1]") - private PulsoxymetrieObservation pulsoxymetrie; - - /** - * Path: Pulsoxymetrie/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Pulsoxymetrie/language - */ - @Path("/language") - private Language language; - - /** - * Path: Pulsoxymetrie/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Pulsoxymetrie/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorieValue(String kategorieValue) { - this.kategorieValue = kategorieValue; - } - - public String getKategorieValue() { - return this.kategorieValue ; - } - - public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { - this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; - } - - public NullFlavour getKategorieNullFlavourDefiningCode() { - return this.kategorieNullFlavourDefiningCode ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } +public class PulsoxymetrieComposition implements CompositionEntity { + /** + * Path: Pulsoxymetrie/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Pulsoxymetrie/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: Pulsoxymetrie/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: Pulsoxymetrie/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: Pulsoxymetrie/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]/value|value") + private String kategorieValue; + + /** + * Path: Pulsoxymetrie/context/Baum/Kategorie/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") + private NullFlavour kategorieNullFlavourDefiningCode; + + /** + * Path: Pulsoxymetrie/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Pulsoxymetrie/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Pulsoxymetrie/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Pulsoxymetrie/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Pulsoxymetrie/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Pulsoxymetrie/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Pulsoxymetrie/Pulsoxymetrie + * Description: Blutsauerstoff und verwandte Messungen, die mittels Pulsoxymetrie oder Puls-CO-Oximetrie gemessen wurden. + */ + @Path("/content[openEHR-EHR-OBSERVATION.pulse_oximetry.v1]") + private PulsoxymetrieObservation pulsoxymetrie; + + /** + * Path: Pulsoxymetrie/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Pulsoxymetrie/language + */ + @Path("/language") + private Language language; + + /** + * Path: Pulsoxymetrie/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Pulsoxymetrie/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public String getKategorieValue() { + return this.kategorieValue; + } + + public void setKategorieValue(String kategorieValue) { + this.kategorieValue = kategorieValue; + } + + public NullFlavour getKategorieNullFlavourDefiningCode() { + return this.kategorieNullFlavourDefiningCode; + } + + public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { + this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } - public void setPulsoxymetrie(PulsoxymetrieObservation pulsoxymetrie) { - this.pulsoxymetrie = pulsoxymetrie; - } + public PulsoxymetrieObservation getPulsoxymetrie() { + return this.pulsoxymetrie; + } - public PulsoxymetrieObservation getPulsoxymetrie() { - return this.pulsoxymetrie ; - } + public void setPulsoxymetrie(PulsoxymetrieObservation pulsoxymetrie) { + this.pulsoxymetrie = pulsoxymetrie; + } - public void setComposer(PartyProxy composer) { - this.composer = composer; - } + public PartyProxy getComposer() { + return this.composer; + } - public PartyProxy getComposer() { - return this.composer ; - } + public void setComposer(PartyProxy composer) { + this.composer = composer; + } - public void setLanguage(Language language) { - this.language = language; - } + public Language getLanguage() { + return this.language; + } - public Language getLanguage() { - return this.language ; - } + public void setLanguage(Language language) { + this.language = language; + } - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } + public FeederAudit getFeederAudit() { + return this.feederAudit; + } - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } - public void setTerritory(Territory territory) { - this.territory = territory; - } + public Territory getTerritory() { + return this.territory; + } - public Territory getTerritory() { - return this.territory ; - } + public void setTerritory(Territory territory) { + this.territory = territory; + } - public VersionUid getVersionUid() { - return this.versionUid ; - } + public VersionUid getVersionUid() { + return this.versionUid; + } - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/raucherstatuscomposition/RaucherstatusComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/raucherstatuscomposition/RaucherstatusComposition.java index adcc980fd..266fc9cb1 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/raucherstatuscomposition/RaucherstatusComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/raucherstatuscomposition/RaucherstatusComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,269 +17,272 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.raucherstatuscomposition.definition.RaucherstatusEvaluation; import org.ehrbase.fhirbridge.ehr.opt.raucherstatuscomposition.definition.StatusDefiningCode; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:56:26.686424+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-09T11:56:26.686424+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("Raucherstatus") -public class RaucherstatusComposition implements CompositionEntity, Composition { - /** - * Path: Raucherstatus/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Raucherstatus/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: Raucherstatus/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: Raucherstatus/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: Raucherstatus/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]/value|value") - private String kategorieValue; - - /** - * Path: Raucherstatus/context/Baum/Kategorie/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") - private NullFlavour kategorieNullFlavourDefiningCode; - - /** - * Path: Raucherstatus/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Raucherstatus/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Raucherstatus/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Raucherstatus/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Raucherstatus/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Raucherstatus/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Raucherstatus/Raucherstatus - * Description: Zusammenfassende oder persistente Informationen über die Tabakrauchgewohnheiten einer Person. - */ - @Path("/content[openEHR-EHR-EVALUATION.tobacco_smoking_summary.v1 and name/value='Raucherstatus']") - private RaucherstatusEvaluation raucherstatus; - - /** - * Path: Raucherstatus/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Raucherstatus/language - */ - @Path("/language") - private Language language; - - /** - * Path: Raucherstatus/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Raucherstatus/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorieValue(String kategorieValue) { - this.kategorieValue = kategorieValue; - } - - public String getKategorieValue() { - return this.kategorieValue ; - } - - public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { - this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; - } - - public NullFlavour getKategorieNullFlavourDefiningCode() { - return this.kategorieNullFlavourDefiningCode ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } +public class RaucherstatusComposition implements CompositionEntity { + /** + * Path: Raucherstatus/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Raucherstatus/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: Raucherstatus/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: Raucherstatus/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: Raucherstatus/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]/value|value") + private String kategorieValue; + + /** + * Path: Raucherstatus/context/Baum/Kategorie/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") + private NullFlavour kategorieNullFlavourDefiningCode; + + /** + * Path: Raucherstatus/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Raucherstatus/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Raucherstatus/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Raucherstatus/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Raucherstatus/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Raucherstatus/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Raucherstatus/Raucherstatus + * Description: Zusammenfassende oder persistente Informationen über die Tabakrauchgewohnheiten einer Person. + */ + @Path("/content[openEHR-EHR-EVALUATION.tobacco_smoking_summary.v1 and name/value='Raucherstatus']") + private RaucherstatusEvaluation raucherstatus; + + /** + * Path: Raucherstatus/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Raucherstatus/language + */ + @Path("/language") + private Language language; + + /** + * Path: Raucherstatus/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Raucherstatus/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public String getKategorieValue() { + return this.kategorieValue; + } + + public void setKategorieValue(String kategorieValue) { + this.kategorieValue = kategorieValue; + } + + public NullFlavour getKategorieNullFlavourDefiningCode() { + return this.kategorieNullFlavourDefiningCode; + } + + public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { + this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } - public void setRaucherstatus(RaucherstatusEvaluation raucherstatus) { - this.raucherstatus = raucherstatus; - } + public RaucherstatusEvaluation getRaucherstatus() { + return this.raucherstatus; + } - public RaucherstatusEvaluation getRaucherstatus() { - return this.raucherstatus ; - } + public void setRaucherstatus(RaucherstatusEvaluation raucherstatus) { + this.raucherstatus = raucherstatus; + } - public void setComposer(PartyProxy composer) { - this.composer = composer; - } + public PartyProxy getComposer() { + return this.composer; + } - public PartyProxy getComposer() { - return this.composer ; - } + public void setComposer(PartyProxy composer) { + this.composer = composer; + } - public void setLanguage(Language language) { - this.language = language; - } + public Language getLanguage() { + return this.language; + } - public Language getLanguage() { - return this.language ; - } + public void setLanguage(Language language) { + this.language = language; + } - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } + public FeederAudit getFeederAudit() { + return this.feederAudit; + } - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } - public void setTerritory(Territory territory) { - this.territory = territory; - } + public Territory getTerritory() { + return this.territory; + } - public Territory getTerritory() { - return this.territory ; - } + public void setTerritory(Territory territory) { + this.territory = territory; + } - public VersionUid getVersionUid() { - return this.versionUid ; - } + public VersionUid getVersionUid() { + return this.versionUid; + } - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/reisehistoriecomposition/ReisehistorieComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/reisehistoriecomposition/ReisehistorieComposition.java index 1b6784831..6fb7c6193 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/reisehistoriecomposition/ReisehistorieComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/reisehistoriecomposition/ReisehistorieComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,289 +17,292 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.reisehistoriecomposition.definition.KeineReisehistorieEvaluation; import org.ehrbase.fhirbridge.ehr.opt.reisehistoriecomposition.definition.ReisehistorieAdminEntry; import org.ehrbase.fhirbridge.ehr.opt.reisehistoriecomposition.definition.ReisehistorieKategorieElement; import org.ehrbase.fhirbridge.ehr.opt.reisehistoriecomposition.definition.StatusDefiningCode; import org.ehrbase.fhirbridge.ehr.opt.reisehistoriecomposition.definition.UnbekannteReisehistorieEvaluation; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:56:41.486888+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-09T11:56:41.486888+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("Reisehistorie") -public class ReisehistorieComposition implements CompositionEntity, Composition { - /** - * Path: Reisehistorie/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Reisehistorie/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: Reisehistorie/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: Reisehistorie/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: Reisehistorie/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]") - private List<ReisehistorieKategorieElement> kategorie; - - /** - * Path: Reisehistorie/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Reisehistorie/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Reisehistorie/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Reisehistorie/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Reisehistorie/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Reisehistorie/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Reisehistorie/Reisehistorie - * Description: *Details about a specific trip or travel event. (en) - */ - @Path("/content[openEHR-EHR-ADMIN_ENTRY.travel_event.v0 and name/value='Reisehistorie']") - private ReisehistorieAdminEntry reisehistorie; - - /** - * Path: Reisehistorie/Keine Reisehistorie - * Description: Ein Bericht über den Ausschluss eines/r Problems/Diagnose, familiäre Krankengeschichte, Medikation, Nebenwirkung/Allergens oder eines anderen klinischen Ereignisses, welche/s zur Zeit nicht oder noch nie vorhanden war. - */ - @Path("/content[openEHR-EHR-EVALUATION.exclusion_specific.v1 and name/value='Keine Reisehistorie']") - private KeineReisehistorieEvaluation keineReisehistorie; - - /** - * Path: Reisehistorie/Unbekannte Reisehistorie - * Description: Aussage darüber, dass bestimmte Gesundheitsinformationen zum Zeitpukt der Erfassung nicht in der Krankenakte oder einem Schriftstück erfasst werden können, da keine Kenntnisse darüber vorhanden sind. - */ - @Path("/content[openEHR-EHR-EVALUATION.absence.v2 and name/value='Unbekannte Reisehistorie']") - private UnbekannteReisehistorieEvaluation unbekannteReisehistorie; - - /** - * Path: Reisehistorie/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Reisehistorie/language - */ - @Path("/language") - private Language language; - - /** - * Path: Reisehistorie/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Reisehistorie/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorie(List<ReisehistorieKategorieElement> kategorie) { - this.kategorie = kategorie; - } - - public List<ReisehistorieKategorieElement> getKategorie() { - return this.kategorie ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } - - public void setReisehistorie(ReisehistorieAdminEntry reisehistorie) { - this.reisehistorie = reisehistorie; - } - - public ReisehistorieAdminEntry getReisehistorie() { - return this.reisehistorie ; - } +public class ReisehistorieComposition implements CompositionEntity { + /** + * Path: Reisehistorie/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Reisehistorie/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: Reisehistorie/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: Reisehistorie/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: Reisehistorie/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]") + private List<ReisehistorieKategorieElement> kategorie; + + /** + * Path: Reisehistorie/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Reisehistorie/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Reisehistorie/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Reisehistorie/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Reisehistorie/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Reisehistorie/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Reisehistorie/Reisehistorie + * Description: *Details about a specific trip or travel event. (en) + */ + @Path("/content[openEHR-EHR-ADMIN_ENTRY.travel_event.v0 and name/value='Reisehistorie']") + private ReisehistorieAdminEntry reisehistorie; + + /** + * Path: Reisehistorie/Keine Reisehistorie + * Description: Ein Bericht über den Ausschluss eines/r Problems/Diagnose, familiäre Krankengeschichte, Medikation, Nebenwirkung/Allergens oder eines anderen klinischen Ereignisses, welche/s zur Zeit nicht oder noch nie vorhanden war. + */ + @Path("/content[openEHR-EHR-EVALUATION.exclusion_specific.v1 and name/value='Keine Reisehistorie']") + private KeineReisehistorieEvaluation keineReisehistorie; + + /** + * Path: Reisehistorie/Unbekannte Reisehistorie + * Description: Aussage darüber, dass bestimmte Gesundheitsinformationen zum Zeitpukt der Erfassung nicht in der Krankenakte oder einem Schriftstück erfasst werden können, da keine Kenntnisse darüber vorhanden sind. + */ + @Path("/content[openEHR-EHR-EVALUATION.absence.v2 and name/value='Unbekannte Reisehistorie']") + private UnbekannteReisehistorieEvaluation unbekannteReisehistorie; + + /** + * Path: Reisehistorie/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Reisehistorie/language + */ + @Path("/language") + private Language language; + + /** + * Path: Reisehistorie/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Reisehistorie/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public List<ReisehistorieKategorieElement> getKategorie() { + return this.kategorie; + } + + public void setKategorie(List<ReisehistorieKategorieElement> kategorie) { + this.kategorie = kategorie; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public ReisehistorieAdminEntry getReisehistorie() { + return this.reisehistorie; + } + + public void setReisehistorie(ReisehistorieAdminEntry reisehistorie) { + this.reisehistorie = reisehistorie; + } + + public KeineReisehistorieEvaluation getKeineReisehistorie() { + return this.keineReisehistorie; + } - public void setKeineReisehistorie(KeineReisehistorieEvaluation keineReisehistorie) { - this.keineReisehistorie = keineReisehistorie; - } + public void setKeineReisehistorie(KeineReisehistorieEvaluation keineReisehistorie) { + this.keineReisehistorie = keineReisehistorie; + } - public KeineReisehistorieEvaluation getKeineReisehistorie() { - return this.keineReisehistorie ; - } + public UnbekannteReisehistorieEvaluation getUnbekannteReisehistorie() { + return this.unbekannteReisehistorie; + } - public void setUnbekannteReisehistorie( - UnbekannteReisehistorieEvaluation unbekannteReisehistorie) { - this.unbekannteReisehistorie = unbekannteReisehistorie; - } - - public UnbekannteReisehistorieEvaluation getUnbekannteReisehistorie() { - return this.unbekannteReisehistorie ; - } - - public void setComposer(PartyProxy composer) { - this.composer = composer; - } - - public PartyProxy getComposer() { - return this.composer ; - } - - public void setLanguage(Language language) { - this.language = language; - } - - public Language getLanguage() { - return this.language ; - } - - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } - - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } - - public void setTerritory(Territory territory) { - this.territory = territory; - } - - public Territory getTerritory() { - return this.territory ; - } - - public VersionUid getVersionUid() { - return this.versionUid ; - } - - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setUnbekannteReisehistorie( + UnbekannteReisehistorieEvaluation unbekannteReisehistorie) { + this.unbekannteReisehistorie = unbekannteReisehistorie; + } + + public PartyProxy getComposer() { + return this.composer; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } + + public Language getLanguage() { + return this.language; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public Territory getTerritory() { + return this.territory; + } + + public void setTerritory(Territory territory) { + this.territory = territory; + } + + public VersionUid getVersionUid() { + return this.versionUid; + } + + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/sarscov2expositioncomposition/SARSCoV2ExpositionComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/sarscov2expositioncomposition/SARSCoV2ExpositionComposition.java index 4eadbbbf3..039c8e9f9 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/sarscov2expositioncomposition/SARSCoV2ExpositionComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/sarscov2expositioncomposition/SARSCoV2ExpositionComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,269 +17,272 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.sarscov2expositioncomposition.definition.SarsCov2ExpositionEvaluation; import org.ehrbase.fhirbridge.ehr.opt.sarscov2expositioncomposition.definition.StatusDefiningCode; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-10T09:30:04.735859+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-10T09:30:04.735859+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("SARS-CoV-2 Exposition") -public class SARSCoV2ExpositionComposition implements CompositionEntity, Composition { - /** - * Path: SARS-CoV-2 Exposition/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: SARS-CoV-2 Exposition/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: SARS-CoV-2 Exposition/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: SARS-CoV-2 Exposition/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: SARS-CoV-2 Exposition/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]/value|value") - private String kategorieValue; - - /** - * Path: SARS-CoV-2 Exposition/context/Baum/Kategorie/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") - private NullFlavour kategorieNullFlavourDefiningCode; - - /** - * Path: SARS-CoV-2 Exposition/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: SARS-CoV-2 Exposition/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: SARS-CoV-2 Exposition/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: SARS-CoV-2 Exposition/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: SARS-CoV-2 Exposition/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: SARS-CoV-2 Exposition/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: SARS-CoV-2 Exposition/SARS-CoV-2 Exposition - * Description: Risikoeinschätzung für eine Person, die möglicherweise einem Infektionserreger ausgesetzt war. - */ - @Path("/content[openEHR-EHR-EVALUATION.infectious_exposure.v0 and name/value='SARS-CoV-2 Exposition']") - private SarsCov2ExpositionEvaluation sarsCov2Exposition; - - /** - * Path: SARS-CoV-2 Exposition/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: SARS-CoV-2 Exposition/language - */ - @Path("/language") - private Language language; - - /** - * Path: SARS-CoV-2 Exposition/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: SARS-CoV-2 Exposition/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorieValue(String kategorieValue) { - this.kategorieValue = kategorieValue; - } - - public String getKategorieValue() { - return this.kategorieValue ; - } - - public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { - this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; - } - - public NullFlavour getKategorieNullFlavourDefiningCode() { - return this.kategorieNullFlavourDefiningCode ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } +public class SARSCoV2ExpositionComposition implements CompositionEntity { + /** + * Path: SARS-CoV-2 Exposition/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: SARS-CoV-2 Exposition/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: SARS-CoV-2 Exposition/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: SARS-CoV-2 Exposition/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: SARS-CoV-2 Exposition/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]/value|value") + private String kategorieValue; + + /** + * Path: SARS-CoV-2 Exposition/context/Baum/Kategorie/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") + private NullFlavour kategorieNullFlavourDefiningCode; + + /** + * Path: SARS-CoV-2 Exposition/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: SARS-CoV-2 Exposition/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: SARS-CoV-2 Exposition/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: SARS-CoV-2 Exposition/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: SARS-CoV-2 Exposition/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: SARS-CoV-2 Exposition/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: SARS-CoV-2 Exposition/SARS-CoV-2 Exposition + * Description: Risikoeinschätzung für eine Person, die möglicherweise einem Infektionserreger ausgesetzt war. + */ + @Path("/content[openEHR-EHR-EVALUATION.infectious_exposure.v0 and name/value='SARS-CoV-2 Exposition']") + private SarsCov2ExpositionEvaluation sarsCov2Exposition; + + /** + * Path: SARS-CoV-2 Exposition/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: SARS-CoV-2 Exposition/language + */ + @Path("/language") + private Language language; + + /** + * Path: SARS-CoV-2 Exposition/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: SARS-CoV-2 Exposition/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public String getKategorieValue() { + return this.kategorieValue; + } + + public void setKategorieValue(String kategorieValue) { + this.kategorieValue = kategorieValue; + } + + public NullFlavour getKategorieNullFlavourDefiningCode() { + return this.kategorieNullFlavourDefiningCode; + } + + public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { + this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } - public void setSarsCov2Exposition(SarsCov2ExpositionEvaluation sarsCov2Exposition) { - this.sarsCov2Exposition = sarsCov2Exposition; - } + public SarsCov2ExpositionEvaluation getSarsCov2Exposition() { + return this.sarsCov2Exposition; + } - public SarsCov2ExpositionEvaluation getSarsCov2Exposition() { - return this.sarsCov2Exposition ; - } + public void setSarsCov2Exposition(SarsCov2ExpositionEvaluation sarsCov2Exposition) { + this.sarsCov2Exposition = sarsCov2Exposition; + } - public void setComposer(PartyProxy composer) { - this.composer = composer; - } + public PartyProxy getComposer() { + return this.composer; + } - public PartyProxy getComposer() { - return this.composer ; - } + public void setComposer(PartyProxy composer) { + this.composer = composer; + } - public void setLanguage(Language language) { - this.language = language; - } + public Language getLanguage() { + return this.language; + } - public Language getLanguage() { - return this.language ; - } + public void setLanguage(Language language) { + this.language = language; + } - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } + public FeederAudit getFeederAudit() { + return this.feederAudit; + } - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } - public void setTerritory(Territory territory) { - this.territory = territory; - } + public Territory getTerritory() { + return this.territory; + } - public Territory getTerritory() { - return this.territory ; - } + public void setTerritory(Territory territory) { + this.territory = territory; + } - public VersionUid getVersionUid() { - return this.versionUid ; - } + public VersionUid getVersionUid() { + return this.versionUid; + } - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/schwangerschaftsstatuscomposition/SchwangerschaftsstatusComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/schwangerschaftsstatuscomposition/SchwangerschaftsstatusComposition.java index 84ad213ec..1440912c4 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/schwangerschaftsstatuscomposition/SchwangerschaftsstatusComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/schwangerschaftsstatuscomposition/SchwangerschaftsstatusComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,269 +17,272 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.schwangerschaftsstatuscomposition.definition.SchwangerschaftsstatusObservation; import org.ehrbase.fhirbridge.ehr.opt.schwangerschaftsstatuscomposition.definition.StatusDefiningCode; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:56:57.254543+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-09T11:56:57.254543+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("Schwangerschaftsstatus") -public class SchwangerschaftsstatusComposition implements CompositionEntity, Composition { - /** - * Path: Schwangerschaftsstatus/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Schwangerschaftsstatus/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: Schwangerschaftsstatus/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: Schwangerschaftsstatus/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: Schwangerschaftsstatus/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]/value|value") - private String kategorieValue; - - /** - * Path: Schwangerschaftsstatus/context/Baum/Kategorie/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") - private NullFlavour kategorieNullFlavourDefiningCode; - - /** - * Path: Schwangerschaftsstatus/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Schwangerschaftsstatus/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Schwangerschaftsstatus/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Schwangerschaftsstatus/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Schwangerschaftsstatus/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Schwangerschaftsstatus/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Schwangerschaftsstatus/Schwangerschaftsstatus - * Description: Angabe darüber, ob die Person schwanger ist oder schwanger sein könnte oder nicht. - */ - @Path("/content[openEHR-EHR-OBSERVATION.pregnancy_status.v0]") - private SchwangerschaftsstatusObservation schwangerschaftsstatus; - - /** - * Path: Schwangerschaftsstatus/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Schwangerschaftsstatus/language - */ - @Path("/language") - private Language language; - - /** - * Path: Schwangerschaftsstatus/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Schwangerschaftsstatus/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorieValue(String kategorieValue) { - this.kategorieValue = kategorieValue; - } - - public String getKategorieValue() { - return this.kategorieValue ; - } - - public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { - this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; - } - - public NullFlavour getKategorieNullFlavourDefiningCode() { - return this.kategorieNullFlavourDefiningCode ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } +public class SchwangerschaftsstatusComposition implements CompositionEntity { + /** + * Path: Schwangerschaftsstatus/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Schwangerschaftsstatus/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: Schwangerschaftsstatus/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: Schwangerschaftsstatus/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: Schwangerschaftsstatus/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]/value|value") + private String kategorieValue; + + /** + * Path: Schwangerschaftsstatus/context/Baum/Kategorie/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") + private NullFlavour kategorieNullFlavourDefiningCode; + + /** + * Path: Schwangerschaftsstatus/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Schwangerschaftsstatus/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Schwangerschaftsstatus/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Schwangerschaftsstatus/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Schwangerschaftsstatus/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Schwangerschaftsstatus/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Schwangerschaftsstatus/Schwangerschaftsstatus + * Description: Angabe darüber, ob die Person schwanger ist oder schwanger sein könnte oder nicht. + */ + @Path("/content[openEHR-EHR-OBSERVATION.pregnancy_status.v0]") + private SchwangerschaftsstatusObservation schwangerschaftsstatus; + + /** + * Path: Schwangerschaftsstatus/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Schwangerschaftsstatus/language + */ + @Path("/language") + private Language language; + + /** + * Path: Schwangerschaftsstatus/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Schwangerschaftsstatus/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public String getKategorieValue() { + return this.kategorieValue; + } + + public void setKategorieValue(String kategorieValue) { + this.kategorieValue = kategorieValue; + } + + public NullFlavour getKategorieNullFlavourDefiningCode() { + return this.kategorieNullFlavourDefiningCode; + } + + public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { + this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } - public void setSchwangerschaftsstatus(SchwangerschaftsstatusObservation schwangerschaftsstatus) { - this.schwangerschaftsstatus = schwangerschaftsstatus; - } + public SchwangerschaftsstatusObservation getSchwangerschaftsstatus() { + return this.schwangerschaftsstatus; + } - public SchwangerschaftsstatusObservation getSchwangerschaftsstatus() { - return this.schwangerschaftsstatus ; - } + public void setSchwangerschaftsstatus(SchwangerschaftsstatusObservation schwangerschaftsstatus) { + this.schwangerschaftsstatus = schwangerschaftsstatus; + } - public void setComposer(PartyProxy composer) { - this.composer = composer; - } + public PartyProxy getComposer() { + return this.composer; + } - public PartyProxy getComposer() { - return this.composer ; - } + public void setComposer(PartyProxy composer) { + this.composer = composer; + } - public void setLanguage(Language language) { - this.language = language; - } + public Language getLanguage() { + return this.language; + } - public Language getLanguage() { - return this.language ; - } + public void setLanguage(Language language) { + this.language = language; + } - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } + public FeederAudit getFeederAudit() { + return this.feederAudit; + } - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } - public void setTerritory(Territory territory) { - this.territory = territory; - } + public Territory getTerritory() { + return this.territory; + } - public Territory getTerritory() { - return this.territory ; - } + public void setTerritory(Territory territory) { + this.territory = territory; + } - public VersionUid getVersionUid() { - return this.versionUid ; - } + public VersionUid getVersionUid() { + return this.versionUid; + } - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/sofacomposition/SOFAComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/sofacomposition/SOFAComposition.java index a8749a991..7e0578e96 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/sofacomposition/SOFAComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/sofacomposition/SOFAComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,256 +17,259 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.sofacomposition.definition.SofaScoreKategorieElement; import org.ehrbase.fhirbridge.ehr.opt.sofacomposition.definition.SofaScoreObservation; import org.ehrbase.fhirbridge.ehr.opt.sofacomposition.definition.StatusDefiningCode; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-04-01T12:01:13.757064+02:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-04-01T12:01:13.757064+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("SOFA") -public class SOFAComposition implements CompositionEntity, Composition { - /** - * Path: SOFA-Score/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: SOFA-Score/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: SOFA-Score/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: SOFA-Score/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: SOFA-Score/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]") - private List<SofaScoreKategorieElement> kategorie; - - /** - * Path: SOFA-Score/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: SOFA-Score/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: SOFA-Score/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: SOFA-Score/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: SOFA-Score/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: SOFA-Score/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: SOFA-Score/SOFA score - * Description: Ein Scoring-System zur Bewertung und Verfolgung der Entwicklung von Organdysfunktion in sechs lebenswichtigen Organsystemen. Zuvor bekannt als "Sepsis related Organ Failure Assessment". - */ - @Path("/content[openEHR-EHR-OBSERVATION.sofa_score.v0]") - private SofaScoreObservation sofaScore; - - /** - * Path: SOFA-Score/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: SOFA-Score/language - */ - @Path("/language") - private Language language; - - /** - * Path: SOFA-Score/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: SOFA-Score/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorie(List<SofaScoreKategorieElement> kategorie) { - this.kategorie = kategorie; - } - - public List<SofaScoreKategorieElement> getKategorie() { - return this.kategorie ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } - - public void setSofaScore(SofaScoreObservation sofaScore) { - this.sofaScore = sofaScore; - } - - public SofaScoreObservation getSofaScore() { - return this.sofaScore ; - } +public class SOFAComposition implements CompositionEntity { + /** + * Path: SOFA-Score/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: SOFA-Score/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: SOFA-Score/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: SOFA-Score/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: SOFA-Score/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]") + private List<SofaScoreKategorieElement> kategorie; + + /** + * Path: SOFA-Score/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: SOFA-Score/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: SOFA-Score/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: SOFA-Score/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: SOFA-Score/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: SOFA-Score/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: SOFA-Score/SOFA score + * Description: Ein Scoring-System zur Bewertung und Verfolgung der Entwicklung von Organdysfunktion in sechs lebenswichtigen Organsystemen. Zuvor bekannt als "Sepsis related Organ Failure Assessment". + */ + @Path("/content[openEHR-EHR-OBSERVATION.sofa_score.v0]") + private SofaScoreObservation sofaScore; + + /** + * Path: SOFA-Score/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: SOFA-Score/language + */ + @Path("/language") + private Language language; + + /** + * Path: SOFA-Score/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: SOFA-Score/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public List<SofaScoreKategorieElement> getKategorie() { + return this.kategorie; + } + + public void setKategorie(List<SofaScoreKategorieElement> kategorie) { + this.kategorie = kategorie; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public SofaScoreObservation getSofaScore() { + return this.sofaScore; + } + + public void setSofaScore(SofaScoreObservation sofaScore) { + this.sofaScore = sofaScore; + } - public void setComposer(PartyProxy composer) { - this.composer = composer; - } + public PartyProxy getComposer() { + return this.composer; + } - public PartyProxy getComposer() { - return this.composer ; - } + public void setComposer(PartyProxy composer) { + this.composer = composer; + } - public void setLanguage(Language language) { - this.language = language; - } + public Language getLanguage() { + return this.language; + } - public Language getLanguage() { - return this.language ; - } + public void setLanguage(Language language) { + this.language = language; + } - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } + public FeederAudit getFeederAudit() { + return this.feederAudit; + } - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } - public void setTerritory(Territory territory) { - this.territory = territory; - } + public Territory getTerritory() { + return this.territory; + } - public Territory getTerritory() { - return this.territory ; - } + public void setTerritory(Territory territory) { + this.territory = territory; + } - public VersionUid getVersionUid() { - return this.versionUid ; - } + public VersionUid getVersionUid() { + return this.versionUid; + } - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/symptomcomposition/SymptomComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/symptomcomposition/SymptomComposition.java index be521062d..3884f9356 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/symptomcomposition/SymptomComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/symptomcomposition/SymptomComposition.java @@ -6,10 +6,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -22,302 +18,305 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition.AusgeschlossenesSymptomEvaluation; import org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition.StatusDefiningCode; import org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition.UnbekanntesSymptomEvaluation; import org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition.VorliegendesSymptomObservation; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T14:41:23.600340+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-09T14:41:23.600340+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("Symptom") -public class SymptomComposition implements CompositionEntity, Composition { - /** - * Path: COVID-19 Symptom/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: COVID-19 Symptom/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: COVID-19 Symptom/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: COVID-19 Symptom/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: COVID-19 Symptom/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]/value") - private DvCodedText kategorie; - - /** - * Path: COVID-19 Symptom/context/Baum/Kategorie/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") - private NullFlavour kategorieNullFlavourDefiningCode; - - /** - * Path: COVID-19 Symptom/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: COVID-19 Symptom/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: COVID-19 Symptom/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: COVID-19 Symptom/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: COVID-19 Symptom/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: COVID-19 Symptom/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: COVID-19 Symptom/Vorliegendes Symptom - * Description: Festgestellte Beobachtung einer körperlichen oder geistigen Störung bei einer Person. - */ - @Path("/content[openEHR-EHR-OBSERVATION.symptom_sign.v0 and name/value='Vorliegendes Symptom']") - private VorliegendesSymptomObservation vorliegendesSymptom; - - /** - * Path: COVID-19 Symptom/Ausgeschlossenes Symptom - * Description: Ein Bericht über den Ausschluss eines/r Problems/Diagnose, familiäre Krankengeschichte, Medikation, Nebenwirkung/Allergens oder eines anderen klinischen Ereignisses, welche/s zur Zeit nicht oder noch nie vorhanden war. - */ - @Path("/content[openEHR-EHR-EVALUATION.exclusion_specific.v1 and name/value='Ausgeschlossenes Symptom']") - private AusgeschlossenesSymptomEvaluation ausgeschlossenesSymptom; - - /** - * Path: COVID-19 Symptom/Unbekanntes Symptom - * Description: Aussage darüber, dass bestimmte Gesundheitsinformationen zum Zeitpukt der Erfassung nicht in der Krankenakte oder einem Schriftstück erfasst werden können, da keine Kenntnisse darüber vorhanden sind. - */ - @Path("/content[openEHR-EHR-EVALUATION.absence.v2 and name/value='Unbekanntes Symptom']") - private UnbekanntesSymptomEvaluation unbekanntesSymptom; - - /** - * Path: COVID-19 Symptom/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: COVID-19 Symptom/language - */ - @Path("/language") - private Language language; - - /** - * Path: COVID-19 Symptom/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: COVID-19 Symptom/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorie(DvCodedText kategorie) { - this.kategorie = kategorie; - } - - public DvCodedText getKategorie() { - return this.kategorie ; - } - - public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { - this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; - } - - public NullFlavour getKategorieNullFlavourDefiningCode() { - return this.kategorieNullFlavourDefiningCode ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } +public class SymptomComposition implements CompositionEntity { + /** + * Path: COVID-19 Symptom/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: COVID-19 Symptom/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: COVID-19 Symptom/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: COVID-19 Symptom/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: COVID-19 Symptom/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]/value") + private DvCodedText kategorie; + + /** + * Path: COVID-19 Symptom/context/Baum/Kategorie/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") + private NullFlavour kategorieNullFlavourDefiningCode; + + /** + * Path: COVID-19 Symptom/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: COVID-19 Symptom/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: COVID-19 Symptom/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: COVID-19 Symptom/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: COVID-19 Symptom/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: COVID-19 Symptom/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: COVID-19 Symptom/Vorliegendes Symptom + * Description: Festgestellte Beobachtung einer körperlichen oder geistigen Störung bei einer Person. + */ + @Path("/content[openEHR-EHR-OBSERVATION.symptom_sign.v0 and name/value='Vorliegendes Symptom']") + private VorliegendesSymptomObservation vorliegendesSymptom; + + /** + * Path: COVID-19 Symptom/Ausgeschlossenes Symptom + * Description: Ein Bericht über den Ausschluss eines/r Problems/Diagnose, familiäre Krankengeschichte, Medikation, Nebenwirkung/Allergens oder eines anderen klinischen Ereignisses, welche/s zur Zeit nicht oder noch nie vorhanden war. + */ + @Path("/content[openEHR-EHR-EVALUATION.exclusion_specific.v1 and name/value='Ausgeschlossenes Symptom']") + private AusgeschlossenesSymptomEvaluation ausgeschlossenesSymptom; + + /** + * Path: COVID-19 Symptom/Unbekanntes Symptom + * Description: Aussage darüber, dass bestimmte Gesundheitsinformationen zum Zeitpukt der Erfassung nicht in der Krankenakte oder einem Schriftstück erfasst werden können, da keine Kenntnisse darüber vorhanden sind. + */ + @Path("/content[openEHR-EHR-EVALUATION.absence.v2 and name/value='Unbekanntes Symptom']") + private UnbekanntesSymptomEvaluation unbekanntesSymptom; + + /** + * Path: COVID-19 Symptom/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: COVID-19 Symptom/language + */ + @Path("/language") + private Language language; + + /** + * Path: COVID-19 Symptom/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: COVID-19 Symptom/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public DvCodedText getKategorie() { + return this.kategorie; + } + + public void setKategorie(DvCodedText kategorie) { + this.kategorie = kategorie; + } + + public NullFlavour getKategorieNullFlavourDefiningCode() { + return this.kategorieNullFlavourDefiningCode; + } + + public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { + this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = location; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public VorliegendesSymptomObservation getVorliegendesSymptom() { + return this.vorliegendesSymptom; + } - public void setVorliegendesSymptom(VorliegendesSymptomObservation vorliegendesSymptom) { - this.vorliegendesSymptom = vorliegendesSymptom; - } + public void setVorliegendesSymptom(VorliegendesSymptomObservation vorliegendesSymptom) { + this.vorliegendesSymptom = vorliegendesSymptom; + } - public VorliegendesSymptomObservation getVorliegendesSymptom() { - return this.vorliegendesSymptom ; - } + public AusgeschlossenesSymptomEvaluation getAusgeschlossenesSymptom() { + return this.ausgeschlossenesSymptom; + } - public void setAusgeschlossenesSymptom( - AusgeschlossenesSymptomEvaluation ausgeschlossenesSymptom) { - this.ausgeschlossenesSymptom = ausgeschlossenesSymptom; - } - - public AusgeschlossenesSymptomEvaluation getAusgeschlossenesSymptom() { - return this.ausgeschlossenesSymptom ; - } - - public void setUnbekanntesSymptom(UnbekanntesSymptomEvaluation unbekanntesSymptom) { - this.unbekanntesSymptom = unbekanntesSymptom; - } - - public UnbekanntesSymptomEvaluation getUnbekanntesSymptom() { - return this.unbekanntesSymptom ; - } - - public void setComposer(PartyProxy composer) { - this.composer = composer; - } - - public PartyProxy getComposer() { - return this.composer ; - } - - public void setLanguage(Language language) { - this.language = language; - } - - public Language getLanguage() { - return this.language ; - } - - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } - - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } - - public void setTerritory(Territory territory) { - this.territory = territory; - } - - public Territory getTerritory() { - return this.territory ; - } - - public VersionUid getVersionUid() { - return this.versionUid ; - } - - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setAusgeschlossenesSymptom( + AusgeschlossenesSymptomEvaluation ausgeschlossenesSymptom) { + this.ausgeschlossenesSymptom = ausgeschlossenesSymptom; + } + + public UnbekanntesSymptomEvaluation getUnbekanntesSymptom() { + return this.unbekanntesSymptom; + } + + public void setUnbekanntesSymptom(UnbekanntesSymptomEvaluation unbekanntesSymptom) { + this.unbekanntesSymptom = unbekanntesSymptom; + } + + public PartyProxy getComposer() { + return this.composer; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } + + public Language getLanguage() { + return this.language; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public Territory getTerritory() { + return this.territory; + } + + public void setTerritory(Territory territory) { + this.territory = territory; + } + + public VersionUid getVersionUid() { + return this.versionUid; + } + + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationProvider.java new file mode 100644 index 000000000..9c4ab4fee --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationProvider.java @@ -0,0 +1,61 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.observation; + +import ca.uhn.fhir.rest.annotation.ConditionalUrlParam; +import ca.uhn.fhir.rest.annotation.Create; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.annotation.ResourceParam; +import ca.uhn.fhir.rest.annotation.Update; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.Observation; +import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Implementation of {@link AbstractPlainProvider} that supports 'Provide Observation' transaction + * using {@link Create} and {@link Update} operations. + * + * @since 1.2.0 + */ +public class ProvideObservationProvider extends AbstractPlainProvider { + + private static final Logger LOG = LoggerFactory.getLogger(ProvideObservationProvider.class); + + @Create + public MethodOutcome create(@ResourceParam Observation observation, RequestDetails requestDetails, + HttpServletRequest request, HttpServletResponse response) { + LOG.debug("Executing 'Provide Observation' using Create operation..."); + + return requestAction(observation, null, request, response, requestDetails); + } + + @Update + public MethodOutcome update(@ResourceParam Observation observation, @IdParam IdType theId, + @ConditionalUrlParam String theConditional, RequestDetails requestDetails, + HttpServletRequest request, HttpServletResponse response) { + LOG.debug("Executing 'Provide Observation' using Update operation..."); + + return requestAction(observation, null, request, response, requestDetails); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationTransaction.java new file mode 100644 index 000000000..ef694c725 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationTransaction.java @@ -0,0 +1,44 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.observation; + +import ca.uhn.fhir.context.FhirVersionEnum; +import org.openehealth.ipf.commons.ihe.fhir.FhirTransactionConfiguration; +import org.openehealth.ipf.commons.ihe.fhir.FhirTransactionValidator; +import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; + +/** + * Configuration for 'Provide Observation' transaction. + * <p> + * Note: Server-side only. + * + * @since 1.2.0 + */ +public class ProvideObservationTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { + + public ProvideObservationTransaction() { + super("observation-provide", + "Provide Observation", + false, + null, + new CreateObservationAuditStrategy(), + FhirVersionEnum.R4, + new ProvideObservationProvider(), + null, + FhirTransactionValidator.NO_VALIDATION); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/support/PatientId.java b/src/main/java/org/ehrbase/fhirbridge/fhir/support/PatientId.java deleted file mode 100644 index 23c1e70dc..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/support/PatientId.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.ehrbase.fhirbridge.fhir.support; - -import org.hibernate.annotations.Type; - -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.Table; -import java.util.UUID; - -@Entity -@Table(name = "fb_patient_id") -public class PatientId { - - @Id - @GeneratedValue - @Type(type = "uuid-char") - private UUID uuid; - - public UUID getUuid() { - return uuid; - } - - public String getUuidAsString() { - if (uuid == null) { - return null; - } - return uuid.toString(); - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/support/PatientIdRepository.java b/src/main/java/org/ehrbase/fhirbridge/fhir/support/PatientIdRepository.java deleted file mode 100644 index ddd3399e3..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/support/PatientIdRepository.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.ehrbase.fhirbridge.fhir.support; - -import org.springframework.data.jpa.repository.JpaRepository; - -import java.util.UUID; - -public interface PatientIdRepository extends JpaRepository<PatientId, UUID> { -} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java index a1b2be83e..1a088ead9 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java @@ -7,6 +7,8 @@ import com.nedap.archie.rm.support.identification.GenericId; import com.nedap.archie.rm.support.identification.PartyRef; import org.ehrbase.client.openehrclient.OpenEhrClient; +import org.ehrbase.fhirbridge.core.domain.PatientId; +import org.ehrbase.fhirbridge.core.repository.PatientIdRepository; import org.ehrbase.fhirbridge.fhir.common.Profile; import org.hl7.fhir.r4.model.CanonicalType; import org.hl7.fhir.r4.model.Condition; diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/observation-provide b/src/main/resources/META-INF/services/org/apache/camel/component/observation-provide new file mode 100644 index 000000000..f373b0839 --- /dev/null +++ b/src/main/resources/META-INF/services/org/apache/camel/component/observation-provide @@ -0,0 +1 @@ +class=org.ehrbase.fhirbridge.camel.component.fhir.observation.ProvideObservationComponent \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index fe695cc7d..9cf23888f 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -106,6 +106,7 @@ logging: com.zaxxer.hikari: warn liquibase: warn org.apache.camel: warn + org.ehrbase.fhirbridge: debug org.hibernate: warn org.openehealth.ipf: warn org.quartz: warn diff --git a/src/main/resources/db/changelog/db.changelog-1.2.xml b/src/main/resources/db/changelog/db.changelog-1.2.xml index 24f6dda53..65587184b 100644 --- a/src/main/resources/db/changelog/db.changelog-1.2.xml +++ b/src/main/resources/db/changelog/db.changelog-1.2.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> -<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +<databaseChangeLog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.9.xsd"> <!-- HAPI FHIR 5.3.0 --> @@ -105,4 +105,15 @@ <column name="TARGET_RESOURCE_VERSION" type="bigint"/> </addColumn> </changeSet> + + <changeSet id="3" author="subigre"> + <createTable tableName="FB_RESOURCE_MAP"> + <column name="RES_ID" type="varchar(255)"> + <constraints nullable="false" primaryKey="true"/> + </column> + <column name="VERSION_UID" type="varchar(36)"> + <constraints nullable="false" unique="true"/> + </column> + </createTable> + </changeSet> </databaseChangeLog> \ No newline at end of file diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/AbstractMappingTestSetupIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/AbstractMappingTestSetupIT.java index 970473c73..c941744ad 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/AbstractMappingTestSetupIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/AbstractMappingTestSetupIT.java @@ -2,9 +2,9 @@ import ca.uhn.fhir.rest.api.MethodOutcome; import com.nedap.archie.rm.RMObject; +import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; import org.ehrbase.client.flattener.Flattener; import org.ehrbase.fhirbridge.TestFileLoader; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.ResourceTemplateProvider; import org.ehrbase.serialisation.jsonencoding.CanonicalJson; import org.javers.core.Javers; @@ -18,19 +18,19 @@ public abstract class AbstractMappingTestSetupIT extends AbstractSetupIT { protected TestFileLoader testFileLoader; - public AbstractMappingTestSetupIT(String directory, Class clazz) { + public AbstractMappingTestSetupIT(String directory, Class<?> clazz) { super(); this.testFileLoader = new TestFileLoader(directory, clazz, super.context); } - public Diff compareCompositions(Javers javers, String paragonFilePath, Composition mappedComposition) + public Diff compareCompositions(Javers javers, String paragonFilePath, CompositionEntity mappedComposition) throws IOException { RMObject composition = new CanonicalJson().unmarshal(testFileLoader.loadResourceToString(paragonFilePath), com.nedap.archie.rm.composition.Composition.class); ResourceTemplateProvider resourceTemplateProvider = new ResourceTemplateProvider("classpath:/opt/"); resourceTemplateProvider.afterPropertiesSet(); Flattener cut = new Flattener(resourceTemplateProvider); - Composition paragonComposition = cut.flatten(composition, mappedComposition.getClass()); + CompositionEntity paragonComposition = cut.flatten(composition, mappedComposition.getClass()); Diff diff = javers.compare(paragonComposition, mappedComposition); diff.getChanges().forEach(System.out::println); return diff; diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/AbstractSetupIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/AbstractSetupIT.java index cf1af92b7..7ecd1e772 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/AbstractSetupIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/AbstractSetupIT.java @@ -1,43 +1,27 @@ package org.ehrbase.fhirbridge.fhir; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.rest.api.MethodOutcome; import ca.uhn.fhir.rest.client.api.IGenericClient; -import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum; -import ca.uhn.fhir.rest.client.interceptor.BearerTokenAuthInterceptor; -import com.nedap.archie.rm.RMObject; import com.nedap.archie.rm.datavalues.DvText; import com.nedap.archie.rm.ehr.EhrStatus; import com.nedap.archie.rm.generic.PartySelf; import com.nedap.archie.rm.support.identification.HierObjectId; import com.nedap.archie.rm.support.identification.PartyRef; -import org.apache.commons.io.IOUtils; import org.apache.http.auth.AuthScope; import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.client.CredentialsProvider; import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; -import org.ehrbase.client.flattener.Flattener; import org.ehrbase.client.openehrclient.OpenEhrClientConfig; import org.ehrbase.client.openehrclient.defaultrestclient.DefaultRestClient; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.ResourceTemplateProvider; -import org.ehrbase.serialisation.jsonencoding.CanonicalJson; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.javers.core.Javers; -import org.javers.core.diff.Diff; import org.junit.jupiter.api.BeforeAll; -import org.springframework.core.io.ClassPathResource; -import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; -import java.nio.charset.StandardCharsets; import java.util.UUID; -import static org.junit.jupiter.api.Assertions.*; - public abstract class AbstractSetupIT { public static final String PATIENT_ID_TOKEN = "\\{\\{patientId\\}\\}"; @@ -78,6 +62,4 @@ static void setup() throws URISyntaxException { } - - } From 3c150f6ad4460f1e6ed8bb348f0a5edd199a2bd5 Mon Sep 17 00:00:00 2001 From: Pablo Pazos <pablo.pazos@cabolabs.com> Date: Wed, 12 May 2021 00:23:17 -0300 Subject: [PATCH 058/141] fix data sets for #212 --- .../resources/Observation/create-heart-rate-loinc-period_2.json | 2 +- .../Observation/create-heart-rate-snomed-period_2.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/resources/Observation/create-heart-rate-loinc-period_2.json b/src/test/resources/Observation/create-heart-rate-loinc-period_2.json index 41d2a7805..57f7052d2 100755 --- a/src/test/resources/Observation/create-heart-rate-loinc-period_2.json +++ b/src/test/resources/Observation/create-heart-rate-loinc-period_2.json @@ -37,7 +37,7 @@ }, "effectivePeriod": { "start": "1999-07-02", - "end": "1997-07-02" + "end": "1999-07-02" }, "valueQuantity": { "value": 60, diff --git a/src/test/resources/Observation/create-heart-rate-snomed-period_2.json b/src/test/resources/Observation/create-heart-rate-snomed-period_2.json index 925af06f6..7e566e201 100755 --- a/src/test/resources/Observation/create-heart-rate-snomed-period_2.json +++ b/src/test/resources/Observation/create-heart-rate-snomed-period_2.json @@ -42,7 +42,7 @@ }, "effectivePeriod": { "start": "1999-07-02", - "end": "1997-07-02" + "end": "1999-07-02" }, "valueQuantity": { "value": 60, From 28b26d609fb83d726f51368beff9cf6619ab3b7e Mon Sep 17 00:00:00 2001 From: MDSchulze <mareike.schulze@plri.de> Date: Wed, 12 May 2021 15:08:30 +0200 Subject: [PATCH 059/141] requested changes adressed --- ...rialParticipationCompositionConverter.java | 3 +- ...TrialParticipationEvaluationConverter.java | 59 ++++++-------- .../ClinicalTrialParticipationIT.java | 6 -- ...ticipation-yes-eudract-invalid-status.json | 79 +++++++++++++++++++ 4 files changed, 105 insertions(+), 42 deletions(-) create mode 100644 src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-eudract-invalid-status.json diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationCompositionConverter.java index ab3e2fa06..0ae551643 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationCompositionConverter.java @@ -1,5 +1,6 @@ package org.ehrbase.fhirbridge.ehr.converter.specific.clinicaltrialparticipation; +import ca.uhn.fhir.parser.DataFormatException; import org.ehrbase.fhirbridge.ehr.converter.ConversionException; import org.ehrbase.fhirbridge.ehr.converter.generic.ObservationToCompositionConverter; import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.GECCOStudienteilnahmeComposition; @@ -28,7 +29,7 @@ private void mapStatus(GECCOStudienteilnahmeComposition composition, Observation } else if (status.equals(StatusDefiningCode.VORLAEUFIG.getValue())) { composition.setStatusDefiningCode(StatusDefiningCode.VORLAEUFIG); } else { - throw new ConversionException("The status " + obs.getStatus().toString() + " is not valid for body height."); + throw new ConversionException("The status " + obs.getStatus().toString() + " is not valid for clinical trial participation."); } } } \ No newline at end of file diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java index 9b7599dec..b3a837790 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java @@ -2,13 +2,8 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.ehrbase.fhirbridge.ehr.converter.generic.ObservationToEvaluationConverter; -import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode; -import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.GeccoStudienteilnahmeEvaluation; -import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.StudiePruefungCluster; -import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.StudienteilnahmeCluster; -import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.StudiePruefungRegistrierungCluster; -import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.TitelDerStudiePruefungDefiningCode; -import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.RegisternameDefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.GECCOStudienteilnahmeComposition; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.*; import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.Observation; @@ -20,9 +15,16 @@ public class ClinicalTrialParticipationEvaluationConverter extends ObservationTo @Override protected GeccoStudienteilnahmeEvaluation convertInternal(Observation resource) { - GeccoStudienteilnahmeEvaluation geccoStudienteilnahmeEvaluation = new GeccoStudienteilnahmeEvaluation(); + mapParticipated(geccoStudienteilnahmeEvaluation, resource); + + if(geccoStudienteilnahmeEvaluation.getBereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode().equals(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.YES_QUALIFIER_VALUE)) + geccoStudienteilnahmeEvaluation.setStudienteilnahme(createStudyCluster(resource)); + return geccoStudienteilnahmeEvaluation; + } + + private void mapParticipated(GeccoStudienteilnahmeEvaluation geccoStudienteilnahmeEvaluation, Observation resource) { String codeParticipated = getSnomedCodeObservation(resource); switch(codeParticipated){ @@ -44,61 +46,48 @@ protected GeccoStudienteilnahmeEvaluation convertInternal(Observation resource) default: throw new UnprocessableEntityException("Value code " + resource.getValueCodeableConcept().getCoding().get(0).getCode() + " is not supported"); } - - if(geccoStudienteilnahmeEvaluation.getBereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode().equals(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.YES_QUALIFIER_VALUE)){ - - geccoStudienteilnahmeEvaluation.setStudienteilnahme(createStudyCluster(resource)); - } - - return geccoStudienteilnahmeEvaluation; } private StudienteilnahmeCluster createStudyCluster(Observation resource){ - StudienteilnahmeCluster studienteilnahmeCluster = new StudienteilnahmeCluster(); - StudiePruefungCluster studiePruefungCluster = new StudiePruefungCluster(); studienteilnahmeCluster.setStudiePruefung(studiePruefungCluster); - studiePruefungCluster.setTitelDerStudiePruefungDefiningCode(TitelDerStudiePruefungDefiningCode.PARTICIPATION_IN_INTERVENTIONAL_CLINICAL_TRIALS); - if(resource.getCode().hasText()){ + if(resource.getCode().hasText()) studiePruefungCluster.setBeschreibungValue(resource.getCode().getText()); - } - if(resource.hasComponent()){ + if(resource.hasComponent()) studiePruefungCluster.setRegistrierung(createRegistryCluster(resource)); - } return studienteilnahmeCluster; } private List<StudiePruefungRegistrierungCluster> createRegistryCluster(Observation resource) { - StudiePruefungRegistrierungCluster studiePruefungRegistrierungCluster = new StudiePruefungRegistrierungCluster(); for (Observation.ObservationComponentComponent observationComponent : resource.getComponent()) { - - if(observationComponent.getCode().getCoding().get(0).getCode().equals("04")) { - studiePruefungRegistrierungCluster.setRegisternameDefiningCode(RegisternameDefiningCode.EUDRACT_NUMBER); - }else if(observationComponent.getCode().getCoding().get(0).getCode().equals("05")) { - studiePruefungRegistrierungCluster.setRegisternameDefiningCode(RegisternameDefiningCode.NCT_NUMBER); - }else{ - throw new UnprocessableEntityException("value code " + observationComponent.getCode().getCoding().get(0).getCode() + " is not supported"); - } - + mapRegistername(observationComponent, studiePruefungRegistrierungCluster); studiePruefungRegistrierungCluster.setRegistrierungsnummerValue(observationComponent.getValueStringType().getValue()); } - return List.of(studiePruefungRegistrierungCluster); } + private void mapRegistername(Observation.ObservationComponentComponent observationComponent, StudiePruefungRegistrierungCluster studiePruefungRegistrierungCluster) { + if(observationComponent.getCode().getCoding().get(0).getCode().equals("04")) { + studiePruefungRegistrierungCluster.setRegisternameDefiningCode(RegisternameDefiningCode.EUDRACT_NUMBER); + }else if(observationComponent.getCode().getCoding().get(0).getCode().equals("05")) { + studiePruefungRegistrierungCluster.setRegisternameDefiningCode(RegisternameDefiningCode.NCT_NUMBER); + }else{ + throw new UnprocessableEntityException("value code " + observationComponent.getCode().getCoding().get(0).getCode() + " is not supported"); + } + } + private void checkForSnomedSystem(String systemCode) { - if (!SNOMED.getUrl().equals(systemCode)) { + if (!SNOMED.getUrl().equals(systemCode)) throw new UnprocessableEntityException("The system is not correct. " + "It should be '" + SNOMED.getUrl() + "', but it was '" + systemCode + "'."); - } } private String getSnomedCodeObservation(Observation fhirObservation) { diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ClinicalTrialParticipationIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ClinicalTrialParticipationIT.java index 1ea33ba04..b969c3a04 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ClinicalTrialParticipationIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ClinicalTrialParticipationIT.java @@ -67,12 +67,6 @@ void mappingUnknown() throws IOException { "paragon-clinical-trial-participation-unknown.json"); } - /* Beispiel existiert nicht (selber generieren?) - @Test - void mappingOther() throws IOException { - - }*/ - @Test void mappingNotApplicable() throws IOException { testMapping("create-clinical-trial-participation-notapplicable.json", diff --git a/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-eudract-invalid-status.json b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-eudract-invalid-status.json new file mode 100644 index 000000000..55e6216d7 --- /dev/null +++ b/src/test/resources/Observation/ClinicalTrialParticipation/create-clinical-trial-participation-yes-eudract-invalid-status.json @@ -0,0 +1,79 @@ +{ + "resourceType": "Observation", + "id": "ee7afc8a-77fd-4394-a475-6171865f7119", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/interventional-clinical-trial-participation" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "OBI" + } + ] + }, + "system": "https://www.charite.de/fhir/CodeSystem/observation-identifiers", + "value": "ecrf_03_InterventionalClinicalTrialsParticipation", + "assigner": { + "reference": "Organization/Charité" + } + } + ], + "status": "temp", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "survey" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes", + "code": "03", + "display": "Participation in interventional clinical trials" + } + ], + "text": "Has the patient participated in one or more interventional clinical trials?" + }, + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-10-16T08:49:21+02:00", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "373066001", + "display": "Yes (qualifier value)" + } + ], + "text": "Patient is enrolled in other studies" + }, + "component": [ + { + "code": { + "coding": [ + { + "system": "https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes", + "code": "04", + "display": "EudraCT Number" + } + ], + "text": "EudraCT (European Union Drug Regulating Authorities Clinical Trials) registration number" + }, + "valueString": "2020-042169-13" + } + ] +} \ No newline at end of file From cfe1f57a84f4c83164d31a33cb19282ec84ba053 Mon Sep 17 00:00:00 2001 From: MDSchulze <mareike.schulze@plri.de> Date: Wed, 12 May 2021 15:32:50 +0200 Subject: [PATCH 060/141] using braces in single-line if-statments --- ...rialParticipationCompositionConverter.java | 1 - ...TrialParticipationEvaluationConverter.java | 21 +++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationCompositionConverter.java index 0ae551643..f5fbabfcd 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationCompositionConverter.java @@ -1,6 +1,5 @@ package org.ehrbase.fhirbridge.ehr.converter.specific.clinicaltrialparticipation; -import ca.uhn.fhir.parser.DataFormatException; import org.ehrbase.fhirbridge.ehr.converter.ConversionException; import org.ehrbase.fhirbridge.ehr.converter.generic.ObservationToCompositionConverter; import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.GECCOStudienteilnahmeComposition; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java index b3a837790..79f4394d0 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/clinicaltrialparticipation/ClinicalTrialParticipationEvaluationConverter.java @@ -2,8 +2,13 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.ehrbase.fhirbridge.ehr.converter.generic.ObservationToEvaluationConverter; -import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.GECCOStudienteilnahmeComposition; -import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.*; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.GeccoStudienteilnahmeEvaluation; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.RegisternameDefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.StudiePruefungCluster; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.StudienteilnahmeCluster; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.StudiePruefungRegistrierungCluster; +import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.TitelDerStudiePruefungDefiningCode; import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.Observation; @@ -18,8 +23,9 @@ protected GeccoStudienteilnahmeEvaluation convertInternal(Observation resource) GeccoStudienteilnahmeEvaluation geccoStudienteilnahmeEvaluation = new GeccoStudienteilnahmeEvaluation(); mapParticipated(geccoStudienteilnahmeEvaluation, resource); - if(geccoStudienteilnahmeEvaluation.getBereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode().equals(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.YES_QUALIFIER_VALUE)) + if(geccoStudienteilnahmeEvaluation.getBereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode().equals(BereitsAnInterventionellenKlinischenStudienTeilgenommenDefiningCode.YES_QUALIFIER_VALUE)) { geccoStudienteilnahmeEvaluation.setStudienteilnahme(createStudyCluster(resource)); + } return geccoStudienteilnahmeEvaluation; } @@ -54,11 +60,13 @@ private StudienteilnahmeCluster createStudyCluster(Observation resource){ studienteilnahmeCluster.setStudiePruefung(studiePruefungCluster); studiePruefungCluster.setTitelDerStudiePruefungDefiningCode(TitelDerStudiePruefungDefiningCode.PARTICIPATION_IN_INTERVENTIONAL_CLINICAL_TRIALS); - if(resource.getCode().hasText()) + if(resource.getCode().hasText()) { studiePruefungCluster.setBeschreibungValue(resource.getCode().getText()); + } - if(resource.hasComponent()) + if(resource.hasComponent()) { studiePruefungCluster.setRegistrierung(createRegistryCluster(resource)); + } return studienteilnahmeCluster; } @@ -85,9 +93,10 @@ private void mapRegistername(Observation.ObservationComponentComponent observati } private void checkForSnomedSystem(String systemCode) { - if (!SNOMED.getUrl().equals(systemCode)) + if (!SNOMED.getUrl().equals(systemCode)) { throw new UnprocessableEntityException("The system is not correct. " + "It should be '" + SNOMED.getUrl() + "', but it was '" + systemCode + "'."); + } } private String getSnomedCodeObservation(Observation fhirObservation) { From 724fff708de15b02dde0579ca0e7cd6257cb0e35 Mon Sep 17 00:00:00 2001 From: zhu13 <yufei.zhu@med.uni-goettingen.de> Date: Tue, 16 Mar 2021 19:07:06 +0100 Subject: [PATCH 061/141] =?UTF-8?q?Converter=20f=C3=BCr=20Station=C3=A4rer?= =?UTF-8?q?=20Versorgungsfall=20&=20Patienten=20Aufenthalt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../encounter/CreateEncounterComponent.java | 17 + .../encounter/FindEncounterComponent.java | 18 + .../camel/route/EncounterRoutes.java | 56 + .../config/ConversionConfiguration.java | 8 + .../config/FhirJpaConfiguration.java | 9 + .../ehr/converter/ConversionService.java | 10 + .../EncounterToCompositionConverter.java | 23 + .../ehr/converter/generic/TimeConverter.java | 14 + .../ehr/converter/specific/CodeSystem.java | 2 + ...chAbteilungsSchluesselDefiningCodeMap.java | 23 + ...tientenAufenthaltCompositionConverter.java | 153 + ...erVersorgungsfallCompositionConverter.java | 106 + ...naererVersorgungsfallDefiningCodeMaps.java | 69 + .../PatientenaufenthaltComposition.java | 262 + ...entenaufenthaltCompositionContainment.java | 63 + .../definition/AbteilungsfallCluster.java | 64 + .../AbteilungsfallClusterContainment.java | 26 + .../definition/DetailsZumBettCluster.java | 208 + .../DetailsZumBettClusterContainment.java | 48 + .../FachabteilungsschluesselDefiningCode.java | 116 + .../FachlicheOrganisationseinheitCluster.java | 201 + ...rganisationseinheitClusterContainment.java | 48 + .../definition/StandortCluster.java | 274 + .../StandortClusterContainment.java | 57 + .../VersorgungsaufenthaltAdminEntry.java | 213 + ...rgungsaufenthaltAdminEntryContainment.java | 51 + .../definition/VersorgungsfallCluster.java | 64 + .../VersorgungsfallClusterContainment.java | 26 + .../VersorgungstellenkontaktCluster.java | 64 + ...rgungstellenkontaktClusterContainment.java | 26 + ...tationaererVersorgungsfallComposition.java | 413 + ...VersorgungsfallCompositionContainment.java | 85 + .../ArtDerEntlassungDefiningCode.java | 96 + .../AufnahmeanlassDefiningCode.java | 53 + .../definition/AufnahmedatenAdminEntry.java | 235 + .../AufnahmedatenAdminEntryContainment.java | 54 + .../definition/AufnahmegrundDefiningCode.java | 55 + .../EntlassungsdatenAdminEntry.java | 236 + ...EntlassungsdatenAdminEntryContainment.java | 54 + .../FachlicheOrganisationseinheitCluster.java | 201 + ...rganisationseinheitClusterContainment.java | 48 + .../definition/FallstatusDefiningCode.java | 51 + ...ischerZustandDesPatientenDefiningCode.java | 52 + .../OrganisationsschluesselDefiningCode.java | 116 + ...rganisationseinheitVorAufnahmeCluster.java | 200 + ...seinheitVorAufnahmeClusterContainment.java | 49 + ...erPatientenstandortVorAufnahmeCluster.java | 273 + ...standortVorAufnahmeClusterContainment.java | 57 + ...anisationseinheitBeiEntlassungCluster.java | 200 + ...inheitBeiEntlassungClusterContainment.java | 49 + ...ewiesenerStandortBeiEntlassungCluster.java | 273 + ...andortBeiEntlassungClusterContainment.java | 57 + .../fhirbridge/fhir/common/Profile.java | 4 + .../common/audit/FhirBridgeEventType.java | 3 + .../CreateEncounterAuditStrategy.java | 20 + .../encounter/CreateEncounterProvider.java | 26 + .../encounter/CreateEncounterTransaction.java | 26 + .../encounter/FindEncounterAuditStrategy.java | 29 + .../fhir/encounter/FindEncounterProvider.java | 50 + .../encounter/FindEncounterTransaction.java | 26 + .../fhirbridge/fhir/support/Encounters.java | 31 + .../support/KontaktebeneDefiningCode.java | 43 + .../fhirbridge/fhir/support/Resources.java | 54 + .../apache/camel/component/encounter-create | 1 + .../org/apache/camel/component/encounter-find | 1 + .../resources/opt/Patientenaufenthalt.opt | 2628 ++++++ .../opt/Stationaerer_Versorgungsfall.opt | 3843 ++++++++ .../KontaktGesundheitseinrichtung.xml | 8166 +++++++++++++++++ 68 files changed, 20177 insertions(+) create mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/encounter/CreateEncounterComponent.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/encounter/FindEncounterComponent.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToCompositionConverter.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/PatientenAufenthalt/FachAbteilungsSchluesselDefiningCodeMap.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/PatientenAufenthalt/PatientenAufenthaltCompositionConverter.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallCompositionConverter.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallDefiningCodeMaps.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/PatientenaufenthaltComposition.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/PatientenaufenthaltCompositionContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/AbteilungsfallCluster.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/AbteilungsfallClusterContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/DetailsZumBettCluster.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/DetailsZumBettClusterContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/FachabteilungsschluesselDefiningCode.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/FachlicheOrganisationseinheitCluster.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/FachlicheOrganisationseinheitClusterContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/StandortCluster.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/StandortClusterContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungsaufenthaltAdminEntry.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungsaufenthaltAdminEntryContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungsfallCluster.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungsfallClusterContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungstellenkontaktCluster.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungstellenkontaktClusterContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/StationaererVersorgungsfallComposition.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/StationaererVersorgungsfallCompositionContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/ArtDerEntlassungDefiningCode.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/AufnahmeanlassDefiningCode.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/AufnahmedatenAdminEntry.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/AufnahmedatenAdminEntryContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/AufnahmegrundDefiningCode.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/EntlassungsdatenAdminEntry.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/EntlassungsdatenAdminEntryContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/FachlicheOrganisationseinheitCluster.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/FachlicheOrganisationseinheitClusterContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/FallstatusDefiningCode.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/KlinischerZustandDesPatientenDefiningCode.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/OrganisationsschluesselDefiningCode.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeClusterContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/VorherigerPatientenstandortVorAufnahmeCluster.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/VorherigerPatientenstandortVorAufnahmeClusterContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungClusterContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/ZugewiesenerStandortBeiEntlassungCluster.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/ZugewiesenerStandortBeiEntlassungClusterContainment.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterAuditStrategy.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterProvider.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterTransaction.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/encounter/FindEncounterAuditStrategy.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/encounter/FindEncounterProvider.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/encounter/FindEncounterTransaction.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/support/Encounters.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/support/KontaktebeneDefiningCode.java create mode 100644 src/main/resources/META-INF/services/org/apache/camel/component/encounter-create create mode 100644 src/main/resources/META-INF/services/org/apache/camel/component/encounter-find create mode 100644 src/main/resources/opt/Patientenaufenthalt.opt create mode 100644 src/main/resources/opt/Stationaerer_Versorgungsfall.opt create mode 100644 src/main/resources/profiles/KontaktGesundheitseinrichtung.xml diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/encounter/CreateEncounterComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/encounter/CreateEncounterComponent.java new file mode 100644 index 000000000..8ff4135be --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/encounter/CreateEncounterComponent.java @@ -0,0 +1,17 @@ +package org.ehrbase.fhirbridge.camel.component.fhir.encounter; + +import org.ehrbase.fhirbridge.fhir.encounter.CreateEncounterTransaction; +import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; +import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; + +/** + * Camel {@link org.apache.camel.Component Component} that handles 'Create Encounter' transaction. + * + * @since 1.0.0 + */ +public class CreateEncounterComponent extends CustomFhirComponent<GenericFhirAuditDataset> { + + public CreateEncounterComponent() { + super(new CreateEncounterTransaction()); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/encounter/FindEncounterComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/encounter/FindEncounterComponent.java new file mode 100644 index 000000000..8b05e2177 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/encounter/FindEncounterComponent.java @@ -0,0 +1,18 @@ +package org.ehrbase.fhirbridge.camel.component.fhir.encounter; + +import org.ehrbase.fhirbridge.fhir.encounter.FindEncounterTransaction; +import org.openehealth.ipf.commons.ihe.fhir.audit.FhirQueryAuditDataset; +import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; + +/** + * Camel {@link org.apache.camel.Component Component} that handles 'Find Encounter' transaction. + * + * @since 1.0.0 + */ +@SuppressWarnings({"java:S110"}) +public class FindEncounterComponent extends CustomFhirComponent<FhirQueryAuditDataset> { + + public FindEncounterComponent() { + super(new FindEncounterTransaction()); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java new file mode 100644 index 000000000..1e2ac2c5c --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java @@ -0,0 +1,56 @@ +package org.ehrbase.fhirbridge.camel.route; + +import org.apache.camel.builder.RouteBuilder; +import org.ehrbase.fhirbridge.camel.FhirBridgeConstants; +import org.ehrbase.fhirbridge.fhir.common.Profile; +import org.ehrbase.fhirbridge.fhir.support.Encounters; +import org.hl7.fhir.r4.model.Encounter; +import org.springframework.stereotype.Component; + +/** + * Implementation of {@link RouteBuilder} that provides route definitions for transactions + * linked to {@link Encounter} resource. + * + * @since 1.0.0 + */ +@Component +public class EncounterRoutes extends AbstractRouteBuilder { + + @Override + public void configure() throws Exception { + // @formatter:off + super.configure(); + + // 'Create Encounter' route definition + from("encounter-create:consumer?fhirContext=#fhirContext") + .onCompletion() + .process("auditCreateResourceProcessor") + .end() + .process("resourceProfileValidator") + .to("direct:process-encounter"); + + // 'Find Encounter' route definition + from("encounter-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") + .choice() + .when(isSearchOperation()) + .to("bean:encounterDao?method=search(${body}, ${headers.FhirRequestDetails})") + .process("bundleProviderResponseProcessor") + .otherwise() + .to("bean:encounterDao?method=read(${body}, ${headers.FhirRequestDetails})"); + + // Internal routes definition + from("direct:process-encounter") + .setHeader(FhirBridgeConstants.METHOD_OUTCOME, method("encounterDao", "create(${body}, ${headers.FhirRequestDetails})")) + .process("ehrIdLookupProcessor") + .setHeader(FhirBridgeConstants.PROFILE, method(Encounters.class, "getProfileByKontaktEbene")) + .choice() + .when(header(FhirBridgeConstants.PROFILE).isEqualTo(Profile.PATIENTEN_AUFENTHALT)) + .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") + .otherwise() + .to("bean:fhirResourceConversionService?method=convertDefaultEncounter(${body})") + .to("ehr-composition:compositionEndpoint?operation=mergeCompositionEntity") + .process("resourceResponseProcessor"); + + // @formatter:on + } +} \ No newline at end of file diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java index cd5cb70da..efb6a6270 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java @@ -2,6 +2,7 @@ import org.ehrbase.fhirbridge.ehr.converter.ConversionService; import org.ehrbase.fhirbridge.ehr.converter.specific.antibodypanel.GECCOSerologischerBefundCompositionConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.PatientenAufenthalt.PatientenAufenthaltCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.bloodgas.BloodGasPanelCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.bloodpressure.BloodPressureCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.bodyheight.BodyHeightCompositionConverter; @@ -30,6 +31,7 @@ import org.ehrbase.fhirbridge.ehr.converter.specific.respirationrate.RespiratoryRateCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.smokingstatus.SmokingStatusCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.sofascore.SofaScoreCompositionConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.stationaererversorgungsfall.StationaererVersorgungsfallCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.symptom.SymptomCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.therapy.TherapyCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.virologischerBefund.PCRCompositionConverter; @@ -53,6 +55,7 @@ public ConversionService conversionService() { registerProcedureConverters(conversionService); registerQuestionnaireResponseConverter(conversionService); registerMedicationStatementConverter(conversionService); + registerEncounterConverter(conversionService); return conversionService; } @@ -139,4 +142,9 @@ private void registerMedicationStatementConverter(ConversionService conversionSe conversionService.registerConverter(Profile.PHARMACOLOGICAL_THERAPY_ANTICOAGULANTS, converter); conversionService.registerConverter(Profile.PHARMACOLOGICAL_THERAPY_IMMUNOGLOBULINS, converter); } + + private void registerEncounterConverter(ConversionService conversionService) { + conversionService.registerConverter(Profile.STATIONAERER_VERSORGUNGSFALL, new StationaererVersorgungsfallCompositionConverter()); + conversionService.registerConverter(Profile.PATIENTEN_AUFENTHALT, new PatientenAufenthaltCompositionConverter()); + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/config/FhirJpaConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/FhirJpaConfiguration.java index 24069c307..4305b8af9 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/FhirJpaConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/FhirJpaConfiguration.java @@ -48,6 +48,7 @@ import org.hl7.fhir.r4.model.QuestionnaireResponse; import org.hl7.fhir.r4.model.SearchParameter; import org.hl7.fhir.r4.model.ValueSet; +import org.hl7.fhir.r4.model.Encounter; import org.springframework.boot.autoconfigure.orm.jpa.JpaProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; @@ -221,6 +222,14 @@ public IFhirResourceDao<QuestionnaireResponse> questionnaireResponseDao() { return resourceDao; } + @Bean + public IFhirResourceDao<Encounter> encounterDao() { + JpaResourceDao<Encounter> resourceDao = new JpaResourceDao<>(); + resourceDao.setResourceType(Encounter.class); + resourceDao.setContext(fhirContext()); + return resourceDao; + } + @Bean(name = "myCodeSystemDaoR4") public IFhirResourceDaoCodeSystem<CodeSystem, Coding, CodeableConcept> codeSystemDao() { FhirResourceDaoCodeSystemR4 codeSystemDao = new FhirResourceDaoCodeSystemR4(); diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/ConversionService.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/ConversionService.java index 41982e551..43fe912e1 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/ConversionService.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/ConversionService.java @@ -41,6 +41,16 @@ public Object convert(Profile profile, Resource resource) { .convert(resource); } + public Object convertDefaultEncounter(Resource resource) { + + if(!converters.containsKey(Profile.STATIONAERER_VERSORGUNGSFALL)) { + throw new ConversionException("No converter available for encounter with profile stationär Versorgungsfall" ); + } + + return converters.get(Profile.STATIONAERER_VERSORGUNGSFALL) + .convert(resource); + } + public void registerConverter(Profile profile, RMEntityConverter<?, ?> converter) { converters.put(profile, converter); } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToCompositionConverter.java new file mode 100644 index 000000000..79c6e69e7 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToCompositionConverter.java @@ -0,0 +1,23 @@ +package org.ehrbase.fhirbridge.ehr.converter.generic; + +import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; +import org.hl7.fhir.r4.model.Encounter; +import org.springframework.lang.NonNull; + +public abstract class EncounterToCompositionConverter <C extends CompositionEntity> extends CompositionConverter<Encounter, C>{ + + @Override + public C convert(@NonNull Encounter resource) { + C composition = super.convert(resource); + + // Mandatory + composition.setStartTimeValue(TimeConverter.convertEncounterTime(resource)); // StartTimeValue + //composition.setComposer(getComposerOrDefault(resource)); // Composer + + // Optional + TimeConverter.convertEncounterEndTime(resource).ifPresent(composition::setEndTimeValue); // EndTimeValue + + return composition; + } + +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java index e1209ed15..04e2563b0 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java @@ -6,6 +6,7 @@ import org.hl7.fhir.r4.model.DiagnosticReport; import org.hl7.fhir.r4.model.Extension; import org.hl7.fhir.r4.model.MedicationStatement; +import org.hl7.fhir.r4.model.Encounter; import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Procedure; import org.hl7.fhir.r4.model.QuestionnaireResponse; @@ -143,4 +144,17 @@ public static TemporalAccessor convertAgeExtensionTime(Extension extension) { DateTimeType dateTimeOfDocumentationDt = (DateTimeType) dataTimeOfDocumentationExtension.getValue(); return dateTimeOfDocumentationDt.getValueAsCalendar().toZonedDateTime(); } + + static TemporalAccessor convertEncounterTime(Encounter encounter) { + return OffsetDateTime.from(encounter.getPeriod().getStartElement().getValueAsCalendar().toZonedDateTime()); + } + + static Optional<TemporalAccessor> convertEncounterEndTime(Encounter encounter) { + + if (encounter.getPeriod().hasEndElement()) { + return Optional.of(OffsetDateTime.from(encounter.getPeriod().getEndElement().getValueAsCalendar().toZonedDateTime())); + } else { + return Optional.empty(); + } + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/CodeSystem.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/CodeSystem.java index c1c749244..2899700ca 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/CodeSystem.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/CodeSystem.java @@ -6,6 +6,8 @@ public enum CodeSystem { SNOMED("http://snomed.info/sct"), + KONTAKT_EBENE("https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Kontaktebene"), + HL7_DATA_ABSENT_REASON("http://terminology.hl7.org/CodeSystem/data-absent-reason"), DIMDI_ATC("http://fhir.de/CodeSystem/dimdi/atc"); diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/PatientenAufenthalt/FachAbteilungsSchluesselDefiningCodeMap.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/PatientenAufenthalt/FachAbteilungsSchluesselDefiningCodeMap.java new file mode 100644 index 000000000..caead5c34 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/PatientenAufenthalt/FachAbteilungsSchluesselDefiningCodeMap.java @@ -0,0 +1,23 @@ +package org.ehrbase.fhirbridge.ehr.converter.specific.PatientenAufenthalt; + +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.FachabteilungsschluesselDefiningCode; + +import java.util.HashMap; +import java.util.Map; + +class FachAbteilungsSchluesselDefiningCodeMap { + + private static final Map<String, FachabteilungsschluesselDefiningCode> fachAbteilungsSchluesselMap = new HashMap<>(); + + static { + + for(FachabteilungsschluesselDefiningCode fachabteilungsschluesselDefiningCode : FachabteilungsschluesselDefiningCode.values() ) { + + fachAbteilungsSchluesselMap.put(fachabteilungsschluesselDefiningCode.getCode(), fachabteilungsschluesselDefiningCode); + } + } + + static Map<String, FachabteilungsschluesselDefiningCode> getFachAbteilungsSchluesselMap() { + return fachAbteilungsSchluesselMap; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/PatientenAufenthalt/PatientenAufenthaltCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/PatientenAufenthalt/PatientenAufenthaltCompositionConverter.java new file mode 100644 index 000000000..17c36a8c1 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/PatientenAufenthalt/PatientenAufenthaltCompositionConverter.java @@ -0,0 +1,153 @@ +package org.ehrbase.fhirbridge.ehr.converter.specific.PatientenAufenthalt; + +import org.ehrbase.fhirbridge.ehr.converter.generic.EncounterToCompositionConverter; +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.PatientenaufenthaltComposition; +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.AbteilungsfallCluster; +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.FachlicheOrganisationseinheitCluster; +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.StandortCluster; +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungsaufenthaltAdminEntry; +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungsfallCluster; +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungstellenkontaktCluster; +import org.ehrbase.fhirbridge.fhir.support.KontaktebeneDefiningCode; +import static org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem.KONTAKT_EBENE; +import org.hl7.fhir.r4.model.Coding; +import org.hl7.fhir.r4.model.Encounter; +import org.hl7.fhir.r4.model.Identifier; +import org.springframework.lang.NonNull; + +import java.time.OffsetDateTime; +import java.util.ArrayList; + + +public class PatientenAufenthaltCompositionConverter extends EncounterToCompositionConverter<PatientenaufenthaltComposition> { + + private final String FACH_ABTEILUNGS_SCHLUESSEL_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel"; + + @Override + public PatientenaufenthaltComposition convertInternal(@NonNull Encounter encounter) { + + PatientenaufenthaltComposition retVal = new PatientenaufenthaltComposition(); + + if (encounter.getIdentifier() != null && encounter.getIdentifier().size() > 0) { + + Identifier encounterIdentifier = encounter.getIdentifier().get(0); + + if (encounter.getType() != null && encounter.getType().size() > 0 + && encounter.getType().get(0).getCoding().get(0).getSystem().equals(KONTAKT_EBENE.getUrl())) { + + String typeCode = encounter.getType().get(0).getCoding().get(0).getCode(); + + if (typeCode.equals(KontaktebeneDefiningCode.EINRICHTUNGS_KONTAKT.getCode())) { + + VersorgungsfallCluster versorgungsfallCluster = new VersorgungsfallCluster(); + versorgungsfallCluster.setZugehoerigerVersorgungsfallKennungValue(encounterIdentifier.getValue()); + retVal.setVersorgungsfall(versorgungsfallCluster); + } else if (typeCode.equals(KontaktebeneDefiningCode.ABTEILUNGS_KONTAKT.getCode())) { + + AbteilungsfallCluster abteilungsfallCluster = new AbteilungsfallCluster(); + abteilungsfallCluster.setZugehoerigerAbteilungsfallKennungValue(encounterIdentifier.getValue()); + retVal.setAbteilungsfall(abteilungsfallCluster); + } else if (typeCode.equals(KontaktebeneDefiningCode.VERSORGUNGS_STELLEN_KONTAKT.getCode())) { + + VersorgungstellenkontaktCluster versorgungstellenkontaktCluster = new VersorgungstellenkontaktCluster(); + versorgungstellenkontaktCluster.setZugehoerigerVersorgungsstellenkontaktKennungValue(encounterIdentifier.getValue()); + retVal.setVersorgungstellenkontakt(versorgungstellenkontaktCluster); + } else{ + throw new IllegalStateException("Invalid Code " + typeCode + + " or Code System as 'Kontaktebene', valid codes are einrichtungskontakt, abteilungskontakt, versorgungsstellenkontakt."); + } + } + } + + // Mapping for Versorgungsaufenthalt + VersorgungsaufenthaltAdminEntry versorgungsaufenthaltAdminEntry = new VersorgungsaufenthaltAdminEntry(); + + if(encounter.getLocation() != null + && encounter.getLocation().size() > 0) { + + Encounter.EncounterLocationComponent location = encounter.getLocation().get(0); + + if (location.getPeriod() != null) { + OffsetDateTime begin = OffsetDateTime.from(location.getPeriod().getStartElement().getValueAsCalendar().toZonedDateTime()); + versorgungsaufenthaltAdminEntry.setBeginnValue(begin); + + if (location.getPeriod().hasEndElement()) { + OffsetDateTime end = OffsetDateTime.from(location.getPeriod().getEndElement().getValueAsCalendar().toZonedDateTime()); + versorgungsaufenthaltAdminEntry.setEndeValue(end); + } + } + + // location physical type / name -> standort + String locationPhysicalType = location.getPhysicalType().getCoding().get(0).getCode(); + //String locationName = location.getLocationTarget().getName(); // todo: get Location from Reference + String locationName = location.getPhysicalType().getText(); + StandortCluster standortCluster = new StandortCluster(); + + if (locationName != null && !locationName.isEmpty()) { + + switch (locationPhysicalType) { + case "si": + standortCluster.setCampusValue(locationName); + break; + case "bu": + standortCluster.setGebaeudegruppeValue(locationName); + break; + case "lvl": + standortCluster.setEbeneValue(locationName); + break; + case "wa": + standortCluster.setStationValue(locationName); + break; + case "ro": + standortCluster.setZimmerValue(locationName); + break; + case "bd": + standortCluster.setBettplatzValue(locationName); + break; + default: // other types aren't needed by EHR Composition + throw new IllegalStateException("unexpected location physical type " + locationPhysicalType + + " by EHR composition."); + } + } + + /* TODO: get Location from Reference + if (location.getLocationTarget().getDescription() != null + && !location.getLocationTarget().getDescription().isEmpty()) { + + standortCluster.setZusaetzlicheBeschreibungValue(location.getLocationTarget().getDescription()); + }*/ + + versorgungsaufenthaltAdminEntry.setStandort(standortCluster); + + versorgungsaufenthaltAdminEntry.setKommentarValue(location.getLocation().getDisplay()); + } + + if (versorgungsaufenthaltAdminEntry.getFachlicheOrganisationseinheit() == null) { + versorgungsaufenthaltAdminEntry.setFachlicheOrganisationseinheit(new ArrayList<>()); + } + + if (encounter.getServiceType() != null + && encounter.getServiceType().getCoding() != null) { + + for(Coding fachAbteilungsSchluessel : encounter.getServiceType().getCoding()) { + + FachlicheOrganisationseinheitCluster fachlicheOrganisationseinheitCluster = new FachlicheOrganisationseinheitCluster(); + + if (fachAbteilungsSchluessel.getSystem().equals(FACH_ABTEILUNGS_SCHLUESSEL_CODE_SYSTEM) + && FachAbteilungsSchluesselDefiningCodeMap.getFachAbteilungsSchluesselMap().containsKey(fachAbteilungsSchluessel.getCode())) { + + fachlicheOrganisationseinheitCluster.setFachabteilungsschluesselDefiningCode(FachAbteilungsSchluesselDefiningCodeMap.getFachAbteilungsSchluesselMap().get(fachAbteilungsSchluessel.getCode())); + } else { + throw new IllegalStateException("Invalid Code " + fachAbteilungsSchluessel.getCode() + + " or Code System for 'Fachabteilungsschlüssel'."); + } + + versorgungsaufenthaltAdminEntry.getFachlicheOrganisationseinheit().add(fachlicheOrganisationseinheitCluster); + } + } + + retVal.setVersorgungsaufenthalt(versorgungsaufenthaltAdminEntry); + + return retVal; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallCompositionConverter.java new file mode 100644 index 000000000..96b8411ba --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallCompositionConverter.java @@ -0,0 +1,106 @@ +package org.ehrbase.fhirbridge.ehr.converter.specific.stationaererversorgungsfall; + +import com.nedap.archie.rm.generic.PartySelf; +import org.ehrbase.fhirbridge.ehr.converter.generic.EncounterToCompositionConverter; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.StationaererVersorgungsfallComposition; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.AufnahmedatenAdminEntry; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.EntlassungsdatenAdminEntry; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.FallstatusDefiningCode; +import org.ehrbase.fhirbridge.fhir.support.KontaktebeneDefiningCode; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.hl7.fhir.r4.model.Encounter; +import org.hl7.fhir.r4.model.Coding; +import org.springframework.lang.NonNull; + +import java.time.OffsetDateTime; + +public class StationaererVersorgungsfallCompositionConverter extends EncounterToCompositionConverter<StationaererVersorgungsfallComposition> { + + private final String AUFNAHME_GRUND_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund"; + private final String AUFNAHME_ANLASS_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass"; + private final String ART_DER_ENTLASSUNG_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund"; + + @Override + public StationaererVersorgungsfallComposition convertInternal(@NonNull Encounter encounter) { + + StationaererVersorgungsfallComposition retVal = new StationaererVersorgungsfallComposition(); + + retVal.setFalltypValue(KontaktebeneDefiningCode.EINRICHTUNGS_KONTAKT.getValue()); + + String fallClass = encounter.getClass_().getCode(); + if (fallClass.equals("normalstationaer") + || fallClass.equals("intensivstationaer")) { + + retVal.setFallklasseValue("Stationär"); + } + + retVal.setFallstatusDefiningCode(StationaererVersorgungsfallDefiningCodeMaps.getFallStatusMap().get(encounter.getStatus())); + retVal.setFallKennungValue(encounter.getIdentifier().get(0).getValue()); + + AufnahmedatenAdminEntry aufnahmedatenAdminEntry = new AufnahmedatenAdminEntry(); + + OffsetDateTime startDateTime = OffsetDateTime.from(encounter.getPeriod().getStartElement().getValueAsCalendar().toZonedDateTime()); + aufnahmedatenAdminEntry.setDatumUhrzeitDerAufnahmeValue(startDateTime); + + if (encounter.getReasonCode() != null + && encounter.getReasonCode().get(0).getCoding() != null) { + + Coding aufnahmeGrund = encounter.getReasonCode().get(0).getCoding().get(0); + if (aufnahmeGrund.getSystem().equals(AUFNAHME_GRUND_CODE_SYSTEM) + && StationaererVersorgungsfallDefiningCodeMaps.getAufnahmeGrundMap().containsKey(aufnahmeGrund.getCode())) { + + aufnahmedatenAdminEntry.setAufnahmegrundDefiningCode(StationaererVersorgungsfallDefiningCodeMaps.getAufnahmeGrundMap().get(aufnahmeGrund.getCode())); + } else { + throw new IllegalStateException("Invalid Code " + aufnahmeGrund.getCode() + + " or Code System for mapping of 'Aufnahmegrund', valid codes are: 01, 02, 03, 04, 05, 06, 07, 08, 10."); + } + } + + if (encounter.getHospitalization() != null + && encounter.getHospitalization().getAdmitSource() != null) { + + Coding aufnahmeAnlass = encounter.getHospitalization().getAdmitSource().getCoding().get(0); + + if (aufnahmeAnlass.getSystem().equals(AUFNAHME_ANLASS_CODE_SYSTEM) + && StationaererVersorgungsfallDefiningCodeMaps.getAufnahmeAnlassMap().containsKey(aufnahmeAnlass.getCode())) { + + aufnahmedatenAdminEntry.setAufnahmeanlassDefiningCode(StationaererVersorgungsfallDefiningCodeMaps.getAufnahmeAnlassMap().get(aufnahmeAnlass.getCode())); + } else { + throw new IllegalStateException("Invalid Code " + aufnahmeAnlass.getCode() + + " or Code System for mapping of 'Aufnahmeanlass', valid codes are: N, G, E, A, V, Z, B, R."); + } + } + aufnahmedatenAdminEntry.setSubject(new PartySelf()); + aufnahmedatenAdminEntry.setLanguage(Language.DE); + retVal.setAufnahmedaten(aufnahmedatenAdminEntry); + + if (encounter.getPeriod().hasEndElement()) { + + EntlassungsdatenAdminEntry entlassungsdatenAdminEntry = new EntlassungsdatenAdminEntry(); + + OffsetDateTime endDateTime = OffsetDateTime.from(encounter.getPeriod().getEndElement().getValueAsCalendar().toZonedDateTime()); + entlassungsdatenAdminEntry.setDatumUhrzeitDerEntlassungValue(endDateTime); + + if (encounter.getHospitalization() != null + && encounter.getHospitalization().getDischargeDisposition() != null) { + + Coding artDerEntlassung = encounter.getHospitalization().getDischargeDisposition().getCoding().get(0); + + if (artDerEntlassung.getSystem().equals(ART_DER_ENTLASSUNG_CODE_SYSTEM) + && StationaererVersorgungsfallDefiningCodeMaps.getArtDerEntlassungMap().containsKey(artDerEntlassung.getCode())) { + + entlassungsdatenAdminEntry.setArtDerEntlassungDefiningCode(StationaererVersorgungsfallDefiningCodeMaps.getArtDerEntlassungMap().get(artDerEntlassung.getCode())); + } else { + throw new IllegalStateException("Invalid Code " + artDerEntlassung.getCode() + + " or Code System for mapping of 'art der Entlassung'."); + } + } + + entlassungsdatenAdminEntry.setSubject(new PartySelf()); + entlassungsdatenAdminEntry.setLanguage(Language.DE); + retVal.setEntlassungsdaten(entlassungsdatenAdminEntry); + } + + return retVal; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallDefiningCodeMaps.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallDefiningCodeMaps.java new file mode 100644 index 000000000..8c0eb5890 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallDefiningCodeMaps.java @@ -0,0 +1,69 @@ +package org.ehrbase.fhirbridge.ehr.converter.specific.stationaererversorgungsfall; + +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.ArtDerEntlassungDefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.AufnahmeanlassDefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.AufnahmegrundDefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.FallstatusDefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.KlinischerZustandDesPatientenDefiningCode; + +import java.util.HashMap; +import java.util.Map; + + +class StationaererVersorgungsfallDefiningCodeMaps { + + private static final Map<String, AufnahmegrundDefiningCode> aufnahmeGrundMap = new HashMap<>(); + private static final Map<String, AufnahmeanlassDefiningCode> aufnahmeAnlassMap = new HashMap<>(); + private static final Map<String, ArtDerEntlassungDefiningCode> artDerEntlassungMap = new HashMap<>(); + private static final Map<String, KlinischerZustandDesPatientenDefiningCode> klinischerZustandMap = new HashMap<>(); + private static final Map<String, FallstatusDefiningCode> fallStatusMap = new HashMap<>(); + + static { + + for(AufnahmegrundDefiningCode aufnahmegrundDefiningCode : AufnahmegrundDefiningCode.values()) { + + aufnahmeGrundMap.put(aufnahmegrundDefiningCode.getCode(), aufnahmegrundDefiningCode); + } + + for(AufnahmeanlassDefiningCode aufnahmeanlassDefiningCode : AufnahmeanlassDefiningCode.values()) { + aufnahmeAnlassMap.put(aufnahmeanlassDefiningCode.getCode(), aufnahmeanlassDefiningCode); + } + + for(ArtDerEntlassungDefiningCode artDerEntlassungDefiningCode : ArtDerEntlassungDefiningCode.values()) { + artDerEntlassungMap.put(artDerEntlassungDefiningCode.getCode(), artDerEntlassungDefiningCode); + } + + for(KlinischerZustandDesPatientenDefiningCode klinischerZustandDesPatientenDefiningCode : KlinischerZustandDesPatientenDefiningCode.values()) { + klinischerZustandMap.put(klinischerZustandDesPatientenDefiningCode.getCode(), klinischerZustandDesPatientenDefiningCode); + } + + for(FallstatusDefiningCode fallstatusDefiningCode : FallstatusDefiningCode.values()) { + fallStatusMap.put(fallstatusDefiningCode.getCode(), fallstatusDefiningCode); + } + } + + static Map<String, AufnahmegrundDefiningCode> getAufnahmeGrundMap() { + + return aufnahmeGrundMap; + } + + static Map<String, AufnahmeanlassDefiningCode> getAufnahmeAnlassMap() { + + return aufnahmeAnlassMap; + } + + static Map<String, ArtDerEntlassungDefiningCode> getArtDerEntlassungMap() { + + return artDerEntlassungMap; + } + + static Map<String, KlinischerZustandDesPatientenDefiningCode> getKlinischerZustandMap() { + + return klinischerZustandMap; + } + + static Map<String, FallstatusDefiningCode> getFallStatusMap() { + + return fallStatusMap; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/PatientenaufenthaltComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/PatientenaufenthaltComposition.java new file mode 100644 index 000000000..1a4f8e265 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/PatientenaufenthaltComposition.java @@ -0,0 +1,262 @@ +package org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.generic.Participation; +import com.nedap.archie.rm.generic.PartyIdentified; +import com.nedap.archie.rm.generic.PartyProxy; +import java.lang.String; +import java.time.temporal.TemporalAccessor; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Id; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.annotations.Template; +import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; +import org.ehrbase.client.classgenerator.shareddefinition.Category; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.Setting; +import org.ehrbase.client.classgenerator.shareddefinition.Territory; +import org.ehrbase.client.openehrclient.VersionUid; +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.AbteilungsfallCluster; +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungsaufenthaltAdminEntry; +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungsfallCluster; +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungstellenkontaktCluster; +import org.ehrbase.fhirbridge.ehr.Composition; + +@Entity +@Archetype("openEHR-EHR-COMPOSITION.event_summary.v0") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-30T13:55:02.831966300+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +@Template("Patientenaufenthalt") +public class PatientenaufenthaltComposition implements CompositionEntity, Composition { + /** + * Path: Patientenaufenthalt/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Patientenaufenthalt/context/Versorgungsfall + * Description: Zur Erfassung von Details zur Identifikation eines Falls im Gesundheitswesen. + */ + @Path("/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.case_identification.v0 and name/value='Versorgungsfall']") + private VersorgungsfallCluster versorgungsfall; + + /** + * Path: Patientenaufenthalt/context/Abteilungsfall + * Description: Zur Erfassung von Details zur Identifikation eines Falls im Gesundheitswesen. + */ + @Path("/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.case_identification.v0 and name/value='Abteilungsfall']") + private AbteilungsfallCluster abteilungsfall; + + /** + * Path: Patientenaufenthalt/context/Versorgungstellenkontakt + * Description: Zur Erfassung von Details zur Identifikation eines Falls im Gesundheitswesen. + */ + @Path("/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.case_identification.v0 and name/value='Versorgungstellenkontakt']") + private VersorgungstellenkontaktCluster versorgungstellenkontakt; + + /** + * Path: Patientenaufenthalt/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Patientenaufenthalt/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Patientenaufenthalt/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Patientenaufenthalt/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Patientenaufenthalt/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Patientenaufenthalt/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt + * Description: Zur Erfassung der administrativen Aufenthaltsdaten eines Patienten. + */ + @Path("/content[openEHR-EHR-ADMIN_ENTRY.hospitalization.v0 and name/value='Versorgungsaufenthalt']") + private VersorgungsaufenthaltAdminEntry versorgungsaufenthalt; + + /** + * Path: Patientenaufenthalt/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Patientenaufenthalt/language + */ + @Path("/language") + private Language language; + + /** + * Path: Patientenaufenthalt/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Patientenaufenthalt/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode ; + } + + public void setVersorgungsfall(VersorgungsfallCluster versorgungsfall) { + this.versorgungsfall = versorgungsfall; + } + + public VersorgungsfallCluster getVersorgungsfall() { + return this.versorgungsfall ; + } + + public void setAbteilungsfall(AbteilungsfallCluster abteilungsfall) { + this.abteilungsfall = abteilungsfall; + } + + public AbteilungsfallCluster getAbteilungsfall() { + return this.abteilungsfall ; + } + + public void setVersorgungstellenkontakt( + VersorgungstellenkontaktCluster versorgungstellenkontakt) { + this.versorgungstellenkontakt = versorgungstellenkontakt; + } + + public VersorgungstellenkontaktCluster getVersorgungstellenkontakt() { + return this.versorgungstellenkontakt ; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue ; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public List<Participation> getParticipations() { + return this.participations ; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue ; + } + + public void setLocation(String location) { + this.location = location; + } + + public String getLocation() { + return this.location ; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility ; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode ; + } + + public void setVersorgungsaufenthalt(VersorgungsaufenthaltAdminEntry versorgungsaufenthalt) { + this.versorgungsaufenthalt = versorgungsaufenthalt; + } + + public VersorgungsaufenthaltAdminEntry getVersorgungsaufenthalt() { + return this.versorgungsaufenthalt ; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } + + public PartyProxy getComposer() { + return this.composer ; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public Language getLanguage() { + return this.language ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } + + public void setTerritory(Territory territory) { + this.territory = territory; + } + + public Territory getTerritory() { + return this.territory ; + } + + public VersionUid getVersionUid() { + return this.versionUid ; + } + + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/PatientenaufenthaltCompositionContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/PatientenaufenthaltCompositionContainment.java new file mode 100644 index 000000000..79b188c50 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/PatientenaufenthaltCompositionContainment.java @@ -0,0 +1,63 @@ +package org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.generic.Participation; +import com.nedap.archie.rm.generic.PartyIdentified; +import com.nedap.archie.rm.generic.PartyProxy; +import java.lang.String; +import java.time.temporal.TemporalAccessor; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.Category; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.Setting; +import org.ehrbase.client.classgenerator.shareddefinition.Territory; +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.AbteilungsfallCluster; +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungsaufenthaltAdminEntry; +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungsfallCluster; +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungstellenkontaktCluster; + +public class PatientenaufenthaltCompositionContainment extends Containment { + public SelectAqlField<PatientenaufenthaltComposition> PATIENTENAUFENTHALT_COMPOSITION = new AqlFieldImp<PatientenaufenthaltComposition>(PatientenaufenthaltComposition.class, "", "PatientenaufenthaltComposition", PatientenaufenthaltComposition.class, this); + + public SelectAqlField<Category> CATEGORY_DEFINING_CODE = new AqlFieldImp<Category>(PatientenaufenthaltComposition.class, "/category|defining_code", "categoryDefiningCode", Category.class, this); + + public SelectAqlField<VersorgungsfallCluster> VERSORGUNGSFALL = new AqlFieldImp<VersorgungsfallCluster>(PatientenaufenthaltComposition.class, "/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.case_identification.v0]", "versorgungsfall", VersorgungsfallCluster.class, this); + + public SelectAqlField<AbteilungsfallCluster> ABTEILUNGSFALL = new AqlFieldImp<AbteilungsfallCluster>(PatientenaufenthaltComposition.class, "/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.case_identification.v0]", "abteilungsfall", AbteilungsfallCluster.class, this); + + public SelectAqlField<VersorgungstellenkontaktCluster> VERSORGUNGSTELLENKONTAKT = new AqlFieldImp<VersorgungstellenkontaktCluster>(PatientenaufenthaltComposition.class, "/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.case_identification.v0]", "versorgungstellenkontakt", VersorgungstellenkontaktCluster.class, this); + + public SelectAqlField<TemporalAccessor> START_TIME_VALUE = new AqlFieldImp<TemporalAccessor>(PatientenaufenthaltComposition.class, "/context/start_time|value", "startTimeValue", TemporalAccessor.class, this); + + public ListSelectAqlField<Participation> PARTICIPATIONS = new ListAqlFieldImp<Participation>(PatientenaufenthaltComposition.class, "/context/participations", "participations", Participation.class, this); + + public SelectAqlField<TemporalAccessor> END_TIME_VALUE = new AqlFieldImp<TemporalAccessor>(PatientenaufenthaltComposition.class, "/context/end_time|value", "endTimeValue", TemporalAccessor.class, this); + + public SelectAqlField<String> LOCATION = new AqlFieldImp<String>(PatientenaufenthaltComposition.class, "/context/location", "location", String.class, this); + + public SelectAqlField<PartyIdentified> HEALTH_CARE_FACILITY = new AqlFieldImp<PartyIdentified>(PatientenaufenthaltComposition.class, "/context/health_care_facility", "healthCareFacility", PartyIdentified.class, this); + + public SelectAqlField<Setting> SETTING_DEFINING_CODE = new AqlFieldImp<Setting>(PatientenaufenthaltComposition.class, "/context/setting|defining_code", "settingDefiningCode", Setting.class, this); + + public SelectAqlField<VersorgungsaufenthaltAdminEntry> VERSORGUNGSAUFENTHALT = new AqlFieldImp<VersorgungsaufenthaltAdminEntry>(PatientenaufenthaltComposition.class, "/content[openEHR-EHR-ADMIN_ENTRY.hospitalization.v0]", "versorgungsaufenthalt", VersorgungsaufenthaltAdminEntry.class, this); + + public SelectAqlField<PartyProxy> COMPOSER = new AqlFieldImp<PartyProxy>(PatientenaufenthaltComposition.class, "/composer", "composer", PartyProxy.class, this); + + public SelectAqlField<Language> LANGUAGE = new AqlFieldImp<Language>(PatientenaufenthaltComposition.class, "/language", "language", Language.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(PatientenaufenthaltComposition.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + public SelectAqlField<Territory> TERRITORY = new AqlFieldImp<Territory>(PatientenaufenthaltComposition.class, "/territory", "territory", Territory.class, this); + + private PatientenaufenthaltCompositionContainment() { + super("openEHR-EHR-COMPOSITION.event_summary.v0"); + } + + public static PatientenaufenthaltCompositionContainment getInstance() { + return new PatientenaufenthaltCompositionContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/AbteilungsfallCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/AbteilungsfallCluster.java new file mode 100644 index 000000000..3089dc73a --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/AbteilungsfallCluster.java @@ -0,0 +1,64 @@ +package org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import java.lang.String; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.LocatableEntity; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Archetype("openEHR-EHR-CLUSTER.case_identification.v0") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-30T13:55:02.865969600+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +public class AbteilungsfallCluster implements LocatableEntity { + /** + * Path: Patientenaufenthalt/context/Abteilungsfall/Zugehöriger Abteilungsfall (Kennung) + * Description: Der Bezeichner/die Kennung dieses Falls. + */ + @Path("/items[at0001 and name/value='Zugehöriger Abteilungsfall (Kennung)']/value|value") + private String zugehoerigerAbteilungsfallKennungValue; + + /** + * Path: Patientenaufenthalt/context/Tree/Abteilungsfall/Zugehöriger Abteilungsfall (Kennung)/null_flavour + */ + @Path("/items[at0001 and name/value='Zugehöriger Abteilungsfall (Kennung)']/null_flavour|defining_code") + private NullFlavour zugehoerigerAbteilungsfallKennungNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/context/Abteilungsfall/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setZugehoerigerAbteilungsfallKennungValue( + String zugehoerigerAbteilungsfallKennungValue) { + this.zugehoerigerAbteilungsfallKennungValue = zugehoerigerAbteilungsfallKennungValue; + } + + public String getZugehoerigerAbteilungsfallKennungValue() { + return this.zugehoerigerAbteilungsfallKennungValue ; + } + + public void setZugehoerigerAbteilungsfallKennungNullFlavourDefiningCode( + NullFlavour zugehoerigerAbteilungsfallKennungNullFlavourDefiningCode) { + this.zugehoerigerAbteilungsfallKennungNullFlavourDefiningCode = zugehoerigerAbteilungsfallKennungNullFlavourDefiningCode; + } + + public NullFlavour getZugehoerigerAbteilungsfallKennungNullFlavourDefiningCode() { + return this.zugehoerigerAbteilungsfallKennungNullFlavourDefiningCode ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/AbteilungsfallClusterContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/AbteilungsfallClusterContainment.java new file mode 100644 index 000000000..c111fb5bc --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/AbteilungsfallClusterContainment.java @@ -0,0 +1,26 @@ +package org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import java.lang.String; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +public class AbteilungsfallClusterContainment extends Containment { + public SelectAqlField<AbteilungsfallCluster> ABTEILUNGSFALL_CLUSTER = new AqlFieldImp<AbteilungsfallCluster>(AbteilungsfallCluster.class, "", "AbteilungsfallCluster", AbteilungsfallCluster.class, this); + + public SelectAqlField<String> ZUGEHOERIGER_ABTEILUNGSFALL_KENNUNG_VALUE = new AqlFieldImp<String>(AbteilungsfallCluster.class, "/items[at0001]/value|value", "zugehoerigerAbteilungsfallKennungValue", String.class, this); + + public SelectAqlField<NullFlavour> ZUGEHOERIGER_ABTEILUNGSFALL_KENNUNG_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(AbteilungsfallCluster.class, "/items[at0001]/null_flavour|defining_code", "zugehoerigerAbteilungsfallKennungNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(AbteilungsfallCluster.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + private AbteilungsfallClusterContainment() { + super("openEHR-EHR-CLUSTER.case_identification.v0"); + } + + public static AbteilungsfallClusterContainment getInstance() { + return new AbteilungsfallClusterContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/DetailsZumBettCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/DetailsZumBettCluster.java new file mode 100644 index 000000000..3faf73504 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/DetailsZumBettCluster.java @@ -0,0 +1,208 @@ +package org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.datavalues.DvIdentifier; +import java.lang.String; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.LocatableEntity; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Archetype("openEHR-EHR-CLUSTER.device.v1") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-30T13:55:02.913971900+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +public class DetailsZumBettCluster implements LocatableEntity { + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Standort/Details zum Bett/Gerätename + * Description: Identifizierung des Medizingerätes, bevorzugt durch einen allgemein + * gebräuchlichen Namen, einer formellen und vollständig beschreibenden Bezeichnung oder falls notwendig anhand einer Klasse oder Kategorie des Gerätes. + * Comment: Dieses Datenelement erfasst den Begriff, die Phrase oder die Kategorie, die in der klinischen Praxis verwendet werden. Zum Beispiel: <Markenname> <Maschine> (XYZ-Audiometer); <Markenname> (14G Jelco IV-Katheter); oder <Markenname / Typ> <Implantat>. Die Codierung mit einer Terminologie ist nach Möglichkeit wünschenswert, auch wenn dies lokal sein kann und von den verfügbaren lokalen Lieferungen abhängt. + */ + @Path("/items[at0001]/value|value") + private String geraetenameValue; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Baum/Standort/Details zum Bett/Gerätename/null_flavour + */ + @Path("/items[at0001]/null_flavour|defining_code") + private NullFlavour geraetenameNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Standort/Details zum Bett/Gerätetyp + * Description: Die Kategorie des Medizingeräts. + * Comment: Nicht zutreffend, wenn eine Kategorie bereits unter "Gerätename" dokumentiert ist. + * Beispiel: Wenn das 'Gerät' als 'Harnkatheter' bezeichnet wird; der 'Typ' kann als 'Verweilkatheter' oder 'Kondom' aufgezeichnet werden. Die Codierung mit einer Terminologie ist wünschenswert, sofern dies möglich ist. Dies kann die Verwendung von GTIN- oder EAN-Nummern einschließen. + */ + @Path("/items[at0003]/value|value") + private String geraetetypValue; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Baum/Standort/Details zum Bett/Gerätetyp/null_flavour + */ + @Path("/items[at0003]/null_flavour|defining_code") + private NullFlavour geraetetypNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Standort/Details zum Bett/Eigenschaften + * Description: Weitere Details zu bestimmten Eigenschaften des Medizingerätes. + */ + @Path("/items[at0009]") + private List<Cluster> eigenschaften; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Standort/Details zum Bett/Eindeutige Identifikationsnummer (ID) + * Description: Eine numerische oder alphanumerische Zeichenfolge, die diesem Gerät in einem bestimmten System zugeordnet ist. + * Comment: Oft als Barcode am Gerät befestigt. + */ + @Path("/items[at0021]/value") + private DvIdentifier eindeutigeIdentifikationsnummerId; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Baum/Standort/Details zum Bett/Eindeutige Identifikationsnummer (ID)/null_flavour + */ + @Path("/items[at0021]/null_flavour|defining_code") + private NullFlavour eindeutigeIdentifikationsnummerIdNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Standort/Details zum Bett/Geräteverwaltung + * Description: Weitere Details zur Verwaltung und Wartung des Geräts. + * Comment: Zum Beispiel: Eigentümer, Kontaktdaten, Standort, Netzwerkadresse, Ersetzungsdatum, Kalibrierungsdetails usw. + */ + @Path("/items[at0019]") + private List<Cluster> geraeteverwaltung; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Standort/Details zum Bett/Komponenten + * Description: Zusätzliche strukturierte Informationen zu identifizierten Komponenten des Geräts. + */ + @Path("/items[at0018]") + private List<Cluster> komponenten; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Standort/Details zum Bett/Erweiterung + * Description: Zusätzliche Informationen, die zur Erfassung des lokalen Kontexts oder + * zur Angleichung an andere Referenzmodelle/Formalismen erforderlich sind. + */ + @Path("/items[at0026]") + private List<Cluster> erweiterung; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Standort/Details zum Bett/Multimedia + * Description: Digitale Repräsentation des Gerätes. + * Comment: Zum Beispiel: ein technisches Diagramm eines Geräts oder ein digitales Bild. + */ + @Path("/items[at0027]") + private List<Cluster> multimedia; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Standort/Details zum Bett/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setGeraetenameValue(String geraetenameValue) { + this.geraetenameValue = geraetenameValue; + } + + public String getGeraetenameValue() { + return this.geraetenameValue ; + } + + public void setGeraetenameNullFlavourDefiningCode( + NullFlavour geraetenameNullFlavourDefiningCode) { + this.geraetenameNullFlavourDefiningCode = geraetenameNullFlavourDefiningCode; + } + + public NullFlavour getGeraetenameNullFlavourDefiningCode() { + return this.geraetenameNullFlavourDefiningCode ; + } + + public void setGeraetetypValue(String geraetetypValue) { + this.geraetetypValue = geraetetypValue; + } + + public String getGeraetetypValue() { + return this.geraetetypValue ; + } + + public void setGeraetetypNullFlavourDefiningCode(NullFlavour geraetetypNullFlavourDefiningCode) { + this.geraetetypNullFlavourDefiningCode = geraetetypNullFlavourDefiningCode; + } + + public NullFlavour getGeraetetypNullFlavourDefiningCode() { + return this.geraetetypNullFlavourDefiningCode ; + } + + public void setEigenschaften(List<Cluster> eigenschaften) { + this.eigenschaften = eigenschaften; + } + + public List<Cluster> getEigenschaften() { + return this.eigenschaften ; + } + + public void setEindeutigeIdentifikationsnummerId(DvIdentifier eindeutigeIdentifikationsnummerId) { + this.eindeutigeIdentifikationsnummerId = eindeutigeIdentifikationsnummerId; + } + + public DvIdentifier getEindeutigeIdentifikationsnummerId() { + return this.eindeutigeIdentifikationsnummerId ; + } + + public void setEindeutigeIdentifikationsnummerIdNullFlavourDefiningCode( + NullFlavour eindeutigeIdentifikationsnummerIdNullFlavourDefiningCode) { + this.eindeutigeIdentifikationsnummerIdNullFlavourDefiningCode = eindeutigeIdentifikationsnummerIdNullFlavourDefiningCode; + } + + public NullFlavour getEindeutigeIdentifikationsnummerIdNullFlavourDefiningCode() { + return this.eindeutigeIdentifikationsnummerIdNullFlavourDefiningCode ; + } + + public void setGeraeteverwaltung(List<Cluster> geraeteverwaltung) { + this.geraeteverwaltung = geraeteverwaltung; + } + + public List<Cluster> getGeraeteverwaltung() { + return this.geraeteverwaltung ; + } + + public void setKomponenten(List<Cluster> komponenten) { + this.komponenten = komponenten; + } + + public List<Cluster> getKomponenten() { + return this.komponenten ; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung ; + } + + public void setMultimedia(List<Cluster> multimedia) { + this.multimedia = multimedia; + } + + public List<Cluster> getMultimedia() { + return this.multimedia ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/DetailsZumBettClusterContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/DetailsZumBettClusterContainment.java new file mode 100644 index 000000000..cbb5fe75a --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/DetailsZumBettClusterContainment.java @@ -0,0 +1,48 @@ +package org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.datavalues.DvIdentifier; +import java.lang.String; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +public class DetailsZumBettClusterContainment extends Containment { + public SelectAqlField<DetailsZumBettCluster> DETAILS_ZUM_BETT_CLUSTER = new AqlFieldImp<DetailsZumBettCluster>(DetailsZumBettCluster.class, "", "DetailsZumBettCluster", DetailsZumBettCluster.class, this); + + public SelectAqlField<String> GERAETENAME_VALUE = new AqlFieldImp<String>(DetailsZumBettCluster.class, "/items[at0001]/value|value", "geraetenameValue", String.class, this); + + public SelectAqlField<NullFlavour> GERAETENAME_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(DetailsZumBettCluster.class, "/items[at0001]/null_flavour|defining_code", "geraetenameNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> GERAETETYP_VALUE = new AqlFieldImp<String>(DetailsZumBettCluster.class, "/items[at0003]/value|value", "geraetetypValue", String.class, this); + + public SelectAqlField<NullFlavour> GERAETETYP_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(DetailsZumBettCluster.class, "/items[at0003]/null_flavour|defining_code", "geraetetypNullFlavourDefiningCode", NullFlavour.class, this); + + public ListSelectAqlField<Cluster> EIGENSCHAFTEN = new ListAqlFieldImp<Cluster>(DetailsZumBettCluster.class, "/items[at0009]", "eigenschaften", Cluster.class, this); + + public SelectAqlField<DvIdentifier> EINDEUTIGE_IDENTIFIKATIONSNUMMER_ID = new AqlFieldImp<DvIdentifier>(DetailsZumBettCluster.class, "/items[at0021]/value", "eindeutigeIdentifikationsnummerId", DvIdentifier.class, this); + + public SelectAqlField<NullFlavour> EINDEUTIGE_IDENTIFIKATIONSNUMMER_ID_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(DetailsZumBettCluster.class, "/items[at0021]/null_flavour|defining_code", "eindeutigeIdentifikationsnummerIdNullFlavourDefiningCode", NullFlavour.class, this); + + public ListSelectAqlField<Cluster> GERAETEVERWALTUNG = new ListAqlFieldImp<Cluster>(DetailsZumBettCluster.class, "/items[at0019]", "geraeteverwaltung", Cluster.class, this); + + public ListSelectAqlField<Cluster> KOMPONENTEN = new ListAqlFieldImp<Cluster>(DetailsZumBettCluster.class, "/items[at0018]", "komponenten", Cluster.class, this); + + public ListSelectAqlField<Cluster> ERWEITERUNG = new ListAqlFieldImp<Cluster>(DetailsZumBettCluster.class, "/items[at0026]", "erweiterung", Cluster.class, this); + + public ListSelectAqlField<Cluster> MULTIMEDIA = new ListAqlFieldImp<Cluster>(DetailsZumBettCluster.class, "/items[at0027]", "multimedia", Cluster.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(DetailsZumBettCluster.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + private DetailsZumBettClusterContainment() { + super("openEHR-EHR-CLUSTER.device.v1"); + } + + public static DetailsZumBettClusterContainment getInstance() { + return new DetailsZumBettClusterContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/FachabteilungsschluesselDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/FachabteilungsschluesselDefiningCode.java new file mode 100644 index 000000000..b094960c4 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/FachabteilungsschluesselDefiningCode.java @@ -0,0 +1,116 @@ +package org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition; + +import java.lang.String; +import org.ehrbase.client.classgenerator.EnumValueSet; + +public enum FachabteilungsschluesselDefiningCode implements EnumValueSet { + NUKLEARMEDIZIN("Nuklearmedizin", "", "Anhang 1 der BPflV (31.12.2003)", "3200"), + + PADIATRIE("Padiatrie", "", "Anhang 1 der BPflV (31.12.2003)", "1000"), + + KINDERKARDIOLOGIE("Kinderkardiologie", "", "Anhang 1 der BPflV (31.12.2003)", "1100"), + + UROLOGIE("Urologie", "", "Anhang 1 der BPflV (31.12.2003)", "2200"), + + STRAHLENHEILKUNDE("Strahlenheilkunde", "", "Anhang 1 der BPflV (31.12.2003)", "3300"), + + GASTROENTEROLOGIE("Gastroenterologie", "", "Anhang 1 der BPflV (31.12.2003)", "0700"), + + ZAHN_UND_KIEFERHEILKUNDE_MUND_UND_KIEFERCHIRURGIE("Zahn- und Kieferheilkunde, Mund- und Kieferchirurgie", "", "Anhang 1 der BPflV (31.12.2003)", "3500"), + + UNFALLCHIRURGIE("Unfallchirurgie", "", "Anhang 1 der BPflV (31.12.2003)", "1600"), + + SONSTIGE_FACHABTEILUNG("Sonstige Fachabteilung", "", "Anhang 1 der BPflV (31.12.2003)", "3700"), + + GERIATRIE("Geriatrie", "", "Anhang 1 der BPflV (31.12.2003)", "0200"), + + ALLGEMEINE_PSYCHIATRIE("Allgemeine Psychiatrie", "", "Anhang 1 der BPflV (31.12.2003)", "2900"), + + HALS_NASEN_OHRENHEILKUNDE("Hals-, Nasen-, Ohrenheilkunde", "", "Anhang 1 der BPflV (31.12.2003)", "2600"), + + ORTHOPADIE_UND_UNFALLCHIRURGIE("Orthopadie und Unfallchirurgie", "", "Anhang 1 der BPflV (31.12.2003)", "2316"), + + ALLGEMEINE_CHIRURGIE("Allgemeine Chirurgie", "", "Anhang 1 der BPflV (31.12.2003)", "1500"), + + THORAXCHIRURGIE("Thoraxchirurgie", "", "Anhang 1 der BPflV (31.12.2003)", "2000"), + + KINDER_UND_JUGENDPSYCHIATRIE("Kinder- und Jugendpsychiatrie", "", "Anhang 1 der BPflV (31.12.2003)", "3000"), + + NEONATOLOGIE("Neonatologie", "", "Anhang 1 der BPflV (31.12.2003)", "1200"), + + GEFA_CHIRURGIE("Gefa.chirurgie", "", "Anhang 1 der BPflV (31.12.2003)", "1800"), + + NEPHROLOGIE("Nephrologie", "", "Anhang 1 der BPflV (31.12.2003)", "0400"), + + PSYCHOSOMATIK_PSYCHOTHERAPIE("Psychosomatik/Psychotherapie", "", "Anhang 1 der BPflV (31.12.2003)", "3100"), + + FRAUENHEILKUNDE("Frauenheilkunde", "", "Anhang 1 der BPflV (31.12.2003)", "2425"), + + ORTHOPADIE("Orthopadie", "", "Anhang 1 der BPflV (31.12.2003)", "2300"), + + PNEUMOLOGIE("Pneumologie", "", "Anhang 1 der BPflV (31.12.2003)", "0800"), + + NEUROLOGIE("Neurologie", "", "Anhang 1 der BPflV (31.12.2003)", "2800"), + + HAMATOLOGIE_UND_INTERNISTISCHE_ONKOLOGIE("Hamatologie und internistische Onkologie", "", "Anhang 1 der BPflV (31.12.2003)", "0500"), + + GEBURTSHILFE("Geburtshilfe", "", "Anhang 1 der BPflV (31.12.2003)", "2500"), + + INNERE_MEDIZIN("Innere Medizin", "", "Anhang 1 der BPflV (31.12.2003)", "0100"), + + KARDIOLOGIE("Kardiologie", "", "Anhang 1 der BPflV (31.12.2003)", "0300"), + + PLASTISCHE_CHIRURGIE("Plastische Chirurgie", "", "Anhang 1 der BPflV (31.12.2003)", "1900"), + + KINDERCHIRURGIE("Kinderchirurgie", "", "Anhang 1 der BPflV (31.12.2003)", "1300"), + + HERZCHIRURGIE("Herzchirurgie", "", "Anhang 1 der BPflV (31.12.2003)", "2100"), + + ENDOKRINOLOGIE("Endokrinologie", "", "Anhang 1 der BPflV (31.12.2003)", "0600"), + + RHEUMATOLOGIE("Rheumatologie", "", "Anhang 1 der BPflV (31.12.2003)", "0900"), + + INTENSIVMEDIZIN("Intensivmedizin", "", "Anhang 1 der BPflV (31.12.2003)", "3600"), + + AUGENHEILKUNDE("Augenheilkunde", "", "Anhang 1 der BPflV (31.12.2003)", "2700"), + + NEUROCHIRURGIE("Neurochirurgie", "", "Anhang 1 der BPflV (31.12.2003)", "1700"), + + LUNGEN_UND_BRONCHIALHEILKUNDE("Lungen- und Bronchialheilkunde", "", "Anhang 1 der BPflV (31.12.2003)", "1400"), + + DERMATOLOGIE("Dermatologie", "", "Anhang 1 der BPflV (31.12.2003)", "3400"), + + FRAUENHEILKUNDE_UND_GEBURTSHILFE("Frauenheilkunde und Geburtshilfe", "", "Anhang 1 der BPflV (31.12.2003)", "2400"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + FachabteilungsschluesselDefiningCode(String value, String description, String terminologyId, + String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/FachlicheOrganisationseinheitCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/FachlicheOrganisationseinheitCluster.java new file mode 100644 index 000000000..183c14b2d --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/FachlicheOrganisationseinheitCluster.java @@ -0,0 +1,201 @@ +package org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import java.lang.Boolean; +import java.lang.String; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.LocatableEntity; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Archetype("openEHR-EHR-CLUSTER.organization.v0") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-30T13:55:02.927966100+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +public class FachlicheOrganisationseinheitCluster implements LocatableEntity { + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Fachliche Organisationseinheit/Typ + * Description: Art der Organisationseinheit. + * Comment: Zum Beispiel: Fachabteilung im Krankenhaus, Versicherungsunternehmen, Sponsor + */ + @Path("/items[at0051]/value|value") + private String typValue; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Baum/Fachliche Organisationseinheit/Typ/null_flavour + */ + @Path("/items[at0051]/null_flavour|defining_code") + private NullFlavour typNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Fachliche Organisationseinheit/Fachabteilungsschlüssel + * Description: Eindeutiger Identifikator der Organisationseinheit. + */ + @Path("/items[at0024 and name/value='Fachabteilungsschlüssel']/value|defining_code") + private FachabteilungsschluesselDefiningCode fachabteilungsschluesselDefiningCode; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Baum/Fachliche Organisationseinheit/Fachabteilungsschlüssel/null_flavour + */ + @Path("/items[at0024 and name/value='Fachabteilungsschlüssel']/null_flavour|defining_code") + private NullFlavour fachabteilungsschluesselNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Fachliche Organisationseinheit/Name + * Description: Bezeichnung für die Organisationseinheit + */ + @Path("/items[at0052]/value|value") + private String nameValue; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Baum/Fachliche Organisationseinheit/Name/null_flavour + */ + @Path("/items[at0052]/null_flavour|defining_code") + private NullFlavour nameNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Fachliche Organisationseinheit/Aktiv/Inaktiv + * Description: Gibt an, ob die Organisationseinheit noch aktiv ist. + */ + @Path("/items[at0050]/value|value") + private Boolean aktivInaktivValue; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Baum/Fachliche Organisationseinheit/Aktiv/Inaktiv/null_flavour + */ + @Path("/items[at0050]/null_flavour|defining_code") + private NullFlavour aktivInaktivNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Fachliche Organisationseinheit/Zusätzliche Beschreibung + * Description: Zusätzliche Informationen + */ + @Path("/items[at0046]/value|value") + private String zusaetzlicheBeschreibungValue; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Baum/Fachliche Organisationseinheit/Zusätzliche Beschreibung/null_flavour + */ + @Path("/items[at0046]/null_flavour|defining_code") + private NullFlavour zusaetzlicheBeschreibungNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Fachliche Organisationseinheit/Details + * Description: Für die Erfassung weiterer Angaben über die Organisationseinheit, zum Beispiel Adresse oder Telekommunikationsdetails. + */ + @Path("/items[at0047]") + private List<Cluster> details; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Fachliche Organisationseinheit/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setTypValue(String typValue) { + this.typValue = typValue; + } + + public String getTypValue() { + return this.typValue ; + } + + public void setTypNullFlavourDefiningCode(NullFlavour typNullFlavourDefiningCode) { + this.typNullFlavourDefiningCode = typNullFlavourDefiningCode; + } + + public NullFlavour getTypNullFlavourDefiningCode() { + return this.typNullFlavourDefiningCode ; + } + + public void setFachabteilungsschluesselDefiningCode( + FachabteilungsschluesselDefiningCode fachabteilungsschluesselDefiningCode) { + this.fachabteilungsschluesselDefiningCode = fachabteilungsschluesselDefiningCode; + } + + public FachabteilungsschluesselDefiningCode getFachabteilungsschluesselDefiningCode() { + return this.fachabteilungsschluesselDefiningCode ; + } + + public void setFachabteilungsschluesselNullFlavourDefiningCode( + NullFlavour fachabteilungsschluesselNullFlavourDefiningCode) { + this.fachabteilungsschluesselNullFlavourDefiningCode = fachabteilungsschluesselNullFlavourDefiningCode; + } + + public NullFlavour getFachabteilungsschluesselNullFlavourDefiningCode() { + return this.fachabteilungsschluesselNullFlavourDefiningCode ; + } + + public void setNameValue(String nameValue) { + this.nameValue = nameValue; + } + + public String getNameValue() { + return this.nameValue ; + } + + public void setNameNullFlavourDefiningCode(NullFlavour nameNullFlavourDefiningCode) { + this.nameNullFlavourDefiningCode = nameNullFlavourDefiningCode; + } + + public NullFlavour getNameNullFlavourDefiningCode() { + return this.nameNullFlavourDefiningCode ; + } + + public void setAktivInaktivValue(Boolean aktivInaktivValue) { + this.aktivInaktivValue = aktivInaktivValue; + } + + public Boolean isAktivInaktivValue() { + return this.aktivInaktivValue ; + } + + public void setAktivInaktivNullFlavourDefiningCode( + NullFlavour aktivInaktivNullFlavourDefiningCode) { + this.aktivInaktivNullFlavourDefiningCode = aktivInaktivNullFlavourDefiningCode; + } + + public NullFlavour getAktivInaktivNullFlavourDefiningCode() { + return this.aktivInaktivNullFlavourDefiningCode ; + } + + public void setZusaetzlicheBeschreibungValue(String zusaetzlicheBeschreibungValue) { + this.zusaetzlicheBeschreibungValue = zusaetzlicheBeschreibungValue; + } + + public String getZusaetzlicheBeschreibungValue() { + return this.zusaetzlicheBeschreibungValue ; + } + + public void setZusaetzlicheBeschreibungNullFlavourDefiningCode( + NullFlavour zusaetzlicheBeschreibungNullFlavourDefiningCode) { + this.zusaetzlicheBeschreibungNullFlavourDefiningCode = zusaetzlicheBeschreibungNullFlavourDefiningCode; + } + + public NullFlavour getZusaetzlicheBeschreibungNullFlavourDefiningCode() { + return this.zusaetzlicheBeschreibungNullFlavourDefiningCode ; + } + + public void setDetails(List<Cluster> details) { + this.details = details; + } + + public List<Cluster> getDetails() { + return this.details ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/FachlicheOrganisationseinheitClusterContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/FachlicheOrganisationseinheitClusterContainment.java new file mode 100644 index 000000000..01ecbc9ff --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/FachlicheOrganisationseinheitClusterContainment.java @@ -0,0 +1,48 @@ +package org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import java.lang.Boolean; +import java.lang.String; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +public class FachlicheOrganisationseinheitClusterContainment extends Containment { + public SelectAqlField<FachlicheOrganisationseinheitCluster> FACHLICHE_ORGANISATIONSEINHEIT_CLUSTER = new AqlFieldImp<FachlicheOrganisationseinheitCluster>(FachlicheOrganisationseinheitCluster.class, "", "FachlicheOrganisationseinheitCluster", FachlicheOrganisationseinheitCluster.class, this); + + public SelectAqlField<String> TYP_VALUE = new AqlFieldImp<String>(FachlicheOrganisationseinheitCluster.class, "/items[at0051]/value|value", "typValue", String.class, this); + + public SelectAqlField<NullFlavour> TYP_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(FachlicheOrganisationseinheitCluster.class, "/items[at0051]/null_flavour|defining_code", "typNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<FachabteilungsschluesselDefiningCode> FACHABTEILUNGSSCHLUESSEL_DEFINING_CODE = new AqlFieldImp<FachabteilungsschluesselDefiningCode>(FachlicheOrganisationseinheitCluster.class, "/items[at0024]/value|defining_code", "fachabteilungsschluesselDefiningCode", FachabteilungsschluesselDefiningCode.class, this); + + public SelectAqlField<NullFlavour> FACHABTEILUNGSSCHLUESSEL_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(FachlicheOrganisationseinheitCluster.class, "/items[at0024]/null_flavour|defining_code", "fachabteilungsschluesselNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> NAME_VALUE = new AqlFieldImp<String>(FachlicheOrganisationseinheitCluster.class, "/items[at0052]/value|value", "nameValue", String.class, this); + + public SelectAqlField<NullFlavour> NAME_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(FachlicheOrganisationseinheitCluster.class, "/items[at0052]/null_flavour|defining_code", "nameNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<Boolean> AKTIV_INAKTIV_VALUE = new AqlFieldImp<Boolean>(FachlicheOrganisationseinheitCluster.class, "/items[at0050]/value|value", "aktivInaktivValue", Boolean.class, this); + + public SelectAqlField<NullFlavour> AKTIV_INAKTIV_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(FachlicheOrganisationseinheitCluster.class, "/items[at0050]/null_flavour|defining_code", "aktivInaktivNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> ZUSAETZLICHE_BESCHREIBUNG_VALUE = new AqlFieldImp<String>(FachlicheOrganisationseinheitCluster.class, "/items[at0046]/value|value", "zusaetzlicheBeschreibungValue", String.class, this); + + public SelectAqlField<NullFlavour> ZUSAETZLICHE_BESCHREIBUNG_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(FachlicheOrganisationseinheitCluster.class, "/items[at0046]/null_flavour|defining_code", "zusaetzlicheBeschreibungNullFlavourDefiningCode", NullFlavour.class, this); + + public ListSelectAqlField<Cluster> DETAILS = new ListAqlFieldImp<Cluster>(FachlicheOrganisationseinheitCluster.class, "/items[at0047]", "details", Cluster.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(FachlicheOrganisationseinheitCluster.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + private FachlicheOrganisationseinheitClusterContainment() { + super("openEHR-EHR-CLUSTER.organization.v0"); + } + + public static FachlicheOrganisationseinheitClusterContainment getInstance() { + return new FachlicheOrganisationseinheitClusterContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/StandortCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/StandortCluster.java new file mode 100644 index 000000000..fc6ca46f6 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/StandortCluster.java @@ -0,0 +1,274 @@ +package org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import java.lang.String; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.LocatableEntity; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Archetype("openEHR-EHR-CLUSTER.location.v1") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-30T13:55:02.901970500+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +public class StandortCluster implements LocatableEntity { + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Standort/Campus + * Description: Eine Gruppe von Gebäuden an anderen Orten, wie ein örtlich entfernter Campus, der außerhalb der Einrichtung liegt, aber zur Institution gehört. + */ + @Path("/items[at0024]/value|value") + private String campusValue; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Baum/Standort/Campus/null_flavour + */ + @Path("/items[at0024]/null_flavour|defining_code") + private NullFlavour campusNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Standort/Gebäudegruppe + * Description: Ein Gebäude oder Bauwerk. Dazu können Räume, Flure, Flügel, etc. gehören. Es hat möglicherweise keine Wände oder ein Dach, wird aber dennoch als definierter/zugeordneter Raum angesehen. + */ + @Path("/items[at0025]/value|value") + private String gebaeudegruppeValue; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Baum/Standort/Gebäudegruppe/null_flavour + */ + @Path("/items[at0025]/null_flavour|defining_code") + private NullFlavour gebaeudegruppeNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Standort/Ebene + * Description: Die Ebene in einem mehrstöckigen Gebäude/Bauwerk. + */ + @Path("/items[at0028]/value|value") + private String ebeneValue; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Baum/Standort/Ebene/null_flavour + */ + @Path("/items[at0028]/null_flavour|defining_code") + private NullFlavour ebeneNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Standort/Station + * Description: Eine Station ist Teil einer medizinischen Einrichtung, die Räume und andere Arten von Orten enthalten kann. + */ + @Path("/items[at0027]/value|value") + private String stationValue; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Baum/Standort/Station/null_flavour + */ + @Path("/items[at0027]/null_flavour|defining_code") + private NullFlavour stationNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Standort/Zimmer + * Description: Ein Ort, der als Zimmer deklariert wurde. Bei einigen Standorten kann das Zimmer im Flur liegen zB: Station XYZ Flur 2. Hierbei liegt der Bettstellplatz 2 auf dem Flur der jeweiligen Station. + */ + @Path("/items[at0029]/value|value") + private String zimmerValue; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Baum/Standort/Zimmer/null_flavour + */ + @Path("/items[at0029]/null_flavour|defining_code") + private NullFlavour zimmerNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Standort/Bettplatz + * Description: Beschreibung des Bettstellplatzes z.B. Bett stand neben dem Fenster oder neben der Tür. + */ + @Path("/items[at0034 and name/value='Bettplatz']/value|value") + private String bettplatzValue; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Baum/Standort/Bettplatz/null_flavour + */ + @Path("/items[at0034 and name/value='Bettplatz']/null_flavour|defining_code") + private NullFlavour bettplatzNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Standort/Zusätzliche Beschreibung + * Description: Das Feld enthält die Freitextbeschreibung des Standorts, z.B. Throax-, Herz- und Gefäßchirurgie. + */ + @Path("/items[at0046]/value|value") + private String zusaetzlicheBeschreibungValue; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Baum/Standort/Zusätzliche Beschreibung/null_flavour + */ + @Path("/items[at0046]/null_flavour|defining_code") + private NullFlavour zusaetzlicheBeschreibungNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Standort/Details zum Bett + * Description: Ein Instrument, ein Gerät, ein Implantat, ein Material oder ähnliches, das für die Bereitstellung von Gesundheitsleistungen verwendet wird. In diesem Zusammenhang umfasst ein medizinisches Gerät eine breite Palette von Geräten, die auf verschiedene physikalische, mechanische, thermische oder ähnliche Weise wirken, schließt jedoch insbesondere Geräte aus, die auf medizinischem Wege wirken, wie zum Beispiel pharmakologische, metabolische oder immunologische Methoden. Der Geltungsbereich umfasst + * Einweggeräte sowie langlebige oder dauerhafte Geräte, die nachverfolgt, + * gewartet oder regelmäßig kalibriert werden müssen, wobei zu berücksichtigen ist, dass für jeden Gerätetyp bestimmte Datenaufzeichnungsanforderungen gelten. + */ + @Path("/items[openEHR-EHR-CLUSTER.device.v1 and name/value='Details zum Bett']") + private DetailsZumBettCluster detailsZumBett; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Standort/Leitende Organisationseinheit + * Description: Organisation, die für die Bereitstellung und Instandhaltung verantwortlich ist + * + * Die Organisation, die für die Bereitstellung und den Unterhalt des Standorts verantwortlich ist. + */ + @Path("/items[at0049]") + private List<Cluster> leitendeOrganisationseinheit; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Standort/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setCampusValue(String campusValue) { + this.campusValue = campusValue; + } + + public String getCampusValue() { + return this.campusValue ; + } + + public void setCampusNullFlavourDefiningCode(NullFlavour campusNullFlavourDefiningCode) { + this.campusNullFlavourDefiningCode = campusNullFlavourDefiningCode; + } + + public NullFlavour getCampusNullFlavourDefiningCode() { + return this.campusNullFlavourDefiningCode ; + } + + public void setGebaeudegruppeValue(String gebaeudegruppeValue) { + this.gebaeudegruppeValue = gebaeudegruppeValue; + } + + public String getGebaeudegruppeValue() { + return this.gebaeudegruppeValue ; + } + + public void setGebaeudegruppeNullFlavourDefiningCode( + NullFlavour gebaeudegruppeNullFlavourDefiningCode) { + this.gebaeudegruppeNullFlavourDefiningCode = gebaeudegruppeNullFlavourDefiningCode; + } + + public NullFlavour getGebaeudegruppeNullFlavourDefiningCode() { + return this.gebaeudegruppeNullFlavourDefiningCode ; + } + + public void setEbeneValue(String ebeneValue) { + this.ebeneValue = ebeneValue; + } + + public String getEbeneValue() { + return this.ebeneValue ; + } + + public void setEbeneNullFlavourDefiningCode(NullFlavour ebeneNullFlavourDefiningCode) { + this.ebeneNullFlavourDefiningCode = ebeneNullFlavourDefiningCode; + } + + public NullFlavour getEbeneNullFlavourDefiningCode() { + return this.ebeneNullFlavourDefiningCode ; + } + + public void setStationValue(String stationValue) { + this.stationValue = stationValue; + } + + public String getStationValue() { + return this.stationValue ; + } + + public void setStationNullFlavourDefiningCode(NullFlavour stationNullFlavourDefiningCode) { + this.stationNullFlavourDefiningCode = stationNullFlavourDefiningCode; + } + + public NullFlavour getStationNullFlavourDefiningCode() { + return this.stationNullFlavourDefiningCode ; + } + + public void setZimmerValue(String zimmerValue) { + this.zimmerValue = zimmerValue; + } + + public String getZimmerValue() { + return this.zimmerValue ; + } + + public void setZimmerNullFlavourDefiningCode(NullFlavour zimmerNullFlavourDefiningCode) { + this.zimmerNullFlavourDefiningCode = zimmerNullFlavourDefiningCode; + } + + public NullFlavour getZimmerNullFlavourDefiningCode() { + return this.zimmerNullFlavourDefiningCode ; + } + + public void setBettplatzValue(String bettplatzValue) { + this.bettplatzValue = bettplatzValue; + } + + public String getBettplatzValue() { + return this.bettplatzValue ; + } + + public void setBettplatzNullFlavourDefiningCode(NullFlavour bettplatzNullFlavourDefiningCode) { + this.bettplatzNullFlavourDefiningCode = bettplatzNullFlavourDefiningCode; + } + + public NullFlavour getBettplatzNullFlavourDefiningCode() { + return this.bettplatzNullFlavourDefiningCode ; + } + + public void setZusaetzlicheBeschreibungValue(String zusaetzlicheBeschreibungValue) { + this.zusaetzlicheBeschreibungValue = zusaetzlicheBeschreibungValue; + } + + public String getZusaetzlicheBeschreibungValue() { + return this.zusaetzlicheBeschreibungValue ; + } + + public void setZusaetzlicheBeschreibungNullFlavourDefiningCode( + NullFlavour zusaetzlicheBeschreibungNullFlavourDefiningCode) { + this.zusaetzlicheBeschreibungNullFlavourDefiningCode = zusaetzlicheBeschreibungNullFlavourDefiningCode; + } + + public NullFlavour getZusaetzlicheBeschreibungNullFlavourDefiningCode() { + return this.zusaetzlicheBeschreibungNullFlavourDefiningCode ; + } + + public void setDetailsZumBett(DetailsZumBettCluster detailsZumBett) { + this.detailsZumBett = detailsZumBett; + } + + public DetailsZumBettCluster getDetailsZumBett() { + return this.detailsZumBett ; + } + + public void setLeitendeOrganisationseinheit(List<Cluster> leitendeOrganisationseinheit) { + this.leitendeOrganisationseinheit = leitendeOrganisationseinheit; + } + + public List<Cluster> getLeitendeOrganisationseinheit() { + return this.leitendeOrganisationseinheit ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/StandortClusterContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/StandortClusterContainment.java new file mode 100644 index 000000000..5009955e2 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/StandortClusterContainment.java @@ -0,0 +1,57 @@ +package org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import java.lang.String; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +public class StandortClusterContainment extends Containment { + public SelectAqlField<StandortCluster> STANDORT_CLUSTER = new AqlFieldImp<StandortCluster>(StandortCluster.class, "", "StandortCluster", StandortCluster.class, this); + + public SelectAqlField<String> CAMPUS_VALUE = new AqlFieldImp<String>(StandortCluster.class, "/items[at0024]/value|value", "campusValue", String.class, this); + + public SelectAqlField<NullFlavour> CAMPUS_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(StandortCluster.class, "/items[at0024]/null_flavour|defining_code", "campusNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> GEBAEUDEGRUPPE_VALUE = new AqlFieldImp<String>(StandortCluster.class, "/items[at0025]/value|value", "gebaeudegruppeValue", String.class, this); + + public SelectAqlField<NullFlavour> GEBAEUDEGRUPPE_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(StandortCluster.class, "/items[at0025]/null_flavour|defining_code", "gebaeudegruppeNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> EBENE_VALUE = new AqlFieldImp<String>(StandortCluster.class, "/items[at0028]/value|value", "ebeneValue", String.class, this); + + public SelectAqlField<NullFlavour> EBENE_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(StandortCluster.class, "/items[at0028]/null_flavour|defining_code", "ebeneNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> STATION_VALUE = new AqlFieldImp<String>(StandortCluster.class, "/items[at0027]/value|value", "stationValue", String.class, this); + + public SelectAqlField<NullFlavour> STATION_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(StandortCluster.class, "/items[at0027]/null_flavour|defining_code", "stationNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> ZIMMER_VALUE = new AqlFieldImp<String>(StandortCluster.class, "/items[at0029]/value|value", "zimmerValue", String.class, this); + + public SelectAqlField<NullFlavour> ZIMMER_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(StandortCluster.class, "/items[at0029]/null_flavour|defining_code", "zimmerNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> BETTPLATZ_VALUE = new AqlFieldImp<String>(StandortCluster.class, "/items[at0034]/value|value", "bettplatzValue", String.class, this); + + public SelectAqlField<NullFlavour> BETTPLATZ_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(StandortCluster.class, "/items[at0034]/null_flavour|defining_code", "bettplatzNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> ZUSAETZLICHE_BESCHREIBUNG_VALUE = new AqlFieldImp<String>(StandortCluster.class, "/items[at0046]/value|value", "zusaetzlicheBeschreibungValue", String.class, this); + + public SelectAqlField<NullFlavour> ZUSAETZLICHE_BESCHREIBUNG_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(StandortCluster.class, "/items[at0046]/null_flavour|defining_code", "zusaetzlicheBeschreibungNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<DetailsZumBettCluster> DETAILS_ZUM_BETT = new AqlFieldImp<DetailsZumBettCluster>(StandortCluster.class, "/items[openEHR-EHR-CLUSTER.device.v1]", "detailsZumBett", DetailsZumBettCluster.class, this); + + public ListSelectAqlField<Cluster> LEITENDE_ORGANISATIONSEINHEIT = new ListAqlFieldImp<Cluster>(StandortCluster.class, "/items[at0049]", "leitendeOrganisationseinheit", Cluster.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(StandortCluster.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + private StandortClusterContainment() { + super("openEHR-EHR-CLUSTER.location.v1"); + } + + public static StandortClusterContainment getInstance() { + return new StandortClusterContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungsaufenthaltAdminEntry.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungsaufenthaltAdminEntry.java new file mode 100644 index 000000000..6492fca6d --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungsaufenthaltAdminEntry.java @@ -0,0 +1,213 @@ +package org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.generic.PartyProxy; +import java.lang.String; +import java.time.temporal.TemporalAccessor; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.EntryEntity; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Archetype("openEHR-EHR-ADMIN_ENTRY.hospitalization.v0") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-30T13:55:02.889966500+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +public class VersorgungsaufenthaltAdminEntry implements EntryEntity { + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Beginn + * Description: Zeitlicher Beginn des Aufenthaltes am beschriebenen Ort. + */ + @Path("/data[at0001]/items[at0004]/value|value") + private TemporalAccessor beginnValue; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Baum/Beginn/null_flavour + */ + @Path("/data[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour beginnNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Ende + * Description: Zeitliches Ende des Aufenthaltes am beschriebenen Ort. + */ + @Path("/data[at0001]/items[at0005]/value|value") + private TemporalAccessor endeValue; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Baum/Ende/null_flavour + */ + @Path("/data[at0001]/items[at0005]/null_flavour|defining_code") + private NullFlavour endeNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Grund des Aufenthaltes + * Description: Grund des Aufenthaltes + */ + @Path("/data[at0001]/items[at0006]/value|value") + private String grundDesAufenthaltesValue; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Baum/Grund des Aufenthaltes/null_flavour + */ + @Path("/data[at0001]/items[at0006]/null_flavour|defining_code") + private NullFlavour grundDesAufenthaltesNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Standort + * Description: Standort umfasst sowohl beiläufige Orte (ein Ort, der für die medizinische Versorgung ohne vorherige Benennung oder Genehmigung genutzt wird) als auch spezielle, offiziell benannte Orte. Die Standorte können privat, öffentlich, mobil oder stationär sein. + */ + @Path("/data[at0001]/items[openEHR-EHR-CLUSTER.location.v1]") + private StandortCluster standort; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Fachliche Organisationseinheit + * Description: Eine fachliche Einheit, Organisation, Abteilung, Zusammenschluss, Gruppierung mit einem gemeinsamen Ziel. + */ + @Path("/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0 and name/value='Fachliche Organisationseinheit']") + private List<FachlicheOrganisationseinheitCluster> fachlicheOrganisationseinheit; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Kommentar + * Description: Zusätzliche Kommentare. + */ + @Path("/data[at0001]/items[at0009]/value|value") + private String kommentarValue; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/Baum/Kommentar/null_flavour + */ + @Path("/data[at0001]/items[at0009]/null_flavour|defining_code") + private NullFlavour kommentarNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/subject + */ + @Path("/subject") + private PartyProxy subject; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/language + */ + @Path("/language") + private Language language; + + /** + * Path: Patientenaufenthalt/Versorgungsaufenthalt/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setBeginnValue(TemporalAccessor beginnValue) { + this.beginnValue = beginnValue; + } + + public TemporalAccessor getBeginnValue() { + return this.beginnValue ; + } + + public void setBeginnNullFlavourDefiningCode(NullFlavour beginnNullFlavourDefiningCode) { + this.beginnNullFlavourDefiningCode = beginnNullFlavourDefiningCode; + } + + public NullFlavour getBeginnNullFlavourDefiningCode() { + return this.beginnNullFlavourDefiningCode ; + } + + public void setEndeValue(TemporalAccessor endeValue) { + this.endeValue = endeValue; + } + + public TemporalAccessor getEndeValue() { + return this.endeValue ; + } + + public void setEndeNullFlavourDefiningCode(NullFlavour endeNullFlavourDefiningCode) { + this.endeNullFlavourDefiningCode = endeNullFlavourDefiningCode; + } + + public NullFlavour getEndeNullFlavourDefiningCode() { + return this.endeNullFlavourDefiningCode ; + } + + public void setGrundDesAufenthaltesValue(String grundDesAufenthaltesValue) { + this.grundDesAufenthaltesValue = grundDesAufenthaltesValue; + } + + public String getGrundDesAufenthaltesValue() { + return this.grundDesAufenthaltesValue ; + } + + public void setGrundDesAufenthaltesNullFlavourDefiningCode( + NullFlavour grundDesAufenthaltesNullFlavourDefiningCode) { + this.grundDesAufenthaltesNullFlavourDefiningCode = grundDesAufenthaltesNullFlavourDefiningCode; + } + + public NullFlavour getGrundDesAufenthaltesNullFlavourDefiningCode() { + return this.grundDesAufenthaltesNullFlavourDefiningCode ; + } + + public void setStandort(StandortCluster standort) { + this.standort = standort; + } + + public StandortCluster getStandort() { + return this.standort ; + } + + public void setFachlicheOrganisationseinheit( + List<FachlicheOrganisationseinheitCluster> fachlicheOrganisationseinheit) { + this.fachlicheOrganisationseinheit = fachlicheOrganisationseinheit; + } + + public List<FachlicheOrganisationseinheitCluster> getFachlicheOrganisationseinheit() { + return this.fachlicheOrganisationseinheit ; + } + + public void setKommentarValue(String kommentarValue) { + this.kommentarValue = kommentarValue; + } + + public String getKommentarValue() { + return this.kommentarValue ; + } + + public void setKommentarNullFlavourDefiningCode(NullFlavour kommentarNullFlavourDefiningCode) { + this.kommentarNullFlavourDefiningCode = kommentarNullFlavourDefiningCode; + } + + public NullFlavour getKommentarNullFlavourDefiningCode() { + return this.kommentarNullFlavourDefiningCode ; + } + + public void setSubject(PartyProxy subject) { + this.subject = subject; + } + + public PartyProxy getSubject() { + return this.subject ; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public Language getLanguage() { + return this.language ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungsaufenthaltAdminEntryContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungsaufenthaltAdminEntryContainment.java new file mode 100644 index 000000000..a59da9ba5 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungsaufenthaltAdminEntryContainment.java @@ -0,0 +1,51 @@ +package org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.generic.PartyProxy; +import java.lang.String; +import java.time.temporal.TemporalAccessor; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +public class VersorgungsaufenthaltAdminEntryContainment extends Containment { + public SelectAqlField<VersorgungsaufenthaltAdminEntry> VERSORGUNGSAUFENTHALT_ADMIN_ENTRY = new AqlFieldImp<VersorgungsaufenthaltAdminEntry>(VersorgungsaufenthaltAdminEntry.class, "", "VersorgungsaufenthaltAdminEntry", VersorgungsaufenthaltAdminEntry.class, this); + + public SelectAqlField<TemporalAccessor> BEGINN_VALUE = new AqlFieldImp<TemporalAccessor>(VersorgungsaufenthaltAdminEntry.class, "/data[at0001]/items[at0004]/value|value", "beginnValue", TemporalAccessor.class, this); + + public SelectAqlField<NullFlavour> BEGINN_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(VersorgungsaufenthaltAdminEntry.class, "/data[at0001]/items[at0004]/null_flavour|defining_code", "beginnNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<TemporalAccessor> ENDE_VALUE = new AqlFieldImp<TemporalAccessor>(VersorgungsaufenthaltAdminEntry.class, "/data[at0001]/items[at0005]/value|value", "endeValue", TemporalAccessor.class, this); + + public SelectAqlField<NullFlavour> ENDE_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(VersorgungsaufenthaltAdminEntry.class, "/data[at0001]/items[at0005]/null_flavour|defining_code", "endeNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> GRUND_DES_AUFENTHALTES_VALUE = new AqlFieldImp<String>(VersorgungsaufenthaltAdminEntry.class, "/data[at0001]/items[at0006]/value|value", "grundDesAufenthaltesValue", String.class, this); + + public SelectAqlField<NullFlavour> GRUND_DES_AUFENTHALTES_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(VersorgungsaufenthaltAdminEntry.class, "/data[at0001]/items[at0006]/null_flavour|defining_code", "grundDesAufenthaltesNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<StandortCluster> STANDORT = new AqlFieldImp<StandortCluster>(VersorgungsaufenthaltAdminEntry.class, "/data[at0001]/items[openEHR-EHR-CLUSTER.location.v1]", "standort", StandortCluster.class, this); + + public ListSelectAqlField<FachlicheOrganisationseinheitCluster> FACHLICHE_ORGANISATIONSEINHEIT = new ListAqlFieldImp<FachlicheOrganisationseinheitCluster>(VersorgungsaufenthaltAdminEntry.class, "/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]", "fachlicheOrganisationseinheit", FachlicheOrganisationseinheitCluster.class, this); + + public SelectAqlField<String> KOMMENTAR_VALUE = new AqlFieldImp<String>(VersorgungsaufenthaltAdminEntry.class, "/data[at0001]/items[at0009]/value|value", "kommentarValue", String.class, this); + + public SelectAqlField<NullFlavour> KOMMENTAR_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(VersorgungsaufenthaltAdminEntry.class, "/data[at0001]/items[at0009]/null_flavour|defining_code", "kommentarNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<PartyProxy> SUBJECT = new AqlFieldImp<PartyProxy>(VersorgungsaufenthaltAdminEntry.class, "/subject", "subject", PartyProxy.class, this); + + public SelectAqlField<Language> LANGUAGE = new AqlFieldImp<Language>(VersorgungsaufenthaltAdminEntry.class, "/language", "language", Language.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(VersorgungsaufenthaltAdminEntry.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + private VersorgungsaufenthaltAdminEntryContainment() { + super("openEHR-EHR-ADMIN_ENTRY.hospitalization.v0"); + } + + public static VersorgungsaufenthaltAdminEntryContainment getInstance() { + return new VersorgungsaufenthaltAdminEntryContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungsfallCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungsfallCluster.java new file mode 100644 index 000000000..4fdfb2963 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungsfallCluster.java @@ -0,0 +1,64 @@ +package org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import java.lang.String; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.LocatableEntity; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Archetype("openEHR-EHR-CLUSTER.case_identification.v0") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-30T13:55:02.857967300+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +public class VersorgungsfallCluster implements LocatableEntity { + /** + * Path: Patientenaufenthalt/context/Versorgungsfall/Zugehöriger Versorgungsfall (Kennung) + * Description: Der Bezeichner/die Kennung dieses Falls. + */ + @Path("/items[at0001 and name/value='Zugehöriger Versorgungsfall (Kennung)']/value|value") + private String zugehoerigerVersorgungsfallKennungValue; + + /** + * Path: Patientenaufenthalt/context/Tree/Versorgungsfall/Zugehöriger Versorgungsfall (Kennung)/null_flavour + */ + @Path("/items[at0001 and name/value='Zugehöriger Versorgungsfall (Kennung)']/null_flavour|defining_code") + private NullFlavour zugehoerigerVersorgungsfallKennungNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/context/Versorgungsfall/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setZugehoerigerVersorgungsfallKennungValue( + String zugehoerigerVersorgungsfallKennungValue) { + this.zugehoerigerVersorgungsfallKennungValue = zugehoerigerVersorgungsfallKennungValue; + } + + public String getZugehoerigerVersorgungsfallKennungValue() { + return this.zugehoerigerVersorgungsfallKennungValue ; + } + + public void setZugehoerigerVersorgungsfallKennungNullFlavourDefiningCode( + NullFlavour zugehoerigerVersorgungsfallKennungNullFlavourDefiningCode) { + this.zugehoerigerVersorgungsfallKennungNullFlavourDefiningCode = zugehoerigerVersorgungsfallKennungNullFlavourDefiningCode; + } + + public NullFlavour getZugehoerigerVersorgungsfallKennungNullFlavourDefiningCode() { + return this.zugehoerigerVersorgungsfallKennungNullFlavourDefiningCode ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungsfallClusterContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungsfallClusterContainment.java new file mode 100644 index 000000000..4eb716a1a --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungsfallClusterContainment.java @@ -0,0 +1,26 @@ +package org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import java.lang.String; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +public class VersorgungsfallClusterContainment extends Containment { + public SelectAqlField<VersorgungsfallCluster> VERSORGUNGSFALL_CLUSTER = new AqlFieldImp<VersorgungsfallCluster>(VersorgungsfallCluster.class, "", "VersorgungsfallCluster", VersorgungsfallCluster.class, this); + + public SelectAqlField<String> ZUGEHOERIGER_VERSORGUNGSFALL_KENNUNG_VALUE = new AqlFieldImp<String>(VersorgungsfallCluster.class, "/items[at0001]/value|value", "zugehoerigerVersorgungsfallKennungValue", String.class, this); + + public SelectAqlField<NullFlavour> ZUGEHOERIGER_VERSORGUNGSFALL_KENNUNG_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(VersorgungsfallCluster.class, "/items[at0001]/null_flavour|defining_code", "zugehoerigerVersorgungsfallKennungNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(VersorgungsfallCluster.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + private VersorgungsfallClusterContainment() { + super("openEHR-EHR-CLUSTER.case_identification.v0"); + } + + public static VersorgungsfallClusterContainment getInstance() { + return new VersorgungsfallClusterContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungstellenkontaktCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungstellenkontaktCluster.java new file mode 100644 index 000000000..fc5daee94 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungstellenkontaktCluster.java @@ -0,0 +1,64 @@ +package org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import java.lang.String; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.LocatableEntity; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Archetype("openEHR-EHR-CLUSTER.case_identification.v0") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-30T13:55:02.871982+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +public class VersorgungstellenkontaktCluster implements LocatableEntity { + /** + * Path: Patientenaufenthalt/context/Versorgungstellenkontakt/Zugehöriger Versorgungsstellenkontakt (Kennung) + * Description: Der Bezeichner/die Kennung dieses Falls. + */ + @Path("/items[at0001 and name/value='Zugehöriger Versorgungsstellenkontakt (Kennung)']/value|value") + private String zugehoerigerVersorgungsstellenkontaktKennungValue; + + /** + * Path: Patientenaufenthalt/context/Tree/Versorgungstellenkontakt/Zugehöriger Versorgungsstellenkontakt (Kennung)/null_flavour + */ + @Path("/items[at0001 and name/value='Zugehöriger Versorgungsstellenkontakt (Kennung)']/null_flavour|defining_code") + private NullFlavour zugehoerigerVersorgungsstellenkontaktKennungNullFlavourDefiningCode; + + /** + * Path: Patientenaufenthalt/context/Versorgungstellenkontakt/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setZugehoerigerVersorgungsstellenkontaktKennungValue( + String zugehoerigerVersorgungsstellenkontaktKennungValue) { + this.zugehoerigerVersorgungsstellenkontaktKennungValue = zugehoerigerVersorgungsstellenkontaktKennungValue; + } + + public String getZugehoerigerVersorgungsstellenkontaktKennungValue() { + return this.zugehoerigerVersorgungsstellenkontaktKennungValue ; + } + + public void setZugehoerigerVersorgungsstellenkontaktKennungNullFlavourDefiningCode( + NullFlavour zugehoerigerVersorgungsstellenkontaktKennungNullFlavourDefiningCode) { + this.zugehoerigerVersorgungsstellenkontaktKennungNullFlavourDefiningCode = zugehoerigerVersorgungsstellenkontaktKennungNullFlavourDefiningCode; + } + + public NullFlavour getZugehoerigerVersorgungsstellenkontaktKennungNullFlavourDefiningCode() { + return this.zugehoerigerVersorgungsstellenkontaktKennungNullFlavourDefiningCode ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungstellenkontaktClusterContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungstellenkontaktClusterContainment.java new file mode 100644 index 000000000..c8abee265 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/definition/VersorgungstellenkontaktClusterContainment.java @@ -0,0 +1,26 @@ +package org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import java.lang.String; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +public class VersorgungstellenkontaktClusterContainment extends Containment { + public SelectAqlField<VersorgungstellenkontaktCluster> VERSORGUNGSTELLENKONTAKT_CLUSTER = new AqlFieldImp<VersorgungstellenkontaktCluster>(VersorgungstellenkontaktCluster.class, "", "VersorgungstellenkontaktCluster", VersorgungstellenkontaktCluster.class, this); + + public SelectAqlField<String> ZUGEHOERIGER_VERSORGUNGSSTELLENKONTAKT_KENNUNG_VALUE = new AqlFieldImp<String>(VersorgungstellenkontaktCluster.class, "/items[at0001]/value|value", "zugehoerigerVersorgungsstellenkontaktKennungValue", String.class, this); + + public SelectAqlField<NullFlavour> ZUGEHOERIGER_VERSORGUNGSSTELLENKONTAKT_KENNUNG_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(VersorgungstellenkontaktCluster.class, "/items[at0001]/null_flavour|defining_code", "zugehoerigerVersorgungsstellenkontaktKennungNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(VersorgungstellenkontaktCluster.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + private VersorgungstellenkontaktClusterContainment() { + super("openEHR-EHR-CLUSTER.case_identification.v0"); + } + + public static VersorgungstellenkontaktClusterContainment getInstance() { + return new VersorgungstellenkontaktClusterContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/StationaererVersorgungsfallComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/StationaererVersorgungsfallComposition.java new file mode 100644 index 000000000..69a50711c --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/StationaererVersorgungsfallComposition.java @@ -0,0 +1,413 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.generic.Participation; +import com.nedap.archie.rm.generic.PartyIdentified; +import com.nedap.archie.rm.generic.PartyProxy; +import java.lang.String; +import java.time.temporal.TemporalAccessor; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Id; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.annotations.Template; +import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; +import org.ehrbase.client.classgenerator.shareddefinition.Category; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; +import org.ehrbase.client.classgenerator.shareddefinition.Setting; +import org.ehrbase.client.classgenerator.shareddefinition.Territory; +import org.ehrbase.client.openehrclient.VersionUid; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.AufnahmedatenAdminEntry; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.EntlassungsdatenAdminEntry; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.FachlicheOrganisationseinheitCluster; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.FallstatusDefiningCode; +import org.ehrbase.fhirbridge.ehr.Composition; + +@Entity +@Archetype("openEHR-EHR-COMPOSITION.fall.v1") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-30T13:55:38.159537500+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +@Template("Stationärer Versorgungsfall") +public class StationaererVersorgungsfallComposition implements CompositionEntity, Composition { + /** + * Path: Stationärer Versorgungsfall/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/context/Falltyp + * Description: Charaktierisierung des Falls, bspw. als Einrichtungskontakt, Abteilungskontakt, Versorgungsstellenkontakt. + */ + @Path("/context/other_context[at0001]/items[at0005]/value|value") + private String falltypValue; + + /** + * Path: Stationärer Versorgungsfall/context/Baum/Falltyp/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") + private NullFlavour falltypNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/context/Fallklasse + * Description: Nähere Beschreibung des Falls als Fallklasse, z.B. ambulanter Besuch, stationärer, prä- oder nachstationärer Aufenthalt. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|value") + private String fallklasseValue; + + /** + * Path: Stationärer Versorgungsfall/context/Baum/Fallklasse/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour fallklasseNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/context/Fallstatus + * Description: Status des Falls + * Comment: Status des Falls + */ + @Path("/context/other_context[at0001]/items[at0010]/value|defining_code") + private FallstatusDefiningCode fallstatusDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/context/Baum/Fallstatus/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0010]/null_flavour|defining_code") + private NullFlavour fallstatusNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/context/Fall-Kennung + * Description: Eindeutige Identifikation des Falls, z.B. Fallnummer. + */ + @Path("/context/other_context[at0001]/items[at0003 and name/value='Fall-Kennung']/value|value") + private String fallKennungValue; + + /** + * Path: Stationärer Versorgungsfall/context/Baum/Fall-Kennung/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0003 and name/value='Fall-Kennung']/null_flavour|defining_code") + private NullFlavour fallKennungNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/context/Übergeordneter Fall + * Description: Ein anderer Fall, von dem dieser Fall ein Teil ist (administrativ oder zeitlich). + * Comment: Ein anderer Fall, von dem dieser Fall ein Teil ist (administrativ oder zeitlich). + */ + @Path("/context/other_context[at0001]/items[at0011]/value|value") + private String uebergeordneterFallValue; + + /** + * Path: Stationärer Versorgungsfall/context/Baum/Übergeordneter Fall/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0011]/null_flavour|defining_code") + private NullFlavour uebergeordneterFallNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/context/Erweiterung + * Description: Ergänzende Angaben zum Fall + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: Stationärer Versorgungsfall/context/Fachliche Organisationseinheit + * Description: Eine fachliche Einheit, Organisation, Abteilung, Zusammenschluss, Gruppierung mit einem gemeinsamen Ziel. + */ + @Path("/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.organization.v0 and name/value='Fachliche Organisationseinheit']") + private List<FachlicheOrganisationseinheitCluster> fachlicheOrganisationseinheit; + + /** + * Path: Stationärer Versorgungsfall/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Stationärer Versorgungsfall/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Stationärer Versorgungsfall/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Stationärer Versorgungsfall/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Stationärer Versorgungsfall/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Stationärer Versorgungsfall/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten + * Description: Wird nur für aufgenommene Patienten verwendet. Es signalisiert den Beginn des Aufenthalts eines Patienten in einer Gesundheitseinrichtung. + */ + @Path("/content[openEHR-EHR-ADMIN_ENTRY.admission.v0 and name/value='Aufnahmedaten']") + private AufnahmedatenAdminEntry aufnahmedaten; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten + * Description: Wird nur für entlassene Patienten verwendet. + */ + @Path("/content[openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0]") + private EntlassungsdatenAdminEntry entlassungsdaten; + + /** + * Path: Stationärer Versorgungsfall/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Stationärer Versorgungsfall/language + */ + @Path("/language") + private Language language; + + /** + * Path: Stationärer Versorgungsfall/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Stationärer Versorgungsfall/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode ; + } + + public void setFalltypValue(String falltypValue) { + this.falltypValue = falltypValue; + } + + public String getFalltypValue() { + return this.falltypValue ; + } + + public void setFalltypNullFlavourDefiningCode(NullFlavour falltypNullFlavourDefiningCode) { + this.falltypNullFlavourDefiningCode = falltypNullFlavourDefiningCode; + } + + public NullFlavour getFalltypNullFlavourDefiningCode() { + return this.falltypNullFlavourDefiningCode ; + } + + public void setFallklasseValue(String fallklasseValue) { + this.fallklasseValue = fallklasseValue; + } + + public String getFallklasseValue() { + return this.fallklasseValue ; + } + + public void setFallklasseNullFlavourDefiningCode(NullFlavour fallklasseNullFlavourDefiningCode) { + this.fallklasseNullFlavourDefiningCode = fallklasseNullFlavourDefiningCode; + } + + public NullFlavour getFallklasseNullFlavourDefiningCode() { + return this.fallklasseNullFlavourDefiningCode ; + } + + public void setFallstatusDefiningCode(FallstatusDefiningCode fallstatusDefiningCode) { + this.fallstatusDefiningCode = fallstatusDefiningCode; + } + + public FallstatusDefiningCode getFallstatusDefiningCode() { + return this.fallstatusDefiningCode ; + } + + public void setFallstatusNullFlavourDefiningCode(NullFlavour fallstatusNullFlavourDefiningCode) { + this.fallstatusNullFlavourDefiningCode = fallstatusNullFlavourDefiningCode; + } + + public NullFlavour getFallstatusNullFlavourDefiningCode() { + return this.fallstatusNullFlavourDefiningCode ; + } + + public void setFallKennungValue(String fallKennungValue) { + this.fallKennungValue = fallKennungValue; + } + + public String getFallKennungValue() { + return this.fallKennungValue ; + } + + public void setFallKennungNullFlavourDefiningCode( + NullFlavour fallKennungNullFlavourDefiningCode) { + this.fallKennungNullFlavourDefiningCode = fallKennungNullFlavourDefiningCode; + } + + public NullFlavour getFallKennungNullFlavourDefiningCode() { + return this.fallKennungNullFlavourDefiningCode ; + } + + public void setUebergeordneterFallValue(String uebergeordneterFallValue) { + this.uebergeordneterFallValue = uebergeordneterFallValue; + } + + public String getUebergeordneterFallValue() { + return this.uebergeordneterFallValue ; + } + + public void setUebergeordneterFallNullFlavourDefiningCode( + NullFlavour uebergeordneterFallNullFlavourDefiningCode) { + this.uebergeordneterFallNullFlavourDefiningCode = uebergeordneterFallNullFlavourDefiningCode; + } + + public NullFlavour getUebergeordneterFallNullFlavourDefiningCode() { + return this.uebergeordneterFallNullFlavourDefiningCode ; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung ; + } + + public void setFachlicheOrganisationseinheit( + List<FachlicheOrganisationseinheitCluster> fachlicheOrganisationseinheit) { + this.fachlicheOrganisationseinheit = fachlicheOrganisationseinheit; + } + + public List<FachlicheOrganisationseinheitCluster> getFachlicheOrganisationseinheit() { + return this.fachlicheOrganisationseinheit ; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue ; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public List<Participation> getParticipations() { + return this.participations ; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue ; + } + + public void setLocation(String location) { + this.location = location; + } + + public String getLocation() { + return this.location ; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility ; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode ; + } + + public void setAufnahmedaten(AufnahmedatenAdminEntry aufnahmedaten) { + this.aufnahmedaten = aufnahmedaten; + } + + public AufnahmedatenAdminEntry getAufnahmedaten() { + return this.aufnahmedaten ; + } + + public void setEntlassungsdaten(EntlassungsdatenAdminEntry entlassungsdaten) { + this.entlassungsdaten = entlassungsdaten; + } + + public EntlassungsdatenAdminEntry getEntlassungsdaten() { + return this.entlassungsdaten ; + } + + public void setComposer(PartyProxy composer) { + this.composer = composer; + } + + public PartyProxy getComposer() { + return this.composer ; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public Language getLanguage() { + return this.language ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } + + public void setTerritory(Territory territory) { + this.territory = territory; + } + + public Territory getTerritory() { + return this.territory ; + } + + public VersionUid getVersionUid() { + return this.versionUid ; + } + + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/StationaererVersorgungsfallCompositionContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/StationaererVersorgungsfallCompositionContainment.java new file mode 100644 index 000000000..5de213141 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/StationaererVersorgungsfallCompositionContainment.java @@ -0,0 +1,85 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.generic.Participation; +import com.nedap.archie.rm.generic.PartyIdentified; +import com.nedap.archie.rm.generic.PartyProxy; +import java.lang.String; +import java.time.temporal.TemporalAccessor; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.Category; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; +import org.ehrbase.client.classgenerator.shareddefinition.Setting; +import org.ehrbase.client.classgenerator.shareddefinition.Territory; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.AufnahmedatenAdminEntry; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.EntlassungsdatenAdminEntry; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.FachlicheOrganisationseinheitCluster; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.FallstatusDefiningCode; + +public class StationaererVersorgungsfallCompositionContainment extends Containment { + public SelectAqlField<StationaererVersorgungsfallComposition> STATIONAERER_VERSORGUNGSFALL_COMPOSITION = new AqlFieldImp<StationaererVersorgungsfallComposition>(StationaererVersorgungsfallComposition.class, "", "StationaererVersorgungsfallComposition", StationaererVersorgungsfallComposition.class, this); + + public SelectAqlField<Category> CATEGORY_DEFINING_CODE = new AqlFieldImp<Category>(StationaererVersorgungsfallComposition.class, "/category|defining_code", "categoryDefiningCode", Category.class, this); + + public SelectAqlField<String> FALLTYP_VALUE = new AqlFieldImp<String>(StationaererVersorgungsfallComposition.class, "/context/other_context[at0001]/items[at0005]/value|value", "falltypValue", String.class, this); + + public SelectAqlField<NullFlavour> FALLTYP_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(StationaererVersorgungsfallComposition.class, "/context/other_context[at0001]/items[at0005]/null_flavour|defining_code", "falltypNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> FALLKLASSE_VALUE = new AqlFieldImp<String>(StationaererVersorgungsfallComposition.class, "/context/other_context[at0001]/items[at0004]/value|value", "fallklasseValue", String.class, this); + + public SelectAqlField<NullFlavour> FALLKLASSE_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(StationaererVersorgungsfallComposition.class, "/context/other_context[at0001]/items[at0004]/null_flavour|defining_code", "fallklasseNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<FallstatusDefiningCode> FALLSTATUS_DEFINING_CODE = new AqlFieldImp<FallstatusDefiningCode>(StationaererVersorgungsfallComposition.class, "/context/other_context[at0001]/items[at0010]/value|defining_code", "fallstatusDefiningCode", FallstatusDefiningCode.class, this); + + public SelectAqlField<NullFlavour> FALLSTATUS_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(StationaererVersorgungsfallComposition.class, "/context/other_context[at0001]/items[at0010]/null_flavour|defining_code", "fallstatusNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> FALL_KENNUNG_VALUE = new AqlFieldImp<String>(StationaererVersorgungsfallComposition.class, "/context/other_context[at0001]/items[at0003]/value|value", "fallKennungValue", String.class, this); + + public SelectAqlField<NullFlavour> FALL_KENNUNG_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(StationaererVersorgungsfallComposition.class, "/context/other_context[at0001]/items[at0003]/null_flavour|defining_code", "fallKennungNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> UEBERGEORDNETER_FALL_VALUE = new AqlFieldImp<String>(StationaererVersorgungsfallComposition.class, "/context/other_context[at0001]/items[at0011]/value|value", "uebergeordneterFallValue", String.class, this); + + public SelectAqlField<NullFlavour> UEBERGEORDNETER_FALL_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(StationaererVersorgungsfallComposition.class, "/context/other_context[at0001]/items[at0011]/null_flavour|defining_code", "uebergeordneterFallNullFlavourDefiningCode", NullFlavour.class, this); + + public ListSelectAqlField<Cluster> ERWEITERUNG = new ListAqlFieldImp<Cluster>(StationaererVersorgungsfallComposition.class, "/context/other_context[at0001]/items[at0002]", "erweiterung", Cluster.class, this); + + public ListSelectAqlField<FachlicheOrganisationseinheitCluster> FACHLICHE_ORGANISATIONSEINHEIT = new ListAqlFieldImp<FachlicheOrganisationseinheitCluster>(StationaererVersorgungsfallComposition.class, "/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]", "fachlicheOrganisationseinheit", FachlicheOrganisationseinheitCluster.class, this); + + public SelectAqlField<TemporalAccessor> START_TIME_VALUE = new AqlFieldImp<TemporalAccessor>(StationaererVersorgungsfallComposition.class, "/context/start_time|value", "startTimeValue", TemporalAccessor.class, this); + + public ListSelectAqlField<Participation> PARTICIPATIONS = new ListAqlFieldImp<Participation>(StationaererVersorgungsfallComposition.class, "/context/participations", "participations", Participation.class, this); + + public SelectAqlField<TemporalAccessor> END_TIME_VALUE = new AqlFieldImp<TemporalAccessor>(StationaererVersorgungsfallComposition.class, "/context/end_time|value", "endTimeValue", TemporalAccessor.class, this); + + public SelectAqlField<String> LOCATION = new AqlFieldImp<String>(StationaererVersorgungsfallComposition.class, "/context/location", "location", String.class, this); + + public SelectAqlField<PartyIdentified> HEALTH_CARE_FACILITY = new AqlFieldImp<PartyIdentified>(StationaererVersorgungsfallComposition.class, "/context/health_care_facility", "healthCareFacility", PartyIdentified.class, this); + + public SelectAqlField<Setting> SETTING_DEFINING_CODE = new AqlFieldImp<Setting>(StationaererVersorgungsfallComposition.class, "/context/setting|defining_code", "settingDefiningCode", Setting.class, this); + + public SelectAqlField<AufnahmedatenAdminEntry> AUFNAHMEDATEN = new AqlFieldImp<AufnahmedatenAdminEntry>(StationaererVersorgungsfallComposition.class, "/content[openEHR-EHR-ADMIN_ENTRY.admission.v0]", "aufnahmedaten", AufnahmedatenAdminEntry.class, this); + + public SelectAqlField<EntlassungsdatenAdminEntry> ENTLASSUNGSDATEN = new AqlFieldImp<EntlassungsdatenAdminEntry>(StationaererVersorgungsfallComposition.class, "/content[openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0]", "entlassungsdaten", EntlassungsdatenAdminEntry.class, this); + + public SelectAqlField<PartyProxy> COMPOSER = new AqlFieldImp<PartyProxy>(StationaererVersorgungsfallComposition.class, "/composer", "composer", PartyProxy.class, this); + + public SelectAqlField<Language> LANGUAGE = new AqlFieldImp<Language>(StationaererVersorgungsfallComposition.class, "/language", "language", Language.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(StationaererVersorgungsfallComposition.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + public SelectAqlField<Territory> TERRITORY = new AqlFieldImp<Territory>(StationaererVersorgungsfallComposition.class, "/territory", "territory", Territory.class, this); + + private StationaererVersorgungsfallCompositionContainment() { + super("openEHR-EHR-COMPOSITION.fall.v1"); + } + + public static StationaererVersorgungsfallCompositionContainment getInstance() { + return new StationaererVersorgungsfallCompositionContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/ArtDerEntlassungDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/ArtDerEntlassungDefiningCode.java new file mode 100644 index 000000000..398ed520e --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/ArtDerEntlassungDefiningCode.java @@ -0,0 +1,96 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition; + +import java.lang.String; +import org.ehrbase.client.classgenerator.EnumValueSet; + +public enum ArtDerEntlassungDefiningCode implements EnumValueSet { + ENTLASSUNG_ZUM_JAHRESENDE_BEI_AUFNAHME_IM_VORJAHR_FUER_ZWECKE_DER_ABRECHNUNG4_PEPPV("Entlassung zum Jahresende bei Aufnahme im Vorjahr (für Zwecke der Abrechnung - § 4 PEPPV)", "", "§21 KHEntgG", "25"), + + ZUSTAENDIGKEITSWECHSEL_DES_KOSTENTRAEGERS("Zuständigkeitswechsel des Kostenträgers", "", "§21 KHEntgG", "059"), + + BEENDIGUNG_EINES_ZEITRAUMES_OHNE_DIREKTEN_PATIENTENKONTAKT_STATIONSAEQUIVALENTE_BEHANDLUNG_FUER_PSEUDO_FACHABTEILUNG0004("Beendigung eines Zeitraumes ohne direkten Patientenkontakt (stationsäquivalente Behandlung – für Pseudo-Fachabteilung 0004)", "", "§21 KHEntgG", "27"), + + EXTERNE_VERLEGUNG_MIT_RUECKVERLEGUNG_ODER_WECHSEL_ZWISCHEN_DEN_ENTGELTBEREICHEN_DER_DRG_FALLPAU_SCHALEN_NACH_DER_BPFLV_ODER_FUER_BESONDERE_EINRICHTUNGEN_NACH17B_ABS1_SATZ15_KHG_MIT_RUECKVERLEGUNG("externe Verlegung mit Rückverlegung oder Wechsel zwischen den Entgeltbereichen der DRG-Fallpau- schalen, nach der BPflV oder für besondere Einrichtungen nach § 17b Abs. 1 Satz 15 KHG mit Rückverlegung", "", "§21 KHEntgG", "16"), + + ENTLASSUNG_VOR_WIEDERAUFNAHME_MIT_NEUEINSTUFUNG_WEGEN_KOMPLIKATION("Entlassung vor Wiederaufnahme mit Neueinstufung wegen Komplikation", "", "§21 KHEntgG", "20"), + + ENTLASSUNG_ODER_VERLEGUNG_MIT_NACHFOLGENDER_WIEDERAUFNAHME("Entlassung oder Verlegung mit nachfolgender Wiederaufnahme", "", "§21 KHEntgG", "21"), + + VERLEGUNG_IN_EIN_ANDERES_KRANKENHAUS_IM_RAHMEN_EINER_ZUSAMMENARBEIT14_ABS5_SATZ2_BPFLV_IN_DER_AM31122003_GELTENDEN_FASSUNG("Verlegung in ein anderes Krankenhaus im Rahmen einer Zusammenarbeit (§ 14 Abs. 5 Satz 2 BPflV in der am 31.12.2003 geltenden Fassung)", "", "§21 KHEntgG", "089"), + + ENTLASSUNG_IN_EIN_HOSPIZ("Entlassung in ein Hospiz", "", "§21 KHEntgG", "119"), + + RUECKVERLEGUNG("Rückverlegung", "", "§21 KHEntgG", "18"), + + VERLEGUNG_IN_EIN_ANDERES_KRANKENHAUS("Verlegung in ein anderes Krankenhaus", "", "§21 KHEntgG", "069"), + + BEGINN_EINES_EXTERNEN_AUFENTHALTS_MIT_ABWESENHEIT_UEBER_MITTERNACHT_BPFLV_BEREICH_FUER_VERLEGENDE_FACHABTEILUNG("Beginn eines externen Aufenthalts mit Abwesenheit über Mitternacht (BPflV-Bereich – für verlegende Fachabteilung)", "", "§21 KHEntgG", "23"), + + BEENDIGUNG_EINES_EXTERNEN_AUFENTHALTS_MIT_ABWESENHEIT_UEBER_MITTERNACHT_BPFLV_BEREICH_FUER_PSEUDO_FACHABTEILUNG0003("Beendigung eines externen Aufenthalts mit Abwesenheit über Mitternacht (BPflV-Bereich – für Pseudo-Fachabteilung 0003)", "", "§21 KHEntgG", "24"), + + FALLABSCHLUSS_INTERNE_VERLEGUNG_BEI_WECHSEL_ZWISCHEN_VOLL_TEILSTATIONAERER_UND_STATIONSAEQUIVALENTER_BEHANDLUNG("Fallabschluss (interne Verlegung) bei Wechsel zwischen voll-, teilstationärer und stationsäquivalenter Behandlung", "", "§21 KHEntgG", "22"), + + TOD("Tod", "", "§21 KHEntgG", "079"), + + EXTERNE_VERLEGUNG_ZUR_PSYCHIATRISCHEN_BEHANDLUNG("externe Verlegung zur psychiatrischen Behandlung", "", "§21 KHEntgG", "13"), + + ENTLASSUNG_IN_EINE_PFLEGEEINRICHTUNG("Entlassung in eine Pflegeeinrichtung", "", "§21 KHEntgG", "109"), + + BEHANDLUNG_REGULAER_BEENDET("Behandlung regulär beendet", "", "§21 KHEntgG", "019"), + + BEHANDLUNG_REGULAER_BEENDET_NACHSTATIONAERE_BEHANDLUNG_VORGESEHEN("Behandlung regulär beendet, nachstationäre Behandlung vorgesehen", "", "§21 KHEntgG", "029"), + + BEHANDLUNG_AUS_SONSTIGEN_GRUENDEN_BEENDET("Behandlung aus sonstigen Gründen beendet", "", "§21 KHEntgG", "03"), + + BEHANDLUNG_GEGEN_AERZTLICHEN_RAT_BEENDET_NACHSTATIONAERE_BEHANDLUNG_VORGESEHEN("Behandlung gegen ärztlichen Rat beendet, nachstationäre Behandlung vorgesehen", "", "§21 KHEntgG", "15"), + + BEHANDLUNG_AUS_SONSTIGEN_GRUENDEN_BEENDET_NACHSTATIONAERE_BEHANDLUNG_VORGESEHEN("Behandlung aus sonstigen Gründen beendet, nachstationäre Behandlung vorgesehen", "", "§21 KHEntgG", "14"), + + ENTLASSUNG_VOR_WIEDERAUFNAHME_MIT_NEUEINSTUFUNG("Entlassung vor Wiederaufnahme mit Neueinstufung", "", "§21 KHEntgG", "19"), + + INTERNE_VERLEGUNG("interne Verlegung", "", "§21 KHEntgG", "12"), + + BEHANDLUNG_REGULAER_BEENDET_BEATMET_VERLEGT("Behandlung regulär beendet, beatmet verlegt", "", "§21 KHEntgG", "29"), + + ENTLASSUNG_IN_EINE_REHABILITATIONSEINRICHTUNG("Entlassung in eine Rehabilitationseinrichtung", "", "§21 KHEntgG", "099"), + + BEHANDLUNG_GEGEN_AERZTLICHEN_RAT_BEENDET("Behandlung gegen ärztlichen Rat beendet", "", "§21 KHEntgG", "04"), + + INTERNE_VERLEGUNG_MIT_WECHSEL_ZWISCHEN_DEN_ENTGELTBEREICHEN_DER_DRG_FALLPAUSCHALEN_NACH_DER_BPFLV_ODER_FUER_BESONDERE_EINRICHTUNGEN_NACH17B_ABS1_SATZ15_KHG("interne Verlegung mit Wechsel zwischen den Entgeltbereichen der DRG-Fallpauschalen, nach der BPflV oder für besondere Einrichtungen nach § 17b Abs. 1 Satz 15 KHG", "", "§21 KHEntgG", "17"), + + BEGINN_EINES_ZEITRAUMES_OHNE_DIREKTEN_PATIENTENKONTAKT_STATIONSAEQUIVALENTE_BEHANDLUNG("Beginn eines Zeitraumes ohne direkten Patientenkontakt (stationsäquivalente Behandlung)", "", "§21 KHEntgG", "26"), + + BEHANDLUNG_REGULAER_BEENDET_BEATMET_ENTLASSEN("Behandlung regulär beendet, beatmet entlassen", "", "§21 KHEntgG", "28"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + ArtDerEntlassungDefiningCode(String value, String description, String terminologyId, + String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/AufnahmeanlassDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/AufnahmeanlassDefiningCode.java new file mode 100644 index 000000000..f09f9d44a --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/AufnahmeanlassDefiningCode.java @@ -0,0 +1,53 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition; + +import java.lang.String; +import org.ehrbase.client.classgenerator.EnumValueSet; + +public enum AufnahmeanlassDefiningCode implements EnumValueSet { + NOTFALL("Notfall", "", "§21 KHEntgG", "N"), + + GEBURT("Geburt", "", "§21 KHEntgG", "G"), + + EINWEISUNG_DURCH_EINEN_ARZT("Einweisung durch einen Arzt", "", "§21 KHEntgG", "E"), + + VERLEGUNG_MIT_BEHANDLUNGSDAUER_IM_VERLEGENDEN_KRANKENHAUS_BIS_ZU24_STUNDEN("Verlegung mit Behandlungsdauer im verlegenden Krankenhaus bis zu 24 Stunden", "", "§21 KHEntgG", "A"), + + VERLEGUNG_MIT_BEHANDLUNGSDAUER_IM_VERLEGENDEN_KRANKENHAUS_LAENGER_ALS24_STUNDEN("Verlegung mit Behandlungsdauer im verlegenden Krankenhaus länger als 24 Stunden", "", "§21 KHEntgG", "V"), + + EINWEISUNG_DURCH_EINEN_ZAHNARZT("Einweisung durch einen Zahnarzt", "", "§21 KHEntgG", "Z"), + + BEGLEITPERSON_ODER_MITAUFGENOMMENE_PFLEGEKRAFT("Begleitperson oder mitaufgenommene Pflegekraft", "", "§21 KHEntgG", "B"), + + AUFNAHME_NACH_VORAUSGEHENDER_BEHANDLUNG_IN_EINER_REHABILITATIONSEINRICHTUNG("Aufnahme nach vorausgehender Behandlung in einer Rehabilitationseinrichtung", "", "§21 KHEntgG", "R"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + AufnahmeanlassDefiningCode(String value, String description, String terminologyId, String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/AufnahmedatenAdminEntry.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/AufnahmedatenAdminEntry.java new file mode 100644 index 000000000..dbacb7400 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/AufnahmedatenAdminEntry.java @@ -0,0 +1,235 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.generic.PartyProxy; +import java.lang.String; +import java.time.temporal.TemporalAccessor; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.EntryEntity; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Archetype("openEHR-EHR-ADMIN_ENTRY.admission.v0") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-30T13:55:38.244209300+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +public class AufnahmedatenAdminEntry implements EntryEntity { + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Aufnahmegrund + * Description: Der Umstand, unter dem der Patient aufgenommen wird. + */ + @Path("/data[at0001]/items[at0013]/value|defining_code") + private AufnahmegrundDefiningCode aufnahmegrundDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Tree/Aufnahmegrund/null_flavour + */ + @Path("/data[at0001]/items[at0013]/null_flavour|defining_code") + private NullFlavour aufnahmegrundNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Aufnahmeanlass + * Description: Nähere Beschreibung der Art der Aufnahme, z.B. Unfall oder Notfall. + */ + @Path("/data[at0001]/items[at0049 and name/value='Aufnahmeanlass']/value|defining_code") + private AufnahmeanlassDefiningCode aufnahmeanlassDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Tree/Aufnahmeanlass/null_flavour + */ + @Path("/data[at0001]/items[at0049 and name/value='Aufnahmeanlass']/null_flavour|defining_code") + private NullFlavour aufnahmeanlassNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Identifikationsnummer des Patienten vor der Aufnahme + * Description: Identifikationsnummer des Patienten vor der Aufnahme + */ + @Path("/data[at0001]/items[at0023]/value|value") + private String identifikationsnummerDesPatientenVorDerAufnahmeValue; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Tree/Identifikationsnummer des Patienten vor der Aufnahme/null_flavour + */ + @Path("/data[at0001]/items[at0023]/null_flavour|defining_code") + private NullFlavour identifikationsnummerDesPatientenVorDerAufnahmeNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Datum/Uhrzeit der Aufnahme + * Description: Datum/Zeit, an dem der Patient aufgenommen wurde. + */ + @Path("/data[at0001]/items[at0071]/value|value") + private TemporalAccessor datumUhrzeitDerAufnahmeValue; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Tree/Datum/Uhrzeit der Aufnahme/null_flavour + */ + @Path("/data[at0001]/items[at0071]/null_flavour|defining_code") + private NullFlavour datumUhrzeitDerAufnahmeNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Zugewiesener Patientenstandort + * Description: Zugewiesener Patientenstandort + */ + @Path("/data[at0001]/items[at0131]") + private List<Cluster> zugewiesenerPatientenstandort; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Vorheriger Patientenstandort (vor Aufnahme) + * Description: Standort umfasst sowohl beiläufige Orte (ein Ort, der für die medizinische Versorgung ohne vorherige Benennung oder Genehmigung genutzt wird) als auch spezielle, offiziell benannte Orte. Die Standorte können privat, öffentlich, mobil oder stationär sein. + */ + @Path("/data[at0001]/items[openEHR-EHR-CLUSTER.location.v1 and name/value='Vorheriger Patientenstandort (vor Aufnahme)']") + private VorherigerPatientenstandortVorAufnahmeCluster vorherigerPatientenstandortVorAufnahme; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Vorherige verantwortliche Organisationseinheit (vor Aufnahme) + * Description: Eine fachliche Einheit, Organisation, Abteilung, Zusammenschluss, Gruppierung mit einem gemeinsamen Ziel. + */ + @Path("/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0 and name/value='Vorherige verantwortliche Organisationseinheit (vor Aufnahme)']") + private VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster vorherigeVerantwortlicheOrganisationseinheitVorAufnahme; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/subject + */ + @Path("/subject") + private PartyProxy subject; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/language + */ + @Path("/language") + private Language language; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setAufnahmegrundDefiningCode(AufnahmegrundDefiningCode aufnahmegrundDefiningCode) { + this.aufnahmegrundDefiningCode = aufnahmegrundDefiningCode; + } + + public AufnahmegrundDefiningCode getAufnahmegrundDefiningCode() { + return this.aufnahmegrundDefiningCode ; + } + + public void setAufnahmegrundNullFlavourDefiningCode( + NullFlavour aufnahmegrundNullFlavourDefiningCode) { + this.aufnahmegrundNullFlavourDefiningCode = aufnahmegrundNullFlavourDefiningCode; + } + + public NullFlavour getAufnahmegrundNullFlavourDefiningCode() { + return this.aufnahmegrundNullFlavourDefiningCode ; + } + + public void setAufnahmeanlassDefiningCode(AufnahmeanlassDefiningCode aufnahmeanlassDefiningCode) { + this.aufnahmeanlassDefiningCode = aufnahmeanlassDefiningCode; + } + + public AufnahmeanlassDefiningCode getAufnahmeanlassDefiningCode() { + return this.aufnahmeanlassDefiningCode ; + } + + public void setAufnahmeanlassNullFlavourDefiningCode( + NullFlavour aufnahmeanlassNullFlavourDefiningCode) { + this.aufnahmeanlassNullFlavourDefiningCode = aufnahmeanlassNullFlavourDefiningCode; + } + + public NullFlavour getAufnahmeanlassNullFlavourDefiningCode() { + return this.aufnahmeanlassNullFlavourDefiningCode ; + } + + public void setIdentifikationsnummerDesPatientenVorDerAufnahmeValue( + String identifikationsnummerDesPatientenVorDerAufnahmeValue) { + this.identifikationsnummerDesPatientenVorDerAufnahmeValue = identifikationsnummerDesPatientenVorDerAufnahmeValue; + } + + public String getIdentifikationsnummerDesPatientenVorDerAufnahmeValue() { + return this.identifikationsnummerDesPatientenVorDerAufnahmeValue ; + } + + public void setIdentifikationsnummerDesPatientenVorDerAufnahmeNullFlavourDefiningCode( + NullFlavour identifikationsnummerDesPatientenVorDerAufnahmeNullFlavourDefiningCode) { + this.identifikationsnummerDesPatientenVorDerAufnahmeNullFlavourDefiningCode = identifikationsnummerDesPatientenVorDerAufnahmeNullFlavourDefiningCode; + } + + public NullFlavour getIdentifikationsnummerDesPatientenVorDerAufnahmeNullFlavourDefiningCode() { + return this.identifikationsnummerDesPatientenVorDerAufnahmeNullFlavourDefiningCode ; + } + + public void setDatumUhrzeitDerAufnahmeValue(TemporalAccessor datumUhrzeitDerAufnahmeValue) { + this.datumUhrzeitDerAufnahmeValue = datumUhrzeitDerAufnahmeValue; + } + + public TemporalAccessor getDatumUhrzeitDerAufnahmeValue() { + return this.datumUhrzeitDerAufnahmeValue ; + } + + public void setDatumUhrzeitDerAufnahmeNullFlavourDefiningCode( + NullFlavour datumUhrzeitDerAufnahmeNullFlavourDefiningCode) { + this.datumUhrzeitDerAufnahmeNullFlavourDefiningCode = datumUhrzeitDerAufnahmeNullFlavourDefiningCode; + } + + public NullFlavour getDatumUhrzeitDerAufnahmeNullFlavourDefiningCode() { + return this.datumUhrzeitDerAufnahmeNullFlavourDefiningCode ; + } + + public void setZugewiesenerPatientenstandort(List<Cluster> zugewiesenerPatientenstandort) { + this.zugewiesenerPatientenstandort = zugewiesenerPatientenstandort; + } + + public List<Cluster> getZugewiesenerPatientenstandort() { + return this.zugewiesenerPatientenstandort ; + } + + public void setVorherigerPatientenstandortVorAufnahme( + VorherigerPatientenstandortVorAufnahmeCluster vorherigerPatientenstandortVorAufnahme) { + this.vorherigerPatientenstandortVorAufnahme = vorherigerPatientenstandortVorAufnahme; + } + + public VorherigerPatientenstandortVorAufnahmeCluster getVorherigerPatientenstandortVorAufnahme() { + return this.vorherigerPatientenstandortVorAufnahme ; + } + + public void setVorherigeVerantwortlicheOrganisationseinheitVorAufnahme( + VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster vorherigeVerantwortlicheOrganisationseinheitVorAufnahme) { + this.vorherigeVerantwortlicheOrganisationseinheitVorAufnahme = vorherigeVerantwortlicheOrganisationseinheitVorAufnahme; + } + + public VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster getVorherigeVerantwortlicheOrganisationseinheitVorAufnahme( + ) { + return this.vorherigeVerantwortlicheOrganisationseinheitVorAufnahme ; + } + + public void setSubject(PartyProxy subject) { + this.subject = subject; + } + + public PartyProxy getSubject() { + return this.subject ; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public Language getLanguage() { + return this.language ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/AufnahmedatenAdminEntryContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/AufnahmedatenAdminEntryContainment.java new file mode 100644 index 000000000..40cb123a5 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/AufnahmedatenAdminEntryContainment.java @@ -0,0 +1,54 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.generic.PartyProxy; +import java.lang.String; +import java.time.temporal.TemporalAccessor; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +public class AufnahmedatenAdminEntryContainment extends Containment { + public SelectAqlField<AufnahmedatenAdminEntry> AUFNAHMEDATEN_ADMIN_ENTRY = new AqlFieldImp<AufnahmedatenAdminEntry>(AufnahmedatenAdminEntry.class, "", "AufnahmedatenAdminEntry", AufnahmedatenAdminEntry.class, this); + + public SelectAqlField<AufnahmegrundDefiningCode> AUFNAHMEGRUND_DEFINING_CODE = new AqlFieldImp<AufnahmegrundDefiningCode>(AufnahmedatenAdminEntry.class, "/data[at0001]/items[at0013]/value|defining_code", "aufnahmegrundDefiningCode", AufnahmegrundDefiningCode.class, this); + + public SelectAqlField<NullFlavour> AUFNAHMEGRUND_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(AufnahmedatenAdminEntry.class, "/data[at0001]/items[at0013]/null_flavour|defining_code", "aufnahmegrundNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<AufnahmeanlassDefiningCode> AUFNAHMEANLASS_DEFINING_CODE = new AqlFieldImp<AufnahmeanlassDefiningCode>(AufnahmedatenAdminEntry.class, "/data[at0001]/items[at0049]/value|defining_code", "aufnahmeanlassDefiningCode", AufnahmeanlassDefiningCode.class, this); + + public SelectAqlField<NullFlavour> AUFNAHMEANLASS_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(AufnahmedatenAdminEntry.class, "/data[at0001]/items[at0049]/null_flavour|defining_code", "aufnahmeanlassNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> IDENTIFIKATIONSNUMMER_DES_PATIENTEN_VOR_DER_AUFNAHME_VALUE = new AqlFieldImp<String>(AufnahmedatenAdminEntry.class, "/data[at0001]/items[at0023]/value|value", "identifikationsnummerDesPatientenVorDerAufnahmeValue", String.class, this); + + public SelectAqlField<NullFlavour> IDENTIFIKATIONSNUMMER_DES_PATIENTEN_VOR_DER_AUFNAHME_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(AufnahmedatenAdminEntry.class, "/data[at0001]/items[at0023]/null_flavour|defining_code", "identifikationsnummerDesPatientenVorDerAufnahmeNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<TemporalAccessor> DATUM_UHRZEIT_DER_AUFNAHME_VALUE = new AqlFieldImp<TemporalAccessor>(AufnahmedatenAdminEntry.class, "/data[at0001]/items[at0071]/value|value", "datumUhrzeitDerAufnahmeValue", TemporalAccessor.class, this); + + public SelectAqlField<NullFlavour> DATUM_UHRZEIT_DER_AUFNAHME_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(AufnahmedatenAdminEntry.class, "/data[at0001]/items[at0071]/null_flavour|defining_code", "datumUhrzeitDerAufnahmeNullFlavourDefiningCode", NullFlavour.class, this); + + public ListSelectAqlField<Cluster> ZUGEWIESENER_PATIENTENSTANDORT = new ListAqlFieldImp<Cluster>(AufnahmedatenAdminEntry.class, "/data[at0001]/items[at0131]", "zugewiesenerPatientenstandort", Cluster.class, this); + + public SelectAqlField<VorherigerPatientenstandortVorAufnahmeCluster> VORHERIGER_PATIENTENSTANDORT_VOR_AUFNAHME = new AqlFieldImp<VorherigerPatientenstandortVorAufnahmeCluster>(AufnahmedatenAdminEntry.class, "/data[at0001]/items[openEHR-EHR-CLUSTER.location.v1]", "vorherigerPatientenstandortVorAufnahme", VorherigerPatientenstandortVorAufnahmeCluster.class, this); + + public SelectAqlField<VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster> VORHERIGE_VERANTWORTLICHE_ORGANISATIONSEINHEIT_VOR_AUFNAHME = new AqlFieldImp<VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster>(AufnahmedatenAdminEntry.class, "/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]", "vorherigeVerantwortlicheOrganisationseinheitVorAufnahme", VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster.class, this); + + public SelectAqlField<PartyProxy> SUBJECT = new AqlFieldImp<PartyProxy>(AufnahmedatenAdminEntry.class, "/subject", "subject", PartyProxy.class, this); + + public SelectAqlField<Language> LANGUAGE = new AqlFieldImp<Language>(AufnahmedatenAdminEntry.class, "/language", "language", Language.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(AufnahmedatenAdminEntry.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + private AufnahmedatenAdminEntryContainment() { + super("openEHR-EHR-ADMIN_ENTRY.admission.v0"); + } + + public static AufnahmedatenAdminEntryContainment getInstance() { + return new AufnahmedatenAdminEntryContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/AufnahmegrundDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/AufnahmegrundDefiningCode.java new file mode 100644 index 000000000..8a519e922 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/AufnahmegrundDefiningCode.java @@ -0,0 +1,55 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition; + +import java.lang.String; +import org.ehrbase.client.classgenerator.EnumValueSet; + +public enum AufnahmegrundDefiningCode implements EnumValueSet { + STATIONSAEQUIVALENTE_BEHANDLUNG("Stationsäquivalente Behandlung", "", "§21 KHEntgG", "10"), + + VORSTATIONAERE_BEHANDLUNG_OHNE_ANSCHLIESSENDE_VOLLSTATIONAERE_BEHANDLUNG("vorstationäre Behandlung ohne anschließende vollstationäre Behandlung", "", "§21 KHEntgG", "04"), + + GEBURT("Geburt", "", "§21 KHEntgG", "06"), + + KRANKENHAUSBEHANDLUNG_VOLLSTATIONAER("Krankenhausbehandlung, vollstationär", "", "§21 KHEntgG", "01"), + + KRANKENHAUSBEHANDLUNG_VOLLSTATIONAER_MIT_VORAUSGEGANGENER_VORSTATIONAERER_BEHANDLUNG("Krankenhausbehandlung, vollstationär mit vorausgegangener vorstationärer Behandlung", "", "§21 KHEntgG", "02"), + + KRANKENHAUSBEHANDLUNG_TEILSTATIONAER("Krankenhausbehandlung, teilstationär", "", "§21 KHEntgG", "03"), + + STATIONAERE_AUFNAHME_ZUR_ORGANENTNAHME("Stationäre Aufnahme zur Organentnahme", "", "§21 KHEntgG", "08"), + + STATIONAERE_ENTBINDUNG("Stationäre Entbindung", "", "§21 KHEntgG", "05"), + + WIEDERAUFNAHME_WEGEN_KOMPLIKATIONEN_FALLPAUSCHALE_NACH_KFPV2003("Wiederaufnahme wegen Komplikationen (Fallpauschale) nach KFPV 2003", "", "§21 KHEntgG", "07"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + AufnahmegrundDefiningCode(String value, String description, String terminologyId, String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/EntlassungsdatenAdminEntry.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/EntlassungsdatenAdminEntry.java new file mode 100644 index 000000000..6c7eb1aaa --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/EntlassungsdatenAdminEntry.java @@ -0,0 +1,236 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.generic.PartyProxy; +import java.lang.String; +import java.time.temporal.TemporalAccessor; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.EntryEntity; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Archetype("openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-30T13:55:38.292218700+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +public class EntlassungsdatenAdminEntry implements EntryEntity { + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Art der Entlassung + * Description: Grund der Entlassung + */ + @Path("/data[at0001]/items[at0040]/value|defining_code") + private ArtDerEntlassungDefiningCode artDerEntlassungDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Tree/Art der Entlassung/null_flavour + */ + @Path("/data[at0001]/items[at0040]/null_flavour|defining_code") + private NullFlavour artDerEntlassungNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Klinischer Zustand des Patienten + * Description: Klinischer Zustand des Patienten. + */ + @Path("/data[at0001]/items[at0002]/value|defining_code") + private KlinischerZustandDesPatientenDefiningCode klinischerZustandDesPatientenDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Tree/Klinischer Zustand des Patienten/null_flavour + */ + @Path("/data[at0001]/items[at0002]/null_flavour|defining_code") + private NullFlavour klinischerZustandDesPatientenNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Datum/Uhrzeit der Entlassung + * Description: Datum/Uhrzeit, an dem der Patient entlassen wurde. + */ + @Path("/data[at0001]/items[at0011 and name/value='Datum/Uhrzeit der Entlassung']/value|value") + private TemporalAccessor datumUhrzeitDerEntlassungValue; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Tree/Datum/Uhrzeit der Entlassung/null_flavour + */ + @Path("/data[at0001]/items[at0011 and name/value='Datum/Uhrzeit der Entlassung']/null_flavour|defining_code") + private NullFlavour datumUhrzeitDerEntlassungNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Zusätzliche Informationen + * Description: Kommentare + */ + @Path("/data[at0001]/items[at0050]/value|value") + private String zusaetzlicheInformationenValue; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Tree/Zusätzliche Informationen/null_flavour + */ + @Path("/data[at0001]/items[at0050]/null_flavour|defining_code") + private NullFlavour zusaetzlicheInformationenNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Letzter Patientenstandort + * Description: * + */ + @Path("/data[at0001]/items[at0066]") + private List<Cluster> letzterPatientenstandort; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Zugewiesener Standort (bei Entlassung) + * Description: Standort umfasst sowohl beiläufige Orte (ein Ort, der für die medizinische Versorgung ohne vorherige Benennung oder Genehmigung genutzt wird) als auch spezielle, offiziell benannte Orte. Die Standorte können privat, öffentlich, mobil oder stationär sein. + */ + @Path("/data[at0001]/items[openEHR-EHR-CLUSTER.location.v1 and name/value='Zugewiesener Standort (bei Entlassung)']") + private List<ZugewiesenerStandortBeiEntlassungCluster> zugewiesenerStandortBeiEntlassung; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Zugewiesene verantwortliche Organisationseinheit (bei Entlassung) + * Description: Eine fachliche Einheit, Organisation, Abteilung, Zusammenschluss, Gruppierung mit einem gemeinsamen Ziel. + */ + @Path("/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0 and name/value='Zugewiesene verantwortliche Organisationseinheit (bei Entlassung)']") + private List<ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster> zugewieseneVerantwortlicheOrganisationseinheitBeiEntlassung; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/subject + */ + @Path("/subject") + private PartyProxy subject; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/language + */ + @Path("/language") + private Language language; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setArtDerEntlassungDefiningCode( + ArtDerEntlassungDefiningCode artDerEntlassungDefiningCode) { + this.artDerEntlassungDefiningCode = artDerEntlassungDefiningCode; + } + + public ArtDerEntlassungDefiningCode getArtDerEntlassungDefiningCode() { + return this.artDerEntlassungDefiningCode ; + } + + public void setArtDerEntlassungNullFlavourDefiningCode( + NullFlavour artDerEntlassungNullFlavourDefiningCode) { + this.artDerEntlassungNullFlavourDefiningCode = artDerEntlassungNullFlavourDefiningCode; + } + + public NullFlavour getArtDerEntlassungNullFlavourDefiningCode() { + return this.artDerEntlassungNullFlavourDefiningCode ; + } + + public void setKlinischerZustandDesPatientenDefiningCode( + KlinischerZustandDesPatientenDefiningCode klinischerZustandDesPatientenDefiningCode) { + this.klinischerZustandDesPatientenDefiningCode = klinischerZustandDesPatientenDefiningCode; + } + + public KlinischerZustandDesPatientenDefiningCode getKlinischerZustandDesPatientenDefiningCode() { + return this.klinischerZustandDesPatientenDefiningCode ; + } + + public void setKlinischerZustandDesPatientenNullFlavourDefiningCode( + NullFlavour klinischerZustandDesPatientenNullFlavourDefiningCode) { + this.klinischerZustandDesPatientenNullFlavourDefiningCode = klinischerZustandDesPatientenNullFlavourDefiningCode; + } + + public NullFlavour getKlinischerZustandDesPatientenNullFlavourDefiningCode() { + return this.klinischerZustandDesPatientenNullFlavourDefiningCode ; + } + + public void setDatumUhrzeitDerEntlassungValue(TemporalAccessor datumUhrzeitDerEntlassungValue) { + this.datumUhrzeitDerEntlassungValue = datumUhrzeitDerEntlassungValue; + } + + public TemporalAccessor getDatumUhrzeitDerEntlassungValue() { + return this.datumUhrzeitDerEntlassungValue ; + } + + public void setDatumUhrzeitDerEntlassungNullFlavourDefiningCode( + NullFlavour datumUhrzeitDerEntlassungNullFlavourDefiningCode) { + this.datumUhrzeitDerEntlassungNullFlavourDefiningCode = datumUhrzeitDerEntlassungNullFlavourDefiningCode; + } + + public NullFlavour getDatumUhrzeitDerEntlassungNullFlavourDefiningCode() { + return this.datumUhrzeitDerEntlassungNullFlavourDefiningCode ; + } + + public void setZusaetzlicheInformationenValue(String zusaetzlicheInformationenValue) { + this.zusaetzlicheInformationenValue = zusaetzlicheInformationenValue; + } + + public String getZusaetzlicheInformationenValue() { + return this.zusaetzlicheInformationenValue ; + } + + public void setZusaetzlicheInformationenNullFlavourDefiningCode( + NullFlavour zusaetzlicheInformationenNullFlavourDefiningCode) { + this.zusaetzlicheInformationenNullFlavourDefiningCode = zusaetzlicheInformationenNullFlavourDefiningCode; + } + + public NullFlavour getZusaetzlicheInformationenNullFlavourDefiningCode() { + return this.zusaetzlicheInformationenNullFlavourDefiningCode ; + } + + public void setLetzterPatientenstandort(List<Cluster> letzterPatientenstandort) { + this.letzterPatientenstandort = letzterPatientenstandort; + } + + public List<Cluster> getLetzterPatientenstandort() { + return this.letzterPatientenstandort ; + } + + public void setZugewiesenerStandortBeiEntlassung( + List<ZugewiesenerStandortBeiEntlassungCluster> zugewiesenerStandortBeiEntlassung) { + this.zugewiesenerStandortBeiEntlassung = zugewiesenerStandortBeiEntlassung; + } + + public List<ZugewiesenerStandortBeiEntlassungCluster> getZugewiesenerStandortBeiEntlassung() { + return this.zugewiesenerStandortBeiEntlassung ; + } + + public void setZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassung( + List<ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster> zugewieseneVerantwortlicheOrganisationseinheitBeiEntlassung) { + this.zugewieseneVerantwortlicheOrganisationseinheitBeiEntlassung = zugewieseneVerantwortlicheOrganisationseinheitBeiEntlassung; + } + + public List<ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster> getZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassung( + ) { + return this.zugewieseneVerantwortlicheOrganisationseinheitBeiEntlassung ; + } + + public void setSubject(PartyProxy subject) { + this.subject = subject; + } + + public PartyProxy getSubject() { + return this.subject ; + } + + public void setLanguage(Language language) { + this.language = language; + } + + public Language getLanguage() { + return this.language ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/EntlassungsdatenAdminEntryContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/EntlassungsdatenAdminEntryContainment.java new file mode 100644 index 000000000..278cbd6dc --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/EntlassungsdatenAdminEntryContainment.java @@ -0,0 +1,54 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import com.nedap.archie.rm.generic.PartyProxy; +import java.lang.String; +import java.time.temporal.TemporalAccessor; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +public class EntlassungsdatenAdminEntryContainment extends Containment { + public SelectAqlField<EntlassungsdatenAdminEntry> ENTLASSUNGSDATEN_ADMIN_ENTRY = new AqlFieldImp<EntlassungsdatenAdminEntry>(EntlassungsdatenAdminEntry.class, "", "EntlassungsdatenAdminEntry", EntlassungsdatenAdminEntry.class, this); + + public SelectAqlField<ArtDerEntlassungDefiningCode> ART_DER_ENTLASSUNG_DEFINING_CODE = new AqlFieldImp<ArtDerEntlassungDefiningCode>(EntlassungsdatenAdminEntry.class, "/data[at0001]/items[at0040]/value|defining_code", "artDerEntlassungDefiningCode", ArtDerEntlassungDefiningCode.class, this); + + public SelectAqlField<NullFlavour> ART_DER_ENTLASSUNG_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(EntlassungsdatenAdminEntry.class, "/data[at0001]/items[at0040]/null_flavour|defining_code", "artDerEntlassungNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<KlinischerZustandDesPatientenDefiningCode> KLINISCHER_ZUSTAND_DES_PATIENTEN_DEFINING_CODE = new AqlFieldImp<KlinischerZustandDesPatientenDefiningCode>(EntlassungsdatenAdminEntry.class, "/data[at0001]/items[at0002]/value|defining_code", "klinischerZustandDesPatientenDefiningCode", KlinischerZustandDesPatientenDefiningCode.class, this); + + public SelectAqlField<NullFlavour> KLINISCHER_ZUSTAND_DES_PATIENTEN_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(EntlassungsdatenAdminEntry.class, "/data[at0001]/items[at0002]/null_flavour|defining_code", "klinischerZustandDesPatientenNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<TemporalAccessor> DATUM_UHRZEIT_DER_ENTLASSUNG_VALUE = new AqlFieldImp<TemporalAccessor>(EntlassungsdatenAdminEntry.class, "/data[at0001]/items[at0011]/value|value", "datumUhrzeitDerEntlassungValue", TemporalAccessor.class, this); + + public SelectAqlField<NullFlavour> DATUM_UHRZEIT_DER_ENTLASSUNG_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(EntlassungsdatenAdminEntry.class, "/data[at0001]/items[at0011]/null_flavour|defining_code", "datumUhrzeitDerEntlassungNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> ZUSAETZLICHE_INFORMATIONEN_VALUE = new AqlFieldImp<String>(EntlassungsdatenAdminEntry.class, "/data[at0001]/items[at0050]/value|value", "zusaetzlicheInformationenValue", String.class, this); + + public SelectAqlField<NullFlavour> ZUSAETZLICHE_INFORMATIONEN_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(EntlassungsdatenAdminEntry.class, "/data[at0001]/items[at0050]/null_flavour|defining_code", "zusaetzlicheInformationenNullFlavourDefiningCode", NullFlavour.class, this); + + public ListSelectAqlField<Cluster> LETZTER_PATIENTENSTANDORT = new ListAqlFieldImp<Cluster>(EntlassungsdatenAdminEntry.class, "/data[at0001]/items[at0066]", "letzterPatientenstandort", Cluster.class, this); + + public ListSelectAqlField<ZugewiesenerStandortBeiEntlassungCluster> ZUGEWIESENER_STANDORT_BEI_ENTLASSUNG = new ListAqlFieldImp<ZugewiesenerStandortBeiEntlassungCluster>(EntlassungsdatenAdminEntry.class, "/data[at0001]/items[openEHR-EHR-CLUSTER.location.v1]", "zugewiesenerStandortBeiEntlassung", ZugewiesenerStandortBeiEntlassungCluster.class, this); + + public ListSelectAqlField<ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster> ZUGEWIESENE_VERANTWORTLICHE_ORGANISATIONSEINHEIT_BEI_ENTLASSUNG = new ListAqlFieldImp<ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster>(EntlassungsdatenAdminEntry.class, "/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]", "zugewieseneVerantwortlicheOrganisationseinheitBeiEntlassung", ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster.class, this); + + public SelectAqlField<PartyProxy> SUBJECT = new AqlFieldImp<PartyProxy>(EntlassungsdatenAdminEntry.class, "/subject", "subject", PartyProxy.class, this); + + public SelectAqlField<Language> LANGUAGE = new AqlFieldImp<Language>(EntlassungsdatenAdminEntry.class, "/language", "language", Language.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(EntlassungsdatenAdminEntry.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + private EntlassungsdatenAdminEntryContainment() { + super("openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0"); + } + + public static EntlassungsdatenAdminEntryContainment getInstance() { + return new EntlassungsdatenAdminEntryContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/FachlicheOrganisationseinheitCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/FachlicheOrganisationseinheitCluster.java new file mode 100644 index 000000000..82d3e1eae --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/FachlicheOrganisationseinheitCluster.java @@ -0,0 +1,201 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import java.lang.Boolean; +import java.lang.String; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.LocatableEntity; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Archetype("openEHR-EHR-CLUSTER.organization.v0") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-30T13:55:38.206413300+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +public class FachlicheOrganisationseinheitCluster implements LocatableEntity { + /** + * Path: Stationärer Versorgungsfall/context/Fachliche Organisationseinheit/Typ + * Description: Art der Organisationseinheit. + * Comment: Zum Beispiel: Fachabteilung im Krankenhaus, Versicherungsunternehmen, Sponsor + */ + @Path("/items[at0051]/value|value") + private String typValue; + + /** + * Path: Stationärer Versorgungsfall/context/Baum/Fachliche Organisationseinheit/Typ/null_flavour + */ + @Path("/items[at0051]/null_flavour|defining_code") + private NullFlavour typNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/context/Fachliche Organisationseinheit/Organisationsschlüssel + * Description: Eindeutiger Identifikator der Organisationseinheit. + */ + @Path("/items[at0024]/value|defining_code") + private OrganisationsschluesselDefiningCode organisationsschluesselDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/context/Baum/Fachliche Organisationseinheit/Organisationsschlüssel/null_flavour + */ + @Path("/items[at0024]/null_flavour|defining_code") + private NullFlavour organisationsschluesselNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/context/Fachliche Organisationseinheit/Name + * Description: Bezeichnung für die Organisationseinheit + */ + @Path("/items[at0052]/value|value") + private String nameValue; + + /** + * Path: Stationärer Versorgungsfall/context/Baum/Fachliche Organisationseinheit/Name/null_flavour + */ + @Path("/items[at0052]/null_flavour|defining_code") + private NullFlavour nameNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/context/Fachliche Organisationseinheit/Aktiv/Inaktiv + * Description: Gibt an, ob die Organisationseinheit noch aktiv ist. + */ + @Path("/items[at0050]/value|value") + private Boolean aktivInaktivValue; + + /** + * Path: Stationärer Versorgungsfall/context/Baum/Fachliche Organisationseinheit/Aktiv/Inaktiv/null_flavour + */ + @Path("/items[at0050]/null_flavour|defining_code") + private NullFlavour aktivInaktivNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/context/Fachliche Organisationseinheit/Zusätzliche Beschreibung + * Description: Zusätzliche Informationen + */ + @Path("/items[at0046]/value|value") + private String zusaetzlicheBeschreibungValue; + + /** + * Path: Stationärer Versorgungsfall/context/Baum/Fachliche Organisationseinheit/Zusätzliche Beschreibung/null_flavour + */ + @Path("/items[at0046]/null_flavour|defining_code") + private NullFlavour zusaetzlicheBeschreibungNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/context/Fachliche Organisationseinheit/Details + * Description: Für die Erfassung weiterer Angaben über die Organisationseinheit, zum Beispiel Adresse oder Telekommunikationsdetails. + */ + @Path("/items[at0047]") + private List<Cluster> details; + + /** + * Path: Stationärer Versorgungsfall/context/Fachliche Organisationseinheit/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setTypValue(String typValue) { + this.typValue = typValue; + } + + public String getTypValue() { + return this.typValue ; + } + + public void setTypNullFlavourDefiningCode(NullFlavour typNullFlavourDefiningCode) { + this.typNullFlavourDefiningCode = typNullFlavourDefiningCode; + } + + public NullFlavour getTypNullFlavourDefiningCode() { + return this.typNullFlavourDefiningCode ; + } + + public void setOrganisationsschluesselDefiningCode( + OrganisationsschluesselDefiningCode organisationsschluesselDefiningCode) { + this.organisationsschluesselDefiningCode = organisationsschluesselDefiningCode; + } + + public OrganisationsschluesselDefiningCode getOrganisationsschluesselDefiningCode() { + return this.organisationsschluesselDefiningCode ; + } + + public void setOrganisationsschluesselNullFlavourDefiningCode( + NullFlavour organisationsschluesselNullFlavourDefiningCode) { + this.organisationsschluesselNullFlavourDefiningCode = organisationsschluesselNullFlavourDefiningCode; + } + + public NullFlavour getOrganisationsschluesselNullFlavourDefiningCode() { + return this.organisationsschluesselNullFlavourDefiningCode ; + } + + public void setNameValue(String nameValue) { + this.nameValue = nameValue; + } + + public String getNameValue() { + return this.nameValue ; + } + + public void setNameNullFlavourDefiningCode(NullFlavour nameNullFlavourDefiningCode) { + this.nameNullFlavourDefiningCode = nameNullFlavourDefiningCode; + } + + public NullFlavour getNameNullFlavourDefiningCode() { + return this.nameNullFlavourDefiningCode ; + } + + public void setAktivInaktivValue(Boolean aktivInaktivValue) { + this.aktivInaktivValue = aktivInaktivValue; + } + + public Boolean isAktivInaktivValue() { + return this.aktivInaktivValue ; + } + + public void setAktivInaktivNullFlavourDefiningCode( + NullFlavour aktivInaktivNullFlavourDefiningCode) { + this.aktivInaktivNullFlavourDefiningCode = aktivInaktivNullFlavourDefiningCode; + } + + public NullFlavour getAktivInaktivNullFlavourDefiningCode() { + return this.aktivInaktivNullFlavourDefiningCode ; + } + + public void setZusaetzlicheBeschreibungValue(String zusaetzlicheBeschreibungValue) { + this.zusaetzlicheBeschreibungValue = zusaetzlicheBeschreibungValue; + } + + public String getZusaetzlicheBeschreibungValue() { + return this.zusaetzlicheBeschreibungValue ; + } + + public void setZusaetzlicheBeschreibungNullFlavourDefiningCode( + NullFlavour zusaetzlicheBeschreibungNullFlavourDefiningCode) { + this.zusaetzlicheBeschreibungNullFlavourDefiningCode = zusaetzlicheBeschreibungNullFlavourDefiningCode; + } + + public NullFlavour getZusaetzlicheBeschreibungNullFlavourDefiningCode() { + return this.zusaetzlicheBeschreibungNullFlavourDefiningCode ; + } + + public void setDetails(List<Cluster> details) { + this.details = details; + } + + public List<Cluster> getDetails() { + return this.details ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/FachlicheOrganisationseinheitClusterContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/FachlicheOrganisationseinheitClusterContainment.java new file mode 100644 index 000000000..f7366832b --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/FachlicheOrganisationseinheitClusterContainment.java @@ -0,0 +1,48 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import java.lang.Boolean; +import java.lang.String; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +public class FachlicheOrganisationseinheitClusterContainment extends Containment { + public SelectAqlField<FachlicheOrganisationseinheitCluster> FACHLICHE_ORGANISATIONSEINHEIT_CLUSTER = new AqlFieldImp<FachlicheOrganisationseinheitCluster>(FachlicheOrganisationseinheitCluster.class, "", "FachlicheOrganisationseinheitCluster", FachlicheOrganisationseinheitCluster.class, this); + + public SelectAqlField<String> TYP_VALUE = new AqlFieldImp<String>(FachlicheOrganisationseinheitCluster.class, "/items[at0051]/value|value", "typValue", String.class, this); + + public SelectAqlField<NullFlavour> TYP_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(FachlicheOrganisationseinheitCluster.class, "/items[at0051]/null_flavour|defining_code", "typNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<OrganisationsschluesselDefiningCode> ORGANISATIONSSCHLUESSEL_DEFINING_CODE = new AqlFieldImp<OrganisationsschluesselDefiningCode>(FachlicheOrganisationseinheitCluster.class, "/items[at0024]/value|defining_code", "organisationsschluesselDefiningCode", OrganisationsschluesselDefiningCode.class, this); + + public SelectAqlField<NullFlavour> ORGANISATIONSSCHLUESSEL_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(FachlicheOrganisationseinheitCluster.class, "/items[at0024]/null_flavour|defining_code", "organisationsschluesselNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> NAME_VALUE = new AqlFieldImp<String>(FachlicheOrganisationseinheitCluster.class, "/items[at0052]/value|value", "nameValue", String.class, this); + + public SelectAqlField<NullFlavour> NAME_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(FachlicheOrganisationseinheitCluster.class, "/items[at0052]/null_flavour|defining_code", "nameNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<Boolean> AKTIV_INAKTIV_VALUE = new AqlFieldImp<Boolean>(FachlicheOrganisationseinheitCluster.class, "/items[at0050]/value|value", "aktivInaktivValue", Boolean.class, this); + + public SelectAqlField<NullFlavour> AKTIV_INAKTIV_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(FachlicheOrganisationseinheitCluster.class, "/items[at0050]/null_flavour|defining_code", "aktivInaktivNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> ZUSAETZLICHE_BESCHREIBUNG_VALUE = new AqlFieldImp<String>(FachlicheOrganisationseinheitCluster.class, "/items[at0046]/value|value", "zusaetzlicheBeschreibungValue", String.class, this); + + public SelectAqlField<NullFlavour> ZUSAETZLICHE_BESCHREIBUNG_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(FachlicheOrganisationseinheitCluster.class, "/items[at0046]/null_flavour|defining_code", "zusaetzlicheBeschreibungNullFlavourDefiningCode", NullFlavour.class, this); + + public ListSelectAqlField<Cluster> DETAILS = new ListAqlFieldImp<Cluster>(FachlicheOrganisationseinheitCluster.class, "/items[at0047]", "details", Cluster.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(FachlicheOrganisationseinheitCluster.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + private FachlicheOrganisationseinheitClusterContainment() { + super("openEHR-EHR-CLUSTER.organization.v0"); + } + + public static FachlicheOrganisationseinheitClusterContainment getInstance() { + return new FachlicheOrganisationseinheitClusterContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/FallstatusDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/FallstatusDefiningCode.java new file mode 100644 index 000000000..07fea5403 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/FallstatusDefiningCode.java @@ -0,0 +1,51 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition; + +import java.lang.String; +import org.ehrbase.client.classgenerator.EnumValueSet; + +public enum FallstatusDefiningCode implements EnumValueSet { + FINISHED("Finished", "", "http://hl7.org/fhir/encounter-status", "finished"), + + IN_PROGRESS("In Progress", "", "http://hl7.org/fhir/encounter-status", "in-progress"), + + UNKNOWN("Unknown", "", "http://hl7.org/fhir/encounter-status", "unknown"), + + PLANNED("Planned", "", "http://hl7.org/fhir/encounter-status", "planned"), + + ON_LEAVE("On Leave", "", "http://hl7.org/fhir/encounter-status", "onleave"), + + CANCELLED("Cancelled", "", "http://hl7.org/fhir/encounter-status", "cancelled"), + + ENTERED_IN_ERROR("Entered in Error", "", "http://hl7.org/fhir/encounter-status", "entered-in-error"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + FallstatusDefiningCode(String value, String description, String terminologyId, String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/KlinischerZustandDesPatientenDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/KlinischerZustandDesPatientenDefiningCode.java new file mode 100644 index 000000000..7f2ae8a90 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/KlinischerZustandDesPatientenDefiningCode.java @@ -0,0 +1,52 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition; + +import java.lang.String; +import org.ehrbase.client.classgenerator.EnumValueSet; + +public enum KlinischerZustandDesPatientenDefiningCode implements EnumValueSet { + IDENTISCHER_ZUSTAND("Identischer Zustand", "Der Gesundheitszustand des Patienten ist identisch, wie bei der Aufnahme.", "local", "at0005"), + + UNBESTIMMT("Unbestimmt", "Unbestimmt.", "local", "at0008"), + + GEHEILT("Geheilt", "Der Patient ist geheilt.", "local", "at0003"), + + SONSTIGE("Sonstige", "Sonstige", "local", "at0068"), + + SCHLECHTER("Schlechter", "Der Gesundheitszustand des Patienten ist schlechter, als bei der Aufnahme.", "local", "at0006"), + + VERBESSERT("Verbessert", "Der Gesundheitszustand des Patienten hat sich verbessert.", "local", "at0004"), + + VERSTORBEN("Verstorben", "Der Patient verstarb während des Krankenhausaufenthaltes.", "local", "at0007"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + KlinischerZustandDesPatientenDefiningCode(String value, String description, String terminologyId, + String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/OrganisationsschluesselDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/OrganisationsschluesselDefiningCode.java new file mode 100644 index 000000000..0a6260938 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/OrganisationsschluesselDefiningCode.java @@ -0,0 +1,116 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition; + +import java.lang.String; +import org.ehrbase.client.classgenerator.EnumValueSet; + +public enum OrganisationsschluesselDefiningCode implements EnumValueSet { + NUKLEARMEDIZIN("Nuklearmedizin", "", "Anhang 1 der BPflV (31.12.2003)", "3200"), + + PADIATRIE("Padiatrie", "", "Anhang 1 der BPflV (31.12.2003)", "1000"), + + KINDERKARDIOLOGIE("Kinderkardiologie", "", "Anhang 1 der BPflV (31.12.2003)", "1100"), + + UROLOGIE("Urologie", "", "Anhang 1 der BPflV (31.12.2003)", "2200"), + + STRAHLENHEILKUNDE("Strahlenheilkunde", "", "Anhang 1 der BPflV (31.12.2003)", "3300"), + + GASTROENTEROLOGIE("Gastroenterologie", "", "Anhang 1 der BPflV (31.12.2003)", "0700"), + + ZAHN_UND_KIEFERHEILKUNDE_MUND_UND_KIEFERCHIRURGIE("Zahn- und Kieferheilkunde, Mund- und Kieferchirurgie", "", "Anhang 1 der BPflV (31.12.2003)", "3500"), + + UNFALLCHIRURGIE("Unfallchirurgie", "", "Anhang 1 der BPflV (31.12.2003)", "1600"), + + SONSTIGE_FACHABTEILUNG("Sonstige Fachabteilung", "", "Anhang 1 der BPflV (31.12.2003)", "3700"), + + GERIATRIE("Geriatrie", "", "Anhang 1 der BPflV (31.12.2003)", "0200"), + + ALLGEMEINE_PSYCHIATRIE("Allgemeine Psychiatrie", "", "Anhang 1 der BPflV (31.12.2003)", "2900"), + + HALS_NASEN_OHRENHEILKUNDE("Hals-, Nasen-, Ohrenheilkunde", "", "Anhang 1 der BPflV (31.12.2003)", "2600"), + + ORTHOPADIE_UND_UNFALLCHIRURGIE("Orthopadie und Unfallchirurgie", "", "Anhang 1 der BPflV (31.12.2003)", "2316"), + + ALLGEMEINE_CHIRURGIE("Allgemeine Chirurgie", "", "Anhang 1 der BPflV (31.12.2003)", "1500"), + + THORAXCHIRURGIE("Thoraxchirurgie", "", "Anhang 1 der BPflV (31.12.2003)", "2000"), + + KINDER_UND_JUGENDPSYCHIATRIE("Kinder- und Jugendpsychiatrie", "", "Anhang 1 der BPflV (31.12.2003)", "3000"), + + NEONATOLOGIE("Neonatologie", "", "Anhang 1 der BPflV (31.12.2003)", "1200"), + + GEFA_CHIRURGIE("Gefa.chirurgie", "", "Anhang 1 der BPflV (31.12.2003)", "1800"), + + NEPHROLOGIE("Nephrologie", "", "Anhang 1 der BPflV (31.12.2003)", "0400"), + + PSYCHOSOMATIK_PSYCHOTHERAPIE("Psychosomatik/Psychotherapie", "", "Anhang 1 der BPflV (31.12.2003)", "3100"), + + FRAUENHEILKUNDE("Frauenheilkunde", "", "Anhang 1 der BPflV (31.12.2003)", "2425"), + + ORTHOPADIE("Orthopadie", "", "Anhang 1 der BPflV (31.12.2003)", "2300"), + + PNEUMOLOGIE("Pneumologie", "", "Anhang 1 der BPflV (31.12.2003)", "0800"), + + NEUROLOGIE("Neurologie", "", "Anhang 1 der BPflV (31.12.2003)", "2800"), + + HAMATOLOGIE_UND_INTERNISTISCHE_ONKOLOGIE("Hamatologie und internistische Onkologie", "", "Anhang 1 der BPflV (31.12.2003)", "0500"), + + GEBURTSHILFE("Geburtshilfe", "", "Anhang 1 der BPflV (31.12.2003)", "2500"), + + INNERE_MEDIZIN("Innere Medizin", "", "Anhang 1 der BPflV (31.12.2003)", "0100"), + + KARDIOLOGIE("Kardiologie", "", "Anhang 1 der BPflV (31.12.2003)", "0300"), + + PLASTISCHE_CHIRURGIE("Plastische Chirurgie", "", "Anhang 1 der BPflV (31.12.2003)", "1900"), + + KINDERCHIRURGIE("Kinderchirurgie", "", "Anhang 1 der BPflV (31.12.2003)", "1300"), + + HERZCHIRURGIE("Herzchirurgie", "", "Anhang 1 der BPflV (31.12.2003)", "2100"), + + ENDOKRINOLOGIE("Endokrinologie", "", "Anhang 1 der BPflV (31.12.2003)", "0600"), + + RHEUMATOLOGIE("Rheumatologie", "", "Anhang 1 der BPflV (31.12.2003)", "0900"), + + INTENSIVMEDIZIN("Intensivmedizin", "", "Anhang 1 der BPflV (31.12.2003)", "3600"), + + AUGENHEILKUNDE("Augenheilkunde", "", "Anhang 1 der BPflV (31.12.2003)", "2700"), + + NEUROCHIRURGIE("Neurochirurgie", "", "Anhang 1 der BPflV (31.12.2003)", "1700"), + + LUNGEN_UND_BRONCHIALHEILKUNDE("Lungen- und Bronchialheilkunde", "", "Anhang 1 der BPflV (31.12.2003)", "1400"), + + DERMATOLOGIE("Dermatologie", "", "Anhang 1 der BPflV (31.12.2003)", "3400"), + + FRAUENHEILKUNDE_UND_GEBURTSHILFE("Frauenheilkunde und Geburtshilfe", "", "Anhang 1 der BPflV (31.12.2003)", "2400"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + OrganisationsschluesselDefiningCode(String value, String description, String terminologyId, + String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster.java new file mode 100644 index 000000000..168a4253d --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster.java @@ -0,0 +1,200 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import java.lang.Boolean; +import java.lang.String; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.LocatableEntity; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Archetype("openEHR-EHR-CLUSTER.organization.v0") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-30T13:55:38.276573900+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +public class VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster implements LocatableEntity { + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Vorherige verantwortliche Organisationseinheit (vor Aufnahme)/Typ + * Description: Art der Organisationseinheit. + * Comment: Zum Beispiel: Fachabteilung im Krankenhaus, Versicherungsunternehmen, Sponsor + */ + @Path("/items[at0051]/value|value") + private String typValue; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Tree/Vorherige verantwortliche Organisationseinheit (vor Aufnahme)/Typ/null_flavour + */ + @Path("/items[at0051]/null_flavour|defining_code") + private NullFlavour typNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Vorherige verantwortliche Organisationseinheit (vor Aufnahme)/Organisationsschlüssel + * Description: Eindeutiger Identifikator der Organisationseinheit. + */ + @Path("/items[at0024]/value|value") + private String organisationsschluesselValue; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Tree/Vorherige verantwortliche Organisationseinheit (vor Aufnahme)/Organisationsschlüssel/null_flavour + */ + @Path("/items[at0024]/null_flavour|defining_code") + private NullFlavour organisationsschluesselNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Vorherige verantwortliche Organisationseinheit (vor Aufnahme)/Name + * Description: Bezeichnung für die Organisationseinheit + */ + @Path("/items[at0052]/value|value") + private String nameValue; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Tree/Vorherige verantwortliche Organisationseinheit (vor Aufnahme)/Name/null_flavour + */ + @Path("/items[at0052]/null_flavour|defining_code") + private NullFlavour nameNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Vorherige verantwortliche Organisationseinheit (vor Aufnahme)/Aktiv/Inaktiv + * Description: Gibt an, ob die Organisationseinheit noch aktiv ist. + */ + @Path("/items[at0050]/value|value") + private Boolean aktivInaktivValue; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Tree/Vorherige verantwortliche Organisationseinheit (vor Aufnahme)/Aktiv/Inaktiv/null_flavour + */ + @Path("/items[at0050]/null_flavour|defining_code") + private NullFlavour aktivInaktivNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Vorherige verantwortliche Organisationseinheit (vor Aufnahme)/Zusätzliche Beschreibung + * Description: Zusätzliche Informationen + */ + @Path("/items[at0046]/value|value") + private String zusaetzlicheBeschreibungValue; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Tree/Vorherige verantwortliche Organisationseinheit (vor Aufnahme)/Zusätzliche Beschreibung/null_flavour + */ + @Path("/items[at0046]/null_flavour|defining_code") + private NullFlavour zusaetzlicheBeschreibungNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Vorherige verantwortliche Organisationseinheit (vor Aufnahme)/Details + * Description: Für die Erfassung weiterer Angaben über die Organisationseinheit, zum Beispiel Adresse oder Telekommunikationsdetails. + */ + @Path("/items[at0047]") + private List<Cluster> details; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Vorherige verantwortliche Organisationseinheit (vor Aufnahme)/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setTypValue(String typValue) { + this.typValue = typValue; + } + + public String getTypValue() { + return this.typValue ; + } + + public void setTypNullFlavourDefiningCode(NullFlavour typNullFlavourDefiningCode) { + this.typNullFlavourDefiningCode = typNullFlavourDefiningCode; + } + + public NullFlavour getTypNullFlavourDefiningCode() { + return this.typNullFlavourDefiningCode ; + } + + public void setOrganisationsschluesselValue(String organisationsschluesselValue) { + this.organisationsschluesselValue = organisationsschluesselValue; + } + + public String getOrganisationsschluesselValue() { + return this.organisationsschluesselValue ; + } + + public void setOrganisationsschluesselNullFlavourDefiningCode( + NullFlavour organisationsschluesselNullFlavourDefiningCode) { + this.organisationsschluesselNullFlavourDefiningCode = organisationsschluesselNullFlavourDefiningCode; + } + + public NullFlavour getOrganisationsschluesselNullFlavourDefiningCode() { + return this.organisationsschluesselNullFlavourDefiningCode ; + } + + public void setNameValue(String nameValue) { + this.nameValue = nameValue; + } + + public String getNameValue() { + return this.nameValue ; + } + + public void setNameNullFlavourDefiningCode(NullFlavour nameNullFlavourDefiningCode) { + this.nameNullFlavourDefiningCode = nameNullFlavourDefiningCode; + } + + public NullFlavour getNameNullFlavourDefiningCode() { + return this.nameNullFlavourDefiningCode ; + } + + public void setAktivInaktivValue(Boolean aktivInaktivValue) { + this.aktivInaktivValue = aktivInaktivValue; + } + + public Boolean isAktivInaktivValue() { + return this.aktivInaktivValue ; + } + + public void setAktivInaktivNullFlavourDefiningCode( + NullFlavour aktivInaktivNullFlavourDefiningCode) { + this.aktivInaktivNullFlavourDefiningCode = aktivInaktivNullFlavourDefiningCode; + } + + public NullFlavour getAktivInaktivNullFlavourDefiningCode() { + return this.aktivInaktivNullFlavourDefiningCode ; + } + + public void setZusaetzlicheBeschreibungValue(String zusaetzlicheBeschreibungValue) { + this.zusaetzlicheBeschreibungValue = zusaetzlicheBeschreibungValue; + } + + public String getZusaetzlicheBeschreibungValue() { + return this.zusaetzlicheBeschreibungValue ; + } + + public void setZusaetzlicheBeschreibungNullFlavourDefiningCode( + NullFlavour zusaetzlicheBeschreibungNullFlavourDefiningCode) { + this.zusaetzlicheBeschreibungNullFlavourDefiningCode = zusaetzlicheBeschreibungNullFlavourDefiningCode; + } + + public NullFlavour getZusaetzlicheBeschreibungNullFlavourDefiningCode() { + return this.zusaetzlicheBeschreibungNullFlavourDefiningCode ; + } + + public void setDetails(List<Cluster> details) { + this.details = details; + } + + public List<Cluster> getDetails() { + return this.details ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeClusterContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeClusterContainment.java new file mode 100644 index 000000000..ae82db59b --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeClusterContainment.java @@ -0,0 +1,49 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import java.lang.Boolean; +import java.lang.String; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +public class VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeClusterContainment extends Containment { + public SelectAqlField<VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster> VORHERIGE_VERANTWORTLICHE_ORGANISATIONSEINHEIT_VOR_AUFNAHME_CLUSTER = new AqlFieldImp<VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster>(VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster.class, "", "VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster", VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster.class, this); + + public SelectAqlField<String> TYP_VALUE = new AqlFieldImp<String>(VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster.class, "/items[at0051]/value|value", "typValue", String.class, this); + + public SelectAqlField<NullFlavour> TYP_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster.class, "/items[at0051]/null_flavour|defining_code", "typNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> ORGANISATIONSSCHLUESSEL_VALUE = new AqlFieldImp<String>(VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster.class, "/items[at0024]/value|value", "organisationsschluesselValue", String.class, this); + + public SelectAqlField<NullFlavour> ORGANISATIONSSCHLUESSEL_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster.class, "/items[at0024]/null_flavour|defining_code", "organisationsschluesselNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> NAME_VALUE = new AqlFieldImp<String>(VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster.class, "/items[at0052]/value|value", "nameValue", String.class, this); + + public SelectAqlField<NullFlavour> NAME_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster.class, "/items[at0052]/null_flavour|defining_code", "nameNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<Boolean> AKTIV_INAKTIV_VALUE = new AqlFieldImp<Boolean>(VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster.class, "/items[at0050]/value|value", "aktivInaktivValue", Boolean.class, this); + + public SelectAqlField<NullFlavour> AKTIV_INAKTIV_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster.class, "/items[at0050]/null_flavour|defining_code", "aktivInaktivNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> ZUSAETZLICHE_BESCHREIBUNG_VALUE = new AqlFieldImp<String>(VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster.class, "/items[at0046]/value|value", "zusaetzlicheBeschreibungValue", String.class, this); + + public SelectAqlField<NullFlavour> ZUSAETZLICHE_BESCHREIBUNG_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster.class, "/items[at0046]/null_flavour|defining_code", "zusaetzlicheBeschreibungNullFlavourDefiningCode", NullFlavour.class, this); + + public ListSelectAqlField<Cluster> DETAILS = new ListAqlFieldImp<Cluster>(VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster.class, "/items[at0047]", "details", Cluster.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + private VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeClusterContainment() { + super("openEHR-EHR-CLUSTER.organization.v0"); + } + + public static VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeClusterContainment getInstance( + ) { + return new VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeClusterContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/VorherigerPatientenstandortVorAufnahmeCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/VorherigerPatientenstandortVorAufnahmeCluster.java new file mode 100644 index 000000000..a9fafff0a --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/VorherigerPatientenstandortVorAufnahmeCluster.java @@ -0,0 +1,273 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import java.lang.String; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.LocatableEntity; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Archetype("openEHR-EHR-CLUSTER.location.v1") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-30T13:55:38.259842400+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +public class VorherigerPatientenstandortVorAufnahmeCluster implements LocatableEntity { + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Vorheriger Patientenstandort (vor Aufnahme)/Campus + * Description: Eine Gruppe von Gebäuden an anderen Orten, wie ein örtlich entfernter Campus, der außerhalb der Einrichtung liegt, aber zur Institution gehört. + */ + @Path("/items[at0024]/value|value") + private String campusValue; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Tree/Vorheriger Patientenstandort (vor Aufnahme)/Campus/null_flavour + */ + @Path("/items[at0024]/null_flavour|defining_code") + private NullFlavour campusNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Vorheriger Patientenstandort (vor Aufnahme)/Gebäudegruppe + * Description: Ein Gebäude oder Bauwerk. Dazu können Räume, Flure, Flügel, etc. gehören. Es hat möglicherweise keine Wände oder ein Dach, wird aber dennoch als definierter/zugeordneter Raum angesehen. + */ + @Path("/items[at0025]/value|value") + private String gebaeudegruppeValue; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Tree/Vorheriger Patientenstandort (vor Aufnahme)/Gebäudegruppe/null_flavour + */ + @Path("/items[at0025]/null_flavour|defining_code") + private NullFlavour gebaeudegruppeNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Vorheriger Patientenstandort (vor Aufnahme)/Ebene + * Description: Die Ebene in einem mehrstöckigen Gebäude/Bauwerk. + */ + @Path("/items[at0028]/value|value") + private String ebeneValue; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Tree/Vorheriger Patientenstandort (vor Aufnahme)/Ebene/null_flavour + */ + @Path("/items[at0028]/null_flavour|defining_code") + private NullFlavour ebeneNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Vorheriger Patientenstandort (vor Aufnahme)/Station + * Description: Eine Station ist Teil einer medizinischen Einrichtung, die Räume und andere Arten von Orten enthalten kann. + */ + @Path("/items[at0027]/value|value") + private String stationValue; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Tree/Vorheriger Patientenstandort (vor Aufnahme)/Station/null_flavour + */ + @Path("/items[at0027]/null_flavour|defining_code") + private NullFlavour stationNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Vorheriger Patientenstandort (vor Aufnahme)/Zimmer + * Description: Ein Ort, der als Zimmer deklariert wurde. Bei einigen Standorten kann das Zimmer im Flur liegen zB: Station XYZ Flur 2. Hierbei liegt der Bettstellplatz 2 auf dem Flur der jeweiligen Station. + */ + @Path("/items[at0029]/value|value") + private String zimmerValue; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Tree/Vorheriger Patientenstandort (vor Aufnahme)/Zimmer/null_flavour + */ + @Path("/items[at0029]/null_flavour|defining_code") + private NullFlavour zimmerNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Vorheriger Patientenstandort (vor Aufnahme)/Bettstellplatz + * Description: Beschreibung des Bettstellplatzes z.B. Bett stand neben dem Fenster oder neben der Tür. + */ + @Path("/items[at0034]/value|value") + private String bettstellplatzValue; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Tree/Vorheriger Patientenstandort (vor Aufnahme)/Bettstellplatz/null_flavour + */ + @Path("/items[at0034]/null_flavour|defining_code") + private NullFlavour bettstellplatzNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Vorheriger Patientenstandort (vor Aufnahme)/Zusätzliche Beschreibung + * Description: Das Feld enthält die Freitextbeschreibung des Standorts, z.B. Throax-, Herz- und Gefäßchirurgie. + */ + @Path("/items[at0046]/value|value") + private String zusaetzlicheBeschreibungValue; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Tree/Vorheriger Patientenstandort (vor Aufnahme)/Zusätzliche Beschreibung/null_flavour + */ + @Path("/items[at0046]/null_flavour|defining_code") + private NullFlavour zusaetzlicheBeschreibungNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Vorheriger Patientenstandort (vor Aufnahme)/Details + * Description: Für die Erfassung weiterer Angaben über das Bett oder der Adresse. Verwenden Sie dazu den Archetyp CLUSTER.device oder CLUSTER.address. + */ + @Path("/items[at0047]") + private List<Cluster> details; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Vorheriger Patientenstandort (vor Aufnahme)/Leitende Organisationseinheit + * Description: Organisation, die für die Bereitstellung und Instandhaltung verantwortlich ist + * + * Die Organisation, die für die Bereitstellung und den Unterhalt des Standorts verantwortlich ist. + */ + @Path("/items[at0049]") + private List<Cluster> leitendeOrganisationseinheit; + + /** + * Path: Stationärer Versorgungsfall/Aufnahmedaten/Vorheriger Patientenstandort (vor Aufnahme)/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setCampusValue(String campusValue) { + this.campusValue = campusValue; + } + + public String getCampusValue() { + return this.campusValue ; + } + + public void setCampusNullFlavourDefiningCode(NullFlavour campusNullFlavourDefiningCode) { + this.campusNullFlavourDefiningCode = campusNullFlavourDefiningCode; + } + + public NullFlavour getCampusNullFlavourDefiningCode() { + return this.campusNullFlavourDefiningCode ; + } + + public void setGebaeudegruppeValue(String gebaeudegruppeValue) { + this.gebaeudegruppeValue = gebaeudegruppeValue; + } + + public String getGebaeudegruppeValue() { + return this.gebaeudegruppeValue ; + } + + public void setGebaeudegruppeNullFlavourDefiningCode( + NullFlavour gebaeudegruppeNullFlavourDefiningCode) { + this.gebaeudegruppeNullFlavourDefiningCode = gebaeudegruppeNullFlavourDefiningCode; + } + + public NullFlavour getGebaeudegruppeNullFlavourDefiningCode() { + return this.gebaeudegruppeNullFlavourDefiningCode ; + } + + public void setEbeneValue(String ebeneValue) { + this.ebeneValue = ebeneValue; + } + + public String getEbeneValue() { + return this.ebeneValue ; + } + + public void setEbeneNullFlavourDefiningCode(NullFlavour ebeneNullFlavourDefiningCode) { + this.ebeneNullFlavourDefiningCode = ebeneNullFlavourDefiningCode; + } + + public NullFlavour getEbeneNullFlavourDefiningCode() { + return this.ebeneNullFlavourDefiningCode ; + } + + public void setStationValue(String stationValue) { + this.stationValue = stationValue; + } + + public String getStationValue() { + return this.stationValue ; + } + + public void setStationNullFlavourDefiningCode(NullFlavour stationNullFlavourDefiningCode) { + this.stationNullFlavourDefiningCode = stationNullFlavourDefiningCode; + } + + public NullFlavour getStationNullFlavourDefiningCode() { + return this.stationNullFlavourDefiningCode ; + } + + public void setZimmerValue(String zimmerValue) { + this.zimmerValue = zimmerValue; + } + + public String getZimmerValue() { + return this.zimmerValue ; + } + + public void setZimmerNullFlavourDefiningCode(NullFlavour zimmerNullFlavourDefiningCode) { + this.zimmerNullFlavourDefiningCode = zimmerNullFlavourDefiningCode; + } + + public NullFlavour getZimmerNullFlavourDefiningCode() { + return this.zimmerNullFlavourDefiningCode ; + } + + public void setBettstellplatzValue(String bettstellplatzValue) { + this.bettstellplatzValue = bettstellplatzValue; + } + + public String getBettstellplatzValue() { + return this.bettstellplatzValue ; + } + + public void setBettstellplatzNullFlavourDefiningCode( + NullFlavour bettstellplatzNullFlavourDefiningCode) { + this.bettstellplatzNullFlavourDefiningCode = bettstellplatzNullFlavourDefiningCode; + } + + public NullFlavour getBettstellplatzNullFlavourDefiningCode() { + return this.bettstellplatzNullFlavourDefiningCode ; + } + + public void setZusaetzlicheBeschreibungValue(String zusaetzlicheBeschreibungValue) { + this.zusaetzlicheBeschreibungValue = zusaetzlicheBeschreibungValue; + } + + public String getZusaetzlicheBeschreibungValue() { + return this.zusaetzlicheBeschreibungValue ; + } + + public void setZusaetzlicheBeschreibungNullFlavourDefiningCode( + NullFlavour zusaetzlicheBeschreibungNullFlavourDefiningCode) { + this.zusaetzlicheBeschreibungNullFlavourDefiningCode = zusaetzlicheBeschreibungNullFlavourDefiningCode; + } + + public NullFlavour getZusaetzlicheBeschreibungNullFlavourDefiningCode() { + return this.zusaetzlicheBeschreibungNullFlavourDefiningCode ; + } + + public void setDetails(List<Cluster> details) { + this.details = details; + } + + public List<Cluster> getDetails() { + return this.details ; + } + + public void setLeitendeOrganisationseinheit(List<Cluster> leitendeOrganisationseinheit) { + this.leitendeOrganisationseinheit = leitendeOrganisationseinheit; + } + + public List<Cluster> getLeitendeOrganisationseinheit() { + return this.leitendeOrganisationseinheit ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/VorherigerPatientenstandortVorAufnahmeClusterContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/VorherigerPatientenstandortVorAufnahmeClusterContainment.java new file mode 100644 index 000000000..1110e2a85 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/VorherigerPatientenstandortVorAufnahmeClusterContainment.java @@ -0,0 +1,57 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import java.lang.String; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +public class VorherigerPatientenstandortVorAufnahmeClusterContainment extends Containment { + public SelectAqlField<VorherigerPatientenstandortVorAufnahmeCluster> VORHERIGER_PATIENTENSTANDORT_VOR_AUFNAHME_CLUSTER = new AqlFieldImp<VorherigerPatientenstandortVorAufnahmeCluster>(VorherigerPatientenstandortVorAufnahmeCluster.class, "", "VorherigerPatientenstandortVorAufnahmeCluster", VorherigerPatientenstandortVorAufnahmeCluster.class, this); + + public SelectAqlField<String> CAMPUS_VALUE = new AqlFieldImp<String>(VorherigerPatientenstandortVorAufnahmeCluster.class, "/items[at0024]/value|value", "campusValue", String.class, this); + + public SelectAqlField<NullFlavour> CAMPUS_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(VorherigerPatientenstandortVorAufnahmeCluster.class, "/items[at0024]/null_flavour|defining_code", "campusNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> GEBAEUDEGRUPPE_VALUE = new AqlFieldImp<String>(VorherigerPatientenstandortVorAufnahmeCluster.class, "/items[at0025]/value|value", "gebaeudegruppeValue", String.class, this); + + public SelectAqlField<NullFlavour> GEBAEUDEGRUPPE_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(VorherigerPatientenstandortVorAufnahmeCluster.class, "/items[at0025]/null_flavour|defining_code", "gebaeudegruppeNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> EBENE_VALUE = new AqlFieldImp<String>(VorherigerPatientenstandortVorAufnahmeCluster.class, "/items[at0028]/value|value", "ebeneValue", String.class, this); + + public SelectAqlField<NullFlavour> EBENE_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(VorherigerPatientenstandortVorAufnahmeCluster.class, "/items[at0028]/null_flavour|defining_code", "ebeneNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> STATION_VALUE = new AqlFieldImp<String>(VorherigerPatientenstandortVorAufnahmeCluster.class, "/items[at0027]/value|value", "stationValue", String.class, this); + + public SelectAqlField<NullFlavour> STATION_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(VorherigerPatientenstandortVorAufnahmeCluster.class, "/items[at0027]/null_flavour|defining_code", "stationNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> ZIMMER_VALUE = new AqlFieldImp<String>(VorherigerPatientenstandortVorAufnahmeCluster.class, "/items[at0029]/value|value", "zimmerValue", String.class, this); + + public SelectAqlField<NullFlavour> ZIMMER_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(VorherigerPatientenstandortVorAufnahmeCluster.class, "/items[at0029]/null_flavour|defining_code", "zimmerNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> BETTSTELLPLATZ_VALUE = new AqlFieldImp<String>(VorherigerPatientenstandortVorAufnahmeCluster.class, "/items[at0034]/value|value", "bettstellplatzValue", String.class, this); + + public SelectAqlField<NullFlavour> BETTSTELLPLATZ_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(VorherigerPatientenstandortVorAufnahmeCluster.class, "/items[at0034]/null_flavour|defining_code", "bettstellplatzNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> ZUSAETZLICHE_BESCHREIBUNG_VALUE = new AqlFieldImp<String>(VorherigerPatientenstandortVorAufnahmeCluster.class, "/items[at0046]/value|value", "zusaetzlicheBeschreibungValue", String.class, this); + + public SelectAqlField<NullFlavour> ZUSAETZLICHE_BESCHREIBUNG_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(VorherigerPatientenstandortVorAufnahmeCluster.class, "/items[at0046]/null_flavour|defining_code", "zusaetzlicheBeschreibungNullFlavourDefiningCode", NullFlavour.class, this); + + public ListSelectAqlField<Cluster> DETAILS = new ListAqlFieldImp<Cluster>(VorherigerPatientenstandortVorAufnahmeCluster.class, "/items[at0047]", "details", Cluster.class, this); + + public ListSelectAqlField<Cluster> LEITENDE_ORGANISATIONSEINHEIT = new ListAqlFieldImp<Cluster>(VorherigerPatientenstandortVorAufnahmeCluster.class, "/items[at0049]", "leitendeOrganisationseinheit", Cluster.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(VorherigerPatientenstandortVorAufnahmeCluster.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + private VorherigerPatientenstandortVorAufnahmeClusterContainment() { + super("openEHR-EHR-CLUSTER.location.v1"); + } + + public static VorherigerPatientenstandortVorAufnahmeClusterContainment getInstance() { + return new VorherigerPatientenstandortVorAufnahmeClusterContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster.java new file mode 100644 index 000000000..be274996e --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster.java @@ -0,0 +1,200 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import java.lang.Boolean; +import java.lang.String; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.LocatableEntity; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Archetype("openEHR-EHR-CLUSTER.organization.v0") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-30T13:55:38.307844500+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +public class ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster implements LocatableEntity { + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Zugewiesene verantwortliche Organisationseinheit (bei Entlassung)/Typ + * Description: Art der Organisationseinheit. + * Comment: Zum Beispiel: Fachabteilung im Krankenhaus, Versicherungsunternehmen, Sponsor + */ + @Path("/items[at0051]/value|value") + private String typValue; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Tree/Zugewiesene verantwortliche Organisationseinheit (bei Entlassung)/Typ/null_flavour + */ + @Path("/items[at0051]/null_flavour|defining_code") + private NullFlavour typNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Zugewiesene verantwortliche Organisationseinheit (bei Entlassung)/Organisationsschlüssel + * Description: Eindeutiger Identifikator der Organisationseinheit. + */ + @Path("/items[at0024]/value|value") + private String organisationsschluesselValue; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Tree/Zugewiesene verantwortliche Organisationseinheit (bei Entlassung)/Organisationsschlüssel/null_flavour + */ + @Path("/items[at0024]/null_flavour|defining_code") + private NullFlavour organisationsschluesselNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Zugewiesene verantwortliche Organisationseinheit (bei Entlassung)/Name + * Description: Bezeichnung für die Organisationseinheit + */ + @Path("/items[at0052]/value|value") + private String nameValue; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Tree/Zugewiesene verantwortliche Organisationseinheit (bei Entlassung)/Name/null_flavour + */ + @Path("/items[at0052]/null_flavour|defining_code") + private NullFlavour nameNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Zugewiesene verantwortliche Organisationseinheit (bei Entlassung)/Aktiv/Inaktiv + * Description: Gibt an, ob die Organisationseinheit noch aktiv ist. + */ + @Path("/items[at0050]/value|value") + private Boolean aktivInaktivValue; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Tree/Zugewiesene verantwortliche Organisationseinheit (bei Entlassung)/Aktiv/Inaktiv/null_flavour + */ + @Path("/items[at0050]/null_flavour|defining_code") + private NullFlavour aktivInaktivNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Zugewiesene verantwortliche Organisationseinheit (bei Entlassung)/Zusätzliche Beschreibung + * Description: Zusätzliche Informationen + */ + @Path("/items[at0046]/value|value") + private String zusaetzlicheBeschreibungValue; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Tree/Zugewiesene verantwortliche Organisationseinheit (bei Entlassung)/Zusätzliche Beschreibung/null_flavour + */ + @Path("/items[at0046]/null_flavour|defining_code") + private NullFlavour zusaetzlicheBeschreibungNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Zugewiesene verantwortliche Organisationseinheit (bei Entlassung)/Details + * Description: Für die Erfassung weiterer Angaben über die Organisationseinheit, zum Beispiel Adresse oder Telekommunikationsdetails. + */ + @Path("/items[at0047]") + private List<Cluster> details; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Zugewiesene verantwortliche Organisationseinheit (bei Entlassung)/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setTypValue(String typValue) { + this.typValue = typValue; + } + + public String getTypValue() { + return this.typValue ; + } + + public void setTypNullFlavourDefiningCode(NullFlavour typNullFlavourDefiningCode) { + this.typNullFlavourDefiningCode = typNullFlavourDefiningCode; + } + + public NullFlavour getTypNullFlavourDefiningCode() { + return this.typNullFlavourDefiningCode ; + } + + public void setOrganisationsschluesselValue(String organisationsschluesselValue) { + this.organisationsschluesselValue = organisationsschluesselValue; + } + + public String getOrganisationsschluesselValue() { + return this.organisationsschluesselValue ; + } + + public void setOrganisationsschluesselNullFlavourDefiningCode( + NullFlavour organisationsschluesselNullFlavourDefiningCode) { + this.organisationsschluesselNullFlavourDefiningCode = organisationsschluesselNullFlavourDefiningCode; + } + + public NullFlavour getOrganisationsschluesselNullFlavourDefiningCode() { + return this.organisationsschluesselNullFlavourDefiningCode ; + } + + public void setNameValue(String nameValue) { + this.nameValue = nameValue; + } + + public String getNameValue() { + return this.nameValue ; + } + + public void setNameNullFlavourDefiningCode(NullFlavour nameNullFlavourDefiningCode) { + this.nameNullFlavourDefiningCode = nameNullFlavourDefiningCode; + } + + public NullFlavour getNameNullFlavourDefiningCode() { + return this.nameNullFlavourDefiningCode ; + } + + public void setAktivInaktivValue(Boolean aktivInaktivValue) { + this.aktivInaktivValue = aktivInaktivValue; + } + + public Boolean isAktivInaktivValue() { + return this.aktivInaktivValue ; + } + + public void setAktivInaktivNullFlavourDefiningCode( + NullFlavour aktivInaktivNullFlavourDefiningCode) { + this.aktivInaktivNullFlavourDefiningCode = aktivInaktivNullFlavourDefiningCode; + } + + public NullFlavour getAktivInaktivNullFlavourDefiningCode() { + return this.aktivInaktivNullFlavourDefiningCode ; + } + + public void setZusaetzlicheBeschreibungValue(String zusaetzlicheBeschreibungValue) { + this.zusaetzlicheBeschreibungValue = zusaetzlicheBeschreibungValue; + } + + public String getZusaetzlicheBeschreibungValue() { + return this.zusaetzlicheBeschreibungValue ; + } + + public void setZusaetzlicheBeschreibungNullFlavourDefiningCode( + NullFlavour zusaetzlicheBeschreibungNullFlavourDefiningCode) { + this.zusaetzlicheBeschreibungNullFlavourDefiningCode = zusaetzlicheBeschreibungNullFlavourDefiningCode; + } + + public NullFlavour getZusaetzlicheBeschreibungNullFlavourDefiningCode() { + return this.zusaetzlicheBeschreibungNullFlavourDefiningCode ; + } + + public void setDetails(List<Cluster> details) { + this.details = details; + } + + public List<Cluster> getDetails() { + return this.details ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungClusterContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungClusterContainment.java new file mode 100644 index 000000000..178119f94 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungClusterContainment.java @@ -0,0 +1,49 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import java.lang.Boolean; +import java.lang.String; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +public class ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungClusterContainment extends Containment { + public SelectAqlField<ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster> ZUGEWIESENE_VERANTWORTLICHE_ORGANISATIONSEINHEIT_BEI_ENTLASSUNG_CLUSTER = new AqlFieldImp<ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster>(ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster.class, "", "ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster", ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster.class, this); + + public SelectAqlField<String> TYP_VALUE = new AqlFieldImp<String>(ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster.class, "/items[at0051]/value|value", "typValue", String.class, this); + + public SelectAqlField<NullFlavour> TYP_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster.class, "/items[at0051]/null_flavour|defining_code", "typNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> ORGANISATIONSSCHLUESSEL_VALUE = new AqlFieldImp<String>(ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster.class, "/items[at0024]/value|value", "organisationsschluesselValue", String.class, this); + + public SelectAqlField<NullFlavour> ORGANISATIONSSCHLUESSEL_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster.class, "/items[at0024]/null_flavour|defining_code", "organisationsschluesselNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> NAME_VALUE = new AqlFieldImp<String>(ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster.class, "/items[at0052]/value|value", "nameValue", String.class, this); + + public SelectAqlField<NullFlavour> NAME_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster.class, "/items[at0052]/null_flavour|defining_code", "nameNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<Boolean> AKTIV_INAKTIV_VALUE = new AqlFieldImp<Boolean>(ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster.class, "/items[at0050]/value|value", "aktivInaktivValue", Boolean.class, this); + + public SelectAqlField<NullFlavour> AKTIV_INAKTIV_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster.class, "/items[at0050]/null_flavour|defining_code", "aktivInaktivNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> ZUSAETZLICHE_BESCHREIBUNG_VALUE = new AqlFieldImp<String>(ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster.class, "/items[at0046]/value|value", "zusaetzlicheBeschreibungValue", String.class, this); + + public SelectAqlField<NullFlavour> ZUSAETZLICHE_BESCHREIBUNG_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster.class, "/items[at0046]/null_flavour|defining_code", "zusaetzlicheBeschreibungNullFlavourDefiningCode", NullFlavour.class, this); + + public ListSelectAqlField<Cluster> DETAILS = new ListAqlFieldImp<Cluster>(ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster.class, "/items[at0047]", "details", Cluster.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + private ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungClusterContainment() { + super("openEHR-EHR-CLUSTER.organization.v0"); + } + + public static ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungClusterContainment getInstance( + ) { + return new ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungClusterContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/ZugewiesenerStandortBeiEntlassungCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/ZugewiesenerStandortBeiEntlassungCluster.java new file mode 100644 index 000000000..610827294 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/ZugewiesenerStandortBeiEntlassungCluster.java @@ -0,0 +1,273 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import java.lang.String; +import java.util.List; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Archetype; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.LocatableEntity; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Archetype("openEHR-EHR-CLUSTER.location.v1") +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-30T13:55:38.292218700+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" +) +public class ZugewiesenerStandortBeiEntlassungCluster implements LocatableEntity { + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Zugewiesener Standort (bei Entlassung)/Campus + * Description: Eine Gruppe von Gebäuden an anderen Orten, wie ein örtlich entfernter Campus, der außerhalb der Einrichtung liegt, aber zur Institution gehört. + */ + @Path("/items[at0024]/value|value") + private String campusValue; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Tree/Zugewiesener Standort (bei Entlassung)/Campus/null_flavour + */ + @Path("/items[at0024]/null_flavour|defining_code") + private NullFlavour campusNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Zugewiesener Standort (bei Entlassung)/Gebäudegruppe + * Description: Ein Gebäude oder Bauwerk. Dazu können Räume, Flure, Flügel, etc. gehören. Es hat möglicherweise keine Wände oder ein Dach, wird aber dennoch als definierter/zugeordneter Raum angesehen. + */ + @Path("/items[at0025]/value|value") + private String gebaeudegruppeValue; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Tree/Zugewiesener Standort (bei Entlassung)/Gebäudegruppe/null_flavour + */ + @Path("/items[at0025]/null_flavour|defining_code") + private NullFlavour gebaeudegruppeNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Zugewiesener Standort (bei Entlassung)/Ebene + * Description: Die Ebene in einem mehrstöckigen Gebäude/Bauwerk. + */ + @Path("/items[at0028]/value|value") + private String ebeneValue; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Tree/Zugewiesener Standort (bei Entlassung)/Ebene/null_flavour + */ + @Path("/items[at0028]/null_flavour|defining_code") + private NullFlavour ebeneNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Zugewiesener Standort (bei Entlassung)/Station + * Description: Eine Station ist Teil einer medizinischen Einrichtung, die Räume und andere Arten von Orten enthalten kann. + */ + @Path("/items[at0027]/value|value") + private String stationValue; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Tree/Zugewiesener Standort (bei Entlassung)/Station/null_flavour + */ + @Path("/items[at0027]/null_flavour|defining_code") + private NullFlavour stationNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Zugewiesener Standort (bei Entlassung)/Zimmer + * Description: Ein Ort, der als Zimmer deklariert wurde. Bei einigen Standorten kann das Zimmer im Flur liegen zB: Station XYZ Flur 2. Hierbei liegt der Bettstellplatz 2 auf dem Flur der jeweiligen Station. + */ + @Path("/items[at0029]/value|value") + private String zimmerValue; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Tree/Zugewiesener Standort (bei Entlassung)/Zimmer/null_flavour + */ + @Path("/items[at0029]/null_flavour|defining_code") + private NullFlavour zimmerNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Zugewiesener Standort (bei Entlassung)/Bettstellplatz + * Description: Beschreibung des Bettstellplatzes z.B. Bett stand neben dem Fenster oder neben der Tür. + */ + @Path("/items[at0034]/value|value") + private String bettstellplatzValue; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Tree/Zugewiesener Standort (bei Entlassung)/Bettstellplatz/null_flavour + */ + @Path("/items[at0034]/null_flavour|defining_code") + private NullFlavour bettstellplatzNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Zugewiesener Standort (bei Entlassung)/Zusätzliche Beschreibung + * Description: Das Feld enthält die Freitextbeschreibung des Standorts, z.B. Throax-, Herz- und Gefäßchirurgie. + */ + @Path("/items[at0046]/value|value") + private String zusaetzlicheBeschreibungValue; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Tree/Zugewiesener Standort (bei Entlassung)/Zusätzliche Beschreibung/null_flavour + */ + @Path("/items[at0046]/null_flavour|defining_code") + private NullFlavour zusaetzlicheBeschreibungNullFlavourDefiningCode; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Zugewiesener Standort (bei Entlassung)/Details + * Description: Für die Erfassung weiterer Angaben über das Bett oder der Adresse. Verwenden Sie dazu den Archetyp CLUSTER.device oder CLUSTER.address. + */ + @Path("/items[at0047]") + private List<Cluster> details; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Zugewiesener Standort (bei Entlassung)/Leitende Organisationseinheit + * Description: Organisation, die für die Bereitstellung und Instandhaltung verantwortlich ist + * + * Die Organisation, die für die Bereitstellung und den Unterhalt des Standorts verantwortlich ist. + */ + @Path("/items[at0049]") + private List<Cluster> leitendeOrganisationseinheit; + + /** + * Path: Stationärer Versorgungsfall/Entlassungsdaten/Zugewiesener Standort (bei Entlassung)/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setCampusValue(String campusValue) { + this.campusValue = campusValue; + } + + public String getCampusValue() { + return this.campusValue ; + } + + public void setCampusNullFlavourDefiningCode(NullFlavour campusNullFlavourDefiningCode) { + this.campusNullFlavourDefiningCode = campusNullFlavourDefiningCode; + } + + public NullFlavour getCampusNullFlavourDefiningCode() { + return this.campusNullFlavourDefiningCode ; + } + + public void setGebaeudegruppeValue(String gebaeudegruppeValue) { + this.gebaeudegruppeValue = gebaeudegruppeValue; + } + + public String getGebaeudegruppeValue() { + return this.gebaeudegruppeValue ; + } + + public void setGebaeudegruppeNullFlavourDefiningCode( + NullFlavour gebaeudegruppeNullFlavourDefiningCode) { + this.gebaeudegruppeNullFlavourDefiningCode = gebaeudegruppeNullFlavourDefiningCode; + } + + public NullFlavour getGebaeudegruppeNullFlavourDefiningCode() { + return this.gebaeudegruppeNullFlavourDefiningCode ; + } + + public void setEbeneValue(String ebeneValue) { + this.ebeneValue = ebeneValue; + } + + public String getEbeneValue() { + return this.ebeneValue ; + } + + public void setEbeneNullFlavourDefiningCode(NullFlavour ebeneNullFlavourDefiningCode) { + this.ebeneNullFlavourDefiningCode = ebeneNullFlavourDefiningCode; + } + + public NullFlavour getEbeneNullFlavourDefiningCode() { + return this.ebeneNullFlavourDefiningCode ; + } + + public void setStationValue(String stationValue) { + this.stationValue = stationValue; + } + + public String getStationValue() { + return this.stationValue ; + } + + public void setStationNullFlavourDefiningCode(NullFlavour stationNullFlavourDefiningCode) { + this.stationNullFlavourDefiningCode = stationNullFlavourDefiningCode; + } + + public NullFlavour getStationNullFlavourDefiningCode() { + return this.stationNullFlavourDefiningCode ; + } + + public void setZimmerValue(String zimmerValue) { + this.zimmerValue = zimmerValue; + } + + public String getZimmerValue() { + return this.zimmerValue ; + } + + public void setZimmerNullFlavourDefiningCode(NullFlavour zimmerNullFlavourDefiningCode) { + this.zimmerNullFlavourDefiningCode = zimmerNullFlavourDefiningCode; + } + + public NullFlavour getZimmerNullFlavourDefiningCode() { + return this.zimmerNullFlavourDefiningCode ; + } + + public void setBettstellplatzValue(String bettstellplatzValue) { + this.bettstellplatzValue = bettstellplatzValue; + } + + public String getBettstellplatzValue() { + return this.bettstellplatzValue ; + } + + public void setBettstellplatzNullFlavourDefiningCode( + NullFlavour bettstellplatzNullFlavourDefiningCode) { + this.bettstellplatzNullFlavourDefiningCode = bettstellplatzNullFlavourDefiningCode; + } + + public NullFlavour getBettstellplatzNullFlavourDefiningCode() { + return this.bettstellplatzNullFlavourDefiningCode ; + } + + public void setZusaetzlicheBeschreibungValue(String zusaetzlicheBeschreibungValue) { + this.zusaetzlicheBeschreibungValue = zusaetzlicheBeschreibungValue; + } + + public String getZusaetzlicheBeschreibungValue() { + return this.zusaetzlicheBeschreibungValue ; + } + + public void setZusaetzlicheBeschreibungNullFlavourDefiningCode( + NullFlavour zusaetzlicheBeschreibungNullFlavourDefiningCode) { + this.zusaetzlicheBeschreibungNullFlavourDefiningCode = zusaetzlicheBeschreibungNullFlavourDefiningCode; + } + + public NullFlavour getZusaetzlicheBeschreibungNullFlavourDefiningCode() { + return this.zusaetzlicheBeschreibungNullFlavourDefiningCode ; + } + + public void setDetails(List<Cluster> details) { + this.details = details; + } + + public List<Cluster> getDetails() { + return this.details ; + } + + public void setLeitendeOrganisationseinheit(List<Cluster> leitendeOrganisationseinheit) { + this.leitendeOrganisationseinheit = leitendeOrganisationseinheit; + } + + public List<Cluster> getLeitendeOrganisationseinheit() { + return this.leitendeOrganisationseinheit ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/ZugewiesenerStandortBeiEntlassungClusterContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/ZugewiesenerStandortBeiEntlassungClusterContainment.java new file mode 100644 index 000000000..a5882ac3a --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/definition/ZugewiesenerStandortBeiEntlassungClusterContainment.java @@ -0,0 +1,57 @@ +package org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import com.nedap.archie.rm.datastructures.Cluster; +import java.lang.String; +import org.ehrbase.client.aql.containment.Containment; +import org.ehrbase.client.aql.field.AqlFieldImp; +import org.ehrbase.client.aql.field.ListAqlFieldImp; +import org.ehrbase.client.aql.field.ListSelectAqlField; +import org.ehrbase.client.aql.field.SelectAqlField; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +public class ZugewiesenerStandortBeiEntlassungClusterContainment extends Containment { + public SelectAqlField<ZugewiesenerStandortBeiEntlassungCluster> ZUGEWIESENER_STANDORT_BEI_ENTLASSUNG_CLUSTER = new AqlFieldImp<ZugewiesenerStandortBeiEntlassungCluster>(ZugewiesenerStandortBeiEntlassungCluster.class, "", "ZugewiesenerStandortBeiEntlassungCluster", ZugewiesenerStandortBeiEntlassungCluster.class, this); + + public SelectAqlField<String> CAMPUS_VALUE = new AqlFieldImp<String>(ZugewiesenerStandortBeiEntlassungCluster.class, "/items[at0024]/value|value", "campusValue", String.class, this); + + public SelectAqlField<NullFlavour> CAMPUS_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ZugewiesenerStandortBeiEntlassungCluster.class, "/items[at0024]/null_flavour|defining_code", "campusNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> GEBAEUDEGRUPPE_VALUE = new AqlFieldImp<String>(ZugewiesenerStandortBeiEntlassungCluster.class, "/items[at0025]/value|value", "gebaeudegruppeValue", String.class, this); + + public SelectAqlField<NullFlavour> GEBAEUDEGRUPPE_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ZugewiesenerStandortBeiEntlassungCluster.class, "/items[at0025]/null_flavour|defining_code", "gebaeudegruppeNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> EBENE_VALUE = new AqlFieldImp<String>(ZugewiesenerStandortBeiEntlassungCluster.class, "/items[at0028]/value|value", "ebeneValue", String.class, this); + + public SelectAqlField<NullFlavour> EBENE_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ZugewiesenerStandortBeiEntlassungCluster.class, "/items[at0028]/null_flavour|defining_code", "ebeneNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> STATION_VALUE = new AqlFieldImp<String>(ZugewiesenerStandortBeiEntlassungCluster.class, "/items[at0027]/value|value", "stationValue", String.class, this); + + public SelectAqlField<NullFlavour> STATION_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ZugewiesenerStandortBeiEntlassungCluster.class, "/items[at0027]/null_flavour|defining_code", "stationNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> ZIMMER_VALUE = new AqlFieldImp<String>(ZugewiesenerStandortBeiEntlassungCluster.class, "/items[at0029]/value|value", "zimmerValue", String.class, this); + + public SelectAqlField<NullFlavour> ZIMMER_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ZugewiesenerStandortBeiEntlassungCluster.class, "/items[at0029]/null_flavour|defining_code", "zimmerNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> BETTSTELLPLATZ_VALUE = new AqlFieldImp<String>(ZugewiesenerStandortBeiEntlassungCluster.class, "/items[at0034]/value|value", "bettstellplatzValue", String.class, this); + + public SelectAqlField<NullFlavour> BETTSTELLPLATZ_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ZugewiesenerStandortBeiEntlassungCluster.class, "/items[at0034]/null_flavour|defining_code", "bettstellplatzNullFlavourDefiningCode", NullFlavour.class, this); + + public SelectAqlField<String> ZUSAETZLICHE_BESCHREIBUNG_VALUE = new AqlFieldImp<String>(ZugewiesenerStandortBeiEntlassungCluster.class, "/items[at0046]/value|value", "zusaetzlicheBeschreibungValue", String.class, this); + + public SelectAqlField<NullFlavour> ZUSAETZLICHE_BESCHREIBUNG_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ZugewiesenerStandortBeiEntlassungCluster.class, "/items[at0046]/null_flavour|defining_code", "zusaetzlicheBeschreibungNullFlavourDefiningCode", NullFlavour.class, this); + + public ListSelectAqlField<Cluster> DETAILS = new ListAqlFieldImp<Cluster>(ZugewiesenerStandortBeiEntlassungCluster.class, "/items[at0047]", "details", Cluster.class, this); + + public ListSelectAqlField<Cluster> LEITENDE_ORGANISATIONSEINHEIT = new ListAqlFieldImp<Cluster>(ZugewiesenerStandortBeiEntlassungCluster.class, "/items[at0049]", "leitendeOrganisationseinheit", Cluster.class, this); + + public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(ZugewiesenerStandortBeiEntlassungCluster.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + + private ZugewiesenerStandortBeiEntlassungClusterContainment() { + super("openEHR-EHR-CLUSTER.location.v1"); + } + + public static ZugewiesenerStandortBeiEntlassungClusterContainment getInstance() { + return new ZugewiesenerStandortBeiEntlassungClusterContainment(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java index 83eb3af96..e8d114cb8 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java @@ -9,6 +9,7 @@ import org.hl7.fhir.r4.model.Procedure; import org.hl7.fhir.r4.model.QuestionnaireResponse; import org.hl7.fhir.r4.model.Resource; +import org.hl7.fhir.r4.model.Encounter; import java.util.Arrays; import java.util.LinkedHashSet; @@ -55,6 +56,9 @@ public enum Profile { PHARMACOLOGICAL_THERAPY_ACE_INHIBITORS(MedicationStatement.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pharmacological-therapy-ace-inhibitors"), PHARMACOLOGICAL_THERAPY_ANTICOAGULANTS(MedicationStatement.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pharmacological-therapy-anticoagulants"), PHARMACOLOGICAL_THERAPY_IMMUNOGLOBULINS(MedicationStatement.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pharmacological-therapy-immunoglobulins"), + // Encounter Profiles + STATIONAERER_VERSORGUNGSFALL(Encounter.class, null), // as default, has the same link like PATIENTEN_AUFENTHALT + PATIENTEN_AUFENTHALT(Encounter.class, "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/StructureDefinition/KontaktGesundheitseinrichtung"), // Observation Profiles diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java b/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java index 46eb096c0..5180f7a8b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java @@ -23,6 +23,9 @@ public enum FhirBridgeEventType implements EventType, EnumeratedCodedValue<Event CreateMedicationStatement("medication-statement-create", "Create Medication Statement"), FindMedicationStatement("medication-statement-find", "Find Medication Statement"), + CreateEncounter("encounter-create", "Create Encounter"), + + FindEncounter("encounter-find", "Find Encounter"), CreateObservation("observation-create", "Create Observation"), diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterAuditStrategy.java new file mode 100644 index 000000000..d657b14a6 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterAuditStrategy.java @@ -0,0 +1,20 @@ +package org.ehrbase.fhirbridge.fhir.encounter; + +import org.hl7.fhir.r4.model.Encounter; +import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditStrategy; +import org.openehealth.ipf.commons.ihe.fhir.support.OperationOutcomeOperations; + +import java.util.Optional; + +/** + * Implementation of {@link org.openehealth.ipf.commons.ihe.core.atna.AuditStrategy AuditStrategy} + * for 'Create Encounter' transaction. + * + * @since 1.0.0 + */ +public class CreateEncounterAuditStrategy extends GenericFhirAuditStrategy<Encounter> { + + public CreateEncounterAuditStrategy() { + super(true, OperationOutcomeOperations.INSTANCE, encounter -> Optional.of(encounter.getSubject())); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterProvider.java new file mode 100644 index 000000000..5bc18ebb1 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterProvider.java @@ -0,0 +1,26 @@ +package org.ehrbase.fhirbridge.fhir.encounter; + +import ca.uhn.fhir.rest.annotation.Create; +import ca.uhn.fhir.rest.annotation.ResourceParam; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import org.hl7.fhir.r4.model.Encounter; +import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Implementation of {@link org.openehealth.ipf.commons.ihe.fhir.FhirProvider FhirProvider} that provides REST support + * for 'Create Encounter' transaction. + * + * @since 1.0.0 + */ +public class CreateEncounterProvider extends AbstractPlainProvider { + + @Create + public MethodOutcome createEncounter(@ResourceParam Encounter encounter, RequestDetails requestDetails, + HttpServletRequest request, HttpServletResponse response) { + return requestAction(encounter, null, request, response, requestDetails); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterTransaction.java new file mode 100644 index 000000000..a09d7e0a1 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterTransaction.java @@ -0,0 +1,26 @@ +package org.ehrbase.fhirbridge.fhir.encounter; + +import ca.uhn.fhir.context.FhirVersionEnum; +import org.openehealth.ipf.commons.ihe.fhir.FhirTransactionConfiguration; +import org.openehealth.ipf.commons.ihe.fhir.FhirTransactionValidator; +import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; + +/** + * Configuration for 'Create Encounter' transaction. + * + * @since 1.0.0 + */ +public class CreateEncounterTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { + + public CreateEncounterTransaction() { + super("encounter-create", + "Create Encounter", + false, + null, + new CreateEncounterAuditStrategy(), + FhirVersionEnum.R4, + new CreateEncounterProvider(), + null, + FhirTransactionValidator.NO_VALIDATION); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/FindEncounterAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/FindEncounterAuditStrategy.java new file mode 100644 index 000000000..5a6067476 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/FindEncounterAuditStrategy.java @@ -0,0 +1,29 @@ +package org.ehrbase.fhirbridge.fhir.encounter; + +import org.ehrbase.fhirbridge.fhir.common.audit.FhirBridgeEventType; +import org.openehealth.ipf.commons.audit.AuditContext; +import org.openehealth.ipf.commons.audit.model.AuditMessage; +import org.openehealth.ipf.commons.ihe.core.atna.event.QueryInformationBuilder; +import org.openehealth.ipf.commons.ihe.fhir.audit.FhirQueryAuditDataset; +import org.openehealth.ipf.commons.ihe.fhir.audit.FhirQueryAuditStrategy; +import org.openehealth.ipf.commons.ihe.fhir.support.OperationOutcomeOperations; + +/** + * Implementation of {@link org.openehealth.ipf.commons.ihe.core.atna.AuditStrategy AuditStrategy} + * for 'Find Encounter' transaction. + * + * @since 1.0.0 + */ +public class FindEncounterAuditStrategy extends FhirQueryAuditStrategy { + + public FindEncounterAuditStrategy() { + super(true, OperationOutcomeOperations.INSTANCE); + } + + @Override + public AuditMessage[] makeAuditMessage(AuditContext auditContext, FhirQueryAuditDataset auditDataset) { + return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FindEncounter) + .addPatients(auditDataset.getPatientIds()) + .getMessages(); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/FindEncounterProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/FindEncounterProvider.java new file mode 100644 index 000000000..98b18e6d3 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/FindEncounterProvider.java @@ -0,0 +1,50 @@ +package org.ehrbase.fhirbridge.fhir.encounter; + +import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.rest.annotation.Count; +import ca.uhn.fhir.rest.annotation.Offset; +import ca.uhn.fhir.rest.annotation.RequiredParam; +import ca.uhn.fhir.rest.annotation.Search; +import ca.uhn.fhir.rest.annotation.Sort; +import ca.uhn.fhir.rest.annotation.Read; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.api.SortSpec; +import ca.uhn.fhir.rest.api.server.IBundleProvider; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import ca.uhn.fhir.rest.param.ReferenceAndListParam; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.Encounter; +import org.hl7.fhir.r4.model.ResourceType; +import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Implementation of {@link org.openehealth.ipf.commons.ihe.fhir.FhirProvider FhirProvider} that provides REST support + * for 'Find Encounter' transaction. + * + * @since 1.0.0 + */ +public class FindEncounterProvider extends AbstractPlainProvider { + + @Search(type = Encounter.class) + @SuppressWarnings("unused") + public IBundleProvider searchEncounter(@RequiredParam(name = Encounter.SP_SUBJECT) ReferenceAndListParam subject, + @Count Integer count, @Offset Integer offset, @Sort SortSpec sort, + RequestDetails requestDetails, HttpServletRequest request, HttpServletResponse response) { + SearchParameterMap searchParams = new SearchParameterMap(); + searchParams.add(Encounter.SP_SUBJECT, subject); + searchParams.setCount(count); + searchParams.setOffset(offset); + searchParams.setSort(sort); + return requestBundleProvider(searchParams, null, ResourceType.Encounter.name(), request, response, requestDetails); + } + + @Read(version = true) + @SuppressWarnings("unused") + public Encounter readEncounter(@IdParam IdType id, RequestDetails requestDetails, + HttpServletRequest request, HttpServletResponse response) { + return requestResource(id, null, Encounter.class, request, response, requestDetails); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/FindEncounterTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/FindEncounterTransaction.java new file mode 100644 index 000000000..3194c9e91 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/FindEncounterTransaction.java @@ -0,0 +1,26 @@ +package org.ehrbase.fhirbridge.fhir.encounter; + +import ca.uhn.fhir.context.FhirVersionEnum; +import org.openehealth.ipf.commons.ihe.fhir.FhirTransactionConfiguration; +import org.openehealth.ipf.commons.ihe.fhir.FhirTransactionValidator; +import org.openehealth.ipf.commons.ihe.fhir.audit.FhirQueryAuditDataset; + +/** + * Configuration for 'Find Encounter' transaction. + * + * @since 1.0.0 + */ +public class FindEncounterTransaction extends FhirTransactionConfiguration<FhirQueryAuditDataset> { + + public FindEncounterTransaction() { + super("encounter-find", + "Find Encounter", + true, + null, + new FindEncounterAuditStrategy(), + FhirVersionEnum.R4, + new FindEncounterProvider(), + null, + FhirTransactionValidator.NO_VALIDATION); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Encounters.java b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Encounters.java new file mode 100644 index 000000000..c53b43091 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Encounters.java @@ -0,0 +1,31 @@ +package org.ehrbase.fhirbridge.fhir.support; + +import org.ehrbase.fhirbridge.fhir.common.Profile; +import org.hl7.fhir.r4.model.Coding; +import org.hl7.fhir.r4.model.Encounter; + +import static org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem.KONTAKT_EBENE; + +public class Encounters { + + public static Profile getProfileByKontaktEbene(Encounter encounter) { + + if (encounter.getType() != null && encounter.getType().size() > 0 ) { + + Coding coding = encounter.getType().get(0).getCoding().get(0); + + if (coding.getSystem().equals(KONTAKT_EBENE.getUrl())) { + if (coding.getCode().equals(KontaktebeneDefiningCode.ABTEILUNGS_KONTAKT.getCode()) + || coding.getCode().equals(KontaktebeneDefiningCode.VERSORGUNGS_STELLEN_KONTAKT.getCode())) { + + return Profile.PATIENTEN_AUFENTHALT; + } + } else { + throw new IllegalStateException("Invalid Code system " + coding.getSystem() + + " valid code system: " + KONTAKT_EBENE.getUrl()); + } + } + + return Profile.STATIONAERER_VERSORGUNGSFALL; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/support/KontaktebeneDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/fhir/support/KontaktebeneDefiningCode.java new file mode 100644 index 000000000..c102e0b51 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/support/KontaktebeneDefiningCode.java @@ -0,0 +1,43 @@ +package org.ehrbase.fhirbridge.fhir.support; + +import org.ehrbase.client.classgenerator.EnumValueSet; + +public enum KontaktebeneDefiningCode implements EnumValueSet { + + EINRICHTUNGS_KONTAKT("Einrichtungskontakt","Beschreibt den Kontakt zur Einrichtung.","","einrichtungskontakt"), + + ABTEILUNGS_KONTAKT("Abteilungskontakt","Beschreibt den Kontakt zur Abteilung.","","abteilungskontakt"), + + VERSORGUNGS_STELLEN_KONTAKT("Versorgungsstellenkontakt","Beschreibt den Kontakt zur Versorgungsstelle.\n","","versorgungsstellenkontakt"); + + private String value; + + private String description; + + private String terminologyId; + + private String code; + + KontaktebeneDefiningCode(String value, String description, String terminologyId, String code) { + this.value = value; + this.description = description; + this.terminologyId = terminologyId; + this.code = code; + } + + public String getValue() { + return this.value ; + } + + public String getDescription() { + return this.description ; + } + + public String getTerminologyId() { + return this.terminologyId ; + } + + public String getCode() { + return this.code ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java index a1b2be83e..bbfe02c1f 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java @@ -6,6 +6,9 @@ import com.nedap.archie.rm.generic.PartySelf; import com.nedap.archie.rm.support.identification.GenericId; import com.nedap.archie.rm.support.identification.PartyRef; +import org.ehrbase.client.aql.parameter.ParameterValue; +import org.ehrbase.client.aql.query.Query; +import org.ehrbase.client.aql.record.Record1; import org.ehrbase.client.openehrclient.OpenEhrClient; import org.ehrbase.fhirbridge.fhir.common.Profile; import org.hl7.fhir.r4.model.CanonicalType; @@ -20,6 +23,7 @@ import org.hl7.fhir.r4.model.Procedure; import org.hl7.fhir.r4.model.QuestionnaireResponse; import org.hl7.fhir.r4.model.Resource; +import org.hl7.fhir.r4.model.Encounter; import java.util.Arrays; import java.util.Collections; @@ -86,11 +90,61 @@ public static Optional<Identifier> getSubjectIdentifier(Resource resource, Optio subjectIdentifier = ((Procedure) resource).getSubject().getIdentifier(); } else if (resource instanceof QuestionnaireResponse) { subjectIdentifier = getQuestionnaireId((QuestionnaireResponse) resource, openEhrClient, patientIdRepository); + } else if (resource instanceof Encounter) { + subjectIdentifier = getEncounterIdentifier((Encounter) resource, openEhrClient, patientIdRepository); } return Optional.ofNullable(subjectIdentifier); } + private static Identifier getEncounterIdentifier(Encounter resource, Optional<OpenEhrClient> openEhrClient, Optional<PatientIdRepository> patientIdRepository) { + + if (openEhrClient.isEmpty()) { + throw new InternalErrorException("getSubjectIdentifier by Encounter was called without a configured openEHRClient as parameter. Please add one."); + } + if (patientIdRepository.isEmpty()) { + throw new InternalErrorException("PatientIdRepository is required by Encounter in getSubjectIdentifier()"); + } + + // @formatter:off + Query<Record1<UUID>> query = Query.buildNativeQuery( + "SELECT e/ehr_id/value " + + "FROM ehr e " + + "WHERE e/ehr_status/subject/external_ref/id/value = $subject", UUID.class); + // @formatter:on + + List<Record1<UUID>> result = openEhrClient.get().aqlEndpoint().execute(query, new ParameterValue<>("subject", resource.getSubject().getIdentifier().getValue())); + + System.out.println("Subject ID from Encounter: " + resource.getSubject().getIdentifier().getValue()); + + // create ehr if patient not exist + if (result.isEmpty()) { + return createEHRWithSubjectID(openEhrClient.get(), patientIdRepository.get(), resource.getSubject().getIdentifier().getValue()); + } else { + return resource.getSubject().getIdentifier(); + } + } + + private static Identifier createEHRWithSubjectID(OpenEhrClient openEhrClient, PatientIdRepository patientIdRepository, String patientID) { + + PartySelf subject = new PartySelf(); + PartyRef externalRef = new PartyRef(); + externalRef.setType("PERSON"); + externalRef.setNamespace("SmICSTests"); + GenericId genericId = new GenericId(); + genericId.setScheme("id_scheme"); + genericId.setValue(patientID); + externalRef.setId(genericId); + subject.setExternalRef(externalRef); + DvText dvText = new DvText("any EHR status"); + EhrStatus ehrStatus = new EhrStatus("openEHR-EHR-ITEM_TREE.generic.v1", dvText, subject, true, true, null); + UUID ehrId = openEhrClient.ehrEndpoint().createEhr(ehrStatus); + System.out.println("created EhrID from Encounter: " + ehrId.toString()); + Identifier identifier = new Identifier(); + identifier.setValue(genericId.getValue()); + return identifier; + } + public static Identifier getQuestionnaireId(QuestionnaireResponse resource, Optional<OpenEhrClient> openEhrClient, Optional<PatientIdRepository> patientIdRepository) { if (openEhrClient.isEmpty()) { throw new InternalErrorException("getSubjectIdentifier was called without a confugred openEHRClient as parameter. Please add one."); diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/encounter-create b/src/main/resources/META-INF/services/org/apache/camel/component/encounter-create new file mode 100644 index 000000000..62755f95e --- /dev/null +++ b/src/main/resources/META-INF/services/org/apache/camel/component/encounter-create @@ -0,0 +1 @@ +class=org.ehrbase.fhirbridge.camel.component.fhir.encounter.CreateEncounterComponent \ No newline at end of file diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/encounter-find b/src/main/resources/META-INF/services/org/apache/camel/component/encounter-find new file mode 100644 index 000000000..6708d4f5b --- /dev/null +++ b/src/main/resources/META-INF/services/org/apache/camel/component/encounter-find @@ -0,0 +1 @@ +class=org.ehrbase.fhirbridge.camel.component.fhir.encounter.FindEncounterComponent \ No newline at end of file diff --git a/src/main/resources/opt/Patientenaufenthalt.opt b/src/main/resources/opt/Patientenaufenthalt.opt new file mode 100644 index 000000000..3f2ec6ffa --- /dev/null +++ b/src/main/resources/opt/Patientenaufenthalt.opt @@ -0,0 +1,2628 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Operational template XML automatically generated by Ocean OPT Generator webservice --> +<template xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.openehr.org/v1"> + <language> + <terminology_id> + <value>ISO_639-1</value> + </terminology_id> + <code_string>de</code_string> + </language> + <description> + <original_author id="Original Author">Not Specified</original_author> + <lifecycle_state>Initial</lifecycle_state> + <other_details id="MetaDataSet:Sample Set ">Template metadata sample set</other_details> + <other_details id="Acknowledgements"/> + <other_details id="Business Process Level"/> + <other_details id="Care setting"/> + <other_details id="Client group"/> + <other_details id="Clinical Record Element"/> + <other_details id="Copyright"/> + <other_details id="Issues"/> + <other_details id="Owner"/> + <other_details id="Sign off"/> + <other_details id="Speciality"/> + <other_details id="User roles"/> + <other_details id="MD5-CAM-1.0.1">ba60c5e7bc86e205e920ccf1d790ca5d</other_details> + <other_details id="PARENT:MD5-CAM-1.0.1">969E8E6F74B14A748E81BB93967ACFCB</other_details> + <other_details id="original_language">ISO_639-1::de</other_details> + <other_details id="original_language">ISO_639-1::de</other_details> + <details> + <language> + <terminology_id> + <value>ISO_639-1</value> + </terminology_id> + <code_string>de</code_string> + </language> + <purpose>Not Specified</purpose> + </details> + </description> + <uid> + <value>9b7bb5c2-5b52-410a-aef1-fc142a31bdee</value> + </uid> + <template_id> + <value>Patientenaufenthalt</value> + </template_id> + <concept>Patientenaufenthalt</concept> + <definition> + <rm_type_name>COMPOSITION</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>category</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>openehr</value> + </terminology_id> + <code_list>433</code_list> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>context</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>EVENT_CONTEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>other_context</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ITEM_TREE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0001</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0001</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Zugehöriger Versorgungsfall (Kennung)</list> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </interval> + </cardinality> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Versorgungsfall</list> + </item> + </children> + </attributes> + </children> + </attributes> + <archetype_id> + <value>openEHR-EHR-CLUSTER.case_identification.v0</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="description">Zur Erfassung von Details zur Identifikation eines Falls im Gesundheitswesen.</items> + <items id="text">Fallidentifikation</items> + </term_definitions> + <term_definitions code="at0001"> + <items id="description">Der Bezeichner/die Kennung dieses Falls.</items> + <items id="text">Fall-Kennung</items> + </term_definitions> + <term_definitions code="at0002"> + <items id="description">Das Datum, an dem der Fall begann/eröffnet wurde.</items> + <items id="text">Fall-Beginn</items> + </term_definitions> + <term_definitions code="at0003"> + <items id="description">Der Status des Falls. +Der Status "abgeschlossen" bedeutet, dass dem Patienten die entsprechende Fallnummer zugeordnet wurde. +Der Status "abgebrochen" bedeutet, dass dem Patienten die entsprechende Fallnummer fälschlicherweise zugeordnet wurde.</items> + <items id="text">Status</items> + </term_definitions> + <term_definitions code="at0004"> + <items id="description">Dem Patienten wurde die entsprechende Fallkennung zugeordnet.</items> + <items id="text">Abgeschlossen</items> + </term_definitions> + <term_definitions code="at0005"> + <items id="description">Dem Patienten wurde die entsprechende Fallkennung fälschlicherweise zugeordnet.</items> + <items id="text">Abgebrochen</items> + </term_definitions> + <term_definitions code="at0006"> + <items id="description">Bezeichnung oder kodierter Text zur Bezeichnung des Falls.</items> + <items id="text">identifizierter Fall</items> + </term_definitions> + </children> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0001</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Zugehöriger Abteilungsfall (Kennung)</list> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </interval> + </cardinality> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Abteilungsfall</list> + </item> + </children> + </attributes> + </children> + </attributes> + <archetype_id> + <value>openEHR-EHR-CLUSTER.case_identification.v0</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="description">Zur Erfassung von Details zur Identifikation eines Falls im Gesundheitswesen.</items> + <items id="text">Fallidentifikation</items> + </term_definitions> + <term_definitions code="at0001"> + <items id="description">Der Bezeichner/die Kennung dieses Falls.</items> + <items id="text">Fall-Kennung</items> + </term_definitions> + <term_definitions code="at0002"> + <items id="description">Das Datum, an dem der Fall begann/eröffnet wurde.</items> + <items id="text">Fall-Beginn</items> + </term_definitions> + <term_definitions code="at0003"> + <items id="description">Der Status des Falls. +Der Status "abgeschlossen" bedeutet, dass dem Patienten die entsprechende Fallnummer zugeordnet wurde. +Der Status "abgebrochen" bedeutet, dass dem Patienten die entsprechende Fallnummer fälschlicherweise zugeordnet wurde.</items> + <items id="text">Status</items> + </term_definitions> + <term_definitions code="at0004"> + <items id="description">Dem Patienten wurde die entsprechende Fallkennung zugeordnet.</items> + <items id="text">Abgeschlossen</items> + </term_definitions> + <term_definitions code="at0005"> + <items id="description">Dem Patienten wurde die entsprechende Fallkennung fälschlicherweise zugeordnet.</items> + <items id="text">Abgebrochen</items> + </term_definitions> + <term_definitions code="at0006"> + <items id="description">Bezeichnung oder kodierter Text zur Bezeichnung des Falls.</items> + <items id="text">identifizierter Fall</items> + </term_definitions> + </children> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0001</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Zugehöriger Versorgungsstellenkontakt (Kennung)</list> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </interval> + </cardinality> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Versorgungstellenkontakt</list> + </item> + </children> + </attributes> + </children> + </attributes> + <archetype_id> + <value>openEHR-EHR-CLUSTER.case_identification.v0</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="description">Zur Erfassung von Details zur Identifikation eines Falls im Gesundheitswesen.</items> + <items id="text">Fallidentifikation</items> + </term_definitions> + <term_definitions code="at0001"> + <items id="description">Der Bezeichner/die Kennung dieses Falls.</items> + <items id="text">Fall-Kennung</items> + </term_definitions> + <term_definitions code="at0002"> + <items id="description">Das Datum, an dem der Fall begann/eröffnet wurde.</items> + <items id="text">Fall-Beginn</items> + </term_definitions> + <term_definitions code="at0003"> + <items id="description">Der Status des Falls. +Der Status "abgeschlossen" bedeutet, dass dem Patienten die entsprechende Fallnummer zugeordnet wurde. +Der Status "abgebrochen" bedeutet, dass dem Patienten die entsprechende Fallnummer fälschlicherweise zugeordnet wurde.</items> + <items id="text">Status</items> + </term_definitions> + <term_definitions code="at0004"> + <items id="description">Dem Patienten wurde die entsprechende Fallkennung zugeordnet.</items> + <items id="text">Abgeschlossen</items> + </term_definitions> + <term_definitions code="at0005"> + <items id="description">Dem Patienten wurde die entsprechende Fallkennung fälschlicherweise zugeordnet.</items> + <items id="text">Abgebrochen</items> + </term_definitions> + <term_definitions code="at0006"> + <items id="description">Bezeichnung oder kodierter Text zur Bezeichnung des Falls.</items> + <items id="text">identifizierter Fall</items> + </term_definitions> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </interval> + </cardinality> + </attributes> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Patientenaufenthalt</list> + </item> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>content</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>ADMIN_ENTRY</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>data</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ITEM_TREE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0001</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0004</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_DATE_TIME</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0005</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_DATE_TIME</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0006</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0024</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0025</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0028</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0027</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0029</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0034</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Bettplatz</list> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0046</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0001</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0003</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Bett</list> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0009</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0021</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_IDENTIFIER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0019</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>openEHR-EHR-CLUSTER\.device_details(-[a-zA-Z0-9_]+)*\.v1</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0018</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>openEHR-EHR-CLUSTER\.device(-[a-zA-Z0-9_]+)*\.v1</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0026</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0027</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>openEHR-EHR-CLUSTER\.multimedia(-[a-zA-Z0-9_]+)*\.v1</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </interval> + </cardinality> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Details zum Bett</list> + </item> + </children> + </attributes> + </children> + </attributes> + <archetype_id> + <value>openEHR-EHR-CLUSTER.device.v1</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="description">Ein Instrument, ein Gerät, ein Implantat, ein Material oder ähnliches, das für die Bereitstellung von Gesundheitsleistungen verwendet wird. In diesem Zusammenhang umfasst ein medizinisches Gerät eine breite Palette von Geräten, die auf verschiedene physikalische, mechanische, thermische oder ähnliche Weise wirken, schließt jedoch insbesondere Geräte aus, die auf medizinischem Wege wirken, wie zum Beispiel pharmakologische, metabolische oder immunologische Methoden. Der Geltungsbereich umfasst +Einweggeräte sowie langlebige oder dauerhafte Geräte, die nachverfolgt, +gewartet oder regelmäßig kalibriert werden müssen, wobei zu berücksichtigen ist, dass für jeden Gerätetyp bestimmte Datenaufzeichnungsanforderungen gelten.</items> + <items id="text">Medizingerät</items> + </term_definitions> + <term_definitions code="at0001"> + <items id="comment">Dieses Datenelement erfasst den Begriff, die Phrase oder die Kategorie, die in der klinischen Praxis verwendet werden. Zum Beispiel: <Markenname> <Maschine> (XYZ-Audiometer); <Markenname> (14G Jelco IV-Katheter); oder <Markenname / Typ> <Implantat>. Die Codierung mit einer Terminologie ist nach Möglichkeit wünschenswert, auch wenn dies lokal sein kann und von den verfügbaren lokalen Lieferungen abhängt.</items> + <items id="description">Identifizierung des Medizingerätes, bevorzugt durch einen allgemein +gebräuchlichen Namen, einer formellen und vollständig beschreibenden Bezeichnung oder falls notwendig anhand einer Klasse oder Kategorie des Gerätes.</items> + <items id="text">Gerätename</items> + </term_definitions> + <term_definitions code="at0002"> + <items id="description">Beschreibung des Medizingerätes.</items> + <items id="text">Beschreibung</items> + </term_definitions> + <term_definitions code="at0003"> + <items id="comment">Nicht zutreffend, wenn eine Kategorie bereits unter "Gerätename" dokumentiert ist. +Beispiel: Wenn das 'Gerät' als 'Harnkatheter' bezeichnet wird; der 'Typ' kann als 'Verweilkatheter' oder 'Kondom' aufgezeichnet werden. Die Codierung mit einer Terminologie ist wünschenswert, sofern dies möglich ist. Dies kann die Verwendung von GTIN- oder EAN-Nummern einschließen.</items> + <items id="description">Die Kategorie des Medizingeräts.</items> + <items id="text">Gerätetyp</items> + </term_definitions> + <term_definitions code="at0004"> + <items id="description">Name des Herstellers.</items> + <items id="text">Hersteller</items> + </term_definitions> + <term_definitions code="at0005"> + <items id="description">Herstellungsdatum des Gerätes.</items> + <items id="text">Herstellungsdatum</items> + </term_definitions> + <term_definitions code="at0006"> + <items id="description">Die vom Hersteller zugewiesene Nummer, die eine Gruppe von gleichzeitig hergestellten Artikeln kennzeichnet, die sich normalerweise auf dem Etikett oder dem Verpackungsmaterial befindet.</items> + <items id="text">Chargennummer</items> + </term_definitions> + <term_definitions code="at0007"> + <items id="comment">Dieses Datum gilt normalerweise nur für Einmalprodukte oder Einwegprodukte.</items> + <items id="description">Das Datum, ab dem das Gerät/Produkt nicht mehr einsatzfähig ist. Wird normalerweise auf dem Gerät selbst oder auf der beiliegenden Verpackung aufgedruckt.</items> + <items id="text">Ablaufdatum</items> + </term_definitions> + <term_definitions code="at0008"> + <items id="description">Informationen, die hier nicht strukturiert erfasst wurden.</items> + <items id="text">Kommentar</items> + </term_definitions> + <term_definitions code="at0009"> + <items id="description">Weitere Details zu bestimmten Eigenschaften des Medizingerätes.</items> + <items id="text">Eigenschaften</items> + </term_definitions> + <term_definitions code="at0018"> + <items id="description">Zusätzliche strukturierte Informationen zu identifizierten Komponenten des Geräts.</items> + <items id="text">Komponenten</items> + </term_definitions> + <term_definitions code="at0019"> + <items id="comment">Zum Beispiel: Eigentümer, Kontaktdaten, Standort, Netzwerkadresse, Ersetzungsdatum, Kalibrierungsdetails usw.</items> + <items id="description">Weitere Details zur Verwaltung und Wartung des Geräts.</items> + <items id="text">Geräteverwaltung</items> + </term_definitions> + <term_definitions code="at0020"> + <items id="description">Die vom Hersteller zugewiesene Nummer, die sich auf dem Gerät befindet, muss für jedes Gerät, sein Etikett oder die dazugehörige Verpackung spezifisch sein.</items> + <items id="text">Seriennummer</items> + </term_definitions> + <term_definitions code="at0021"> + <items id="comment">Oft als Barcode am Gerät befestigt.</items> + <items id="description">Eine numerische oder alphanumerische Zeichenfolge, die diesem Gerät in einem bestimmten System zugeordnet ist.</items> + <items id="text">Eindeutige Identifikationsnummer (ID)</items> + </term_definitions> + <term_definitions code="at0022"> + <items id="description">Die genaue vom Hersteller vergebene Nummer, wie sie im Herstellerkatalog, in der Gerätekennzeichnung oder in der Begleitverpackung angegeben ist.</items> + <items id="text">Katalognummer</items> + </term_definitions> + <term_definitions code="at0023"> + <items id="description">Die Modellnummer des Herstellers, die sich auf dem Geräteetikett oder der zugehörigen Verpackung befindet.</items> + <items id="text">Modellnummer</items> + </term_definitions> + <term_definitions code="at0024"> + <items id="comment">Sofern verfügbar, ist die Kodierung des Namens des Identifikators mit einem Kodierungssystem wünschenswert.</items> + <items id="description">Nicht spezifizierter Bezeichner, der in einer Vorlage oder zur Laufzeit weiter spezifiziert werden kann.</items> + <items id="text">Weitere ID</items> + </term_definitions> + <term_definitions code="at0025"> + <items id="comment">Wenn das Medizinprodukt eine eigentliche Softwareanwendung ist, erfassen Sie die Version der Software mit diesem Datenelement. Wenn in dem Medizingerät mehrere Softwareanwendungen eingebettet sind, zeichnen Sie jede Softwarekomponente in einem separaten CLUSTER-Archetyp im +Komponenten-SLOT auf - entweder als verschachtelte Instanz eines +anderen CLUSTER.device-Archetyps oder unter Verwendung eines +CLUSTER-Archetyps, der speziell für die Aufzeichnung von +Softwaredetails entwickelt wurde (aber zum Zeitpunkt dieser +Archetypentwicklung noch nicht verfügbar war).</items> + <items id="description">Identifizierung der im Medizingerät verwendeten Softwareversion.</items> + <items id="text">Softwareversion</items> + </term_definitions> + <term_definitions code="at0026"> + <items id="description">Zusätzliche Informationen, die zur Erfassung des lokalen Kontexts oder +zur Angleichung an andere Referenzmodelle/Formalismen erforderlich sind.</items> + <items id="text">Erweiterung</items> + </term_definitions> + <term_definitions code="at0027"> + <items id="comment">Zum Beispiel: ein technisches Diagramm eines Geräts oder ein digitales Bild.</items> + <items id="description">Digitale Repräsentation des Gerätes.</items> + <items id="text">Multimedia</items> + </term_definitions> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0049</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </interval> + </cardinality> + </attributes> + <archetype_id> + <value>openEHR-EHR-CLUSTER.location.v1</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="description">Standort umfasst sowohl beiläufige Orte (ein Ort, der für die medizinische Versorgung ohne vorherige Benennung oder Genehmigung genutzt wird) als auch spezielle, offiziell benannte Orte. Die Standorte können privat, öffentlich, mobil oder stationär sein.</items> + <items id="text">Standort</items> + </term_definitions> + <term_definitions code="at0024"> + <items id="description">Eine Gruppe von Gebäuden an anderen Orten, wie ein örtlich entfernter Campus, der außerhalb der Einrichtung liegt, aber zur Institution gehört.</items> + <items id="text">Campus</items> + </term_definitions> + <term_definitions code="at0025"> + <items id="description">Ein Gebäude oder Bauwerk. Dazu können Räume, Flure, Flügel, etc. gehören. Es hat möglicherweise keine Wände oder ein Dach, wird aber dennoch als definierter/zugeordneter Raum angesehen.</items> + <items id="text">Gebäudegruppe</items> + </term_definitions> + <term_definitions code="at0027"> + <items id="description">Eine Station ist Teil einer medizinischen Einrichtung, die Räume und andere Arten von Orten enthalten kann.</items> + <items id="text">Station</items> + </term_definitions> + <term_definitions code="at0028"> + <items id="description">Die Ebene in einem mehrstöckigen Gebäude/Bauwerk.</items> + <items id="text">Ebene</items> + </term_definitions> + <term_definitions code="at0029"> + <items id="description">Ein Ort, der als Zimmer deklariert wurde. Bei einigen Standorten kann das Zimmer im Flur liegen zB: Station XYZ Flur 2. Hierbei liegt der Bettstellplatz 2 auf dem Flur der jeweiligen Station.</items> + <items id="text">Zimmer</items> + </term_definitions> + <term_definitions code="at0034"> + <items id="description">Beschreibung des Bettstellplatzes z.B. Bett stand neben dem Fenster oder neben der Tür.</items> + <items id="text">Bettstellplatz</items> + </term_definitions> + <term_definitions code="at0046"> + <items id="description">Das Feld enthält die Freitextbeschreibung des Standorts, z.B. Throax-, Herz- und Gefäßchirurgie.</items> + <items id="text">Zusätzliche Beschreibung</items> + </term_definitions> + <term_definitions code="at0047"> + <items id="description">Für die Erfassung weiterer Angaben über das Bett oder der Adresse. Verwenden Sie dazu den Archetyp CLUSTER.device oder CLUSTER.address.</items> + <items id="text">Details</items> + </term_definitions> + <term_definitions code="at0049"> + <items id="description">Organisation, die für die Bereitstellung und Instandhaltung verantwortlich ist + +Die Organisation, die für die Bereitstellung und den Unterhalt des Standorts verantwortlich ist.</items> + <items id="text">Leitende Organisationseinheit</items> + </term_definitions> + </children> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0051</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Healthcare Provider</list> + <list>Hospital Department</list> + <list>Organizational team</list> + <list>Government</list> + <list>Insurance Company</list> + <list>Payer</list> + <list>Educational Institute</list> + <list>Religious Institution</list> + <list>Clinical Research Sponsor</list> + <list>Community Group</list> + <list>Non-Healthcare Business or Corporation</list> + <list>Other</list> + <list_open>true</list_open> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0024</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>Anhang 1 der BPflV (31.12.2003)</value> + </terminology_id> + <code_list>0100</code_list> + <code_list>0200</code_list> + <code_list>0300</code_list> + <code_list>0400</code_list> + <code_list>0500</code_list> + <code_list>0600</code_list> + <code_list>0700</code_list> + <code_list>0800</code_list> + <code_list>0900</code_list> + <code_list>1000</code_list> + <code_list>1100</code_list> + <code_list>1200</code_list> + <code_list>1300</code_list> + <code_list>1400</code_list> + <code_list>1500</code_list> + <code_list>1600</code_list> + <code_list>1700</code_list> + <code_list>1800</code_list> + <code_list>1900</code_list> + <code_list>2000</code_list> + <code_list>2100</code_list> + <code_list>2200</code_list> + <code_list>2300</code_list> + <code_list>2400</code_list> + <code_list>2500</code_list> + <code_list>2600</code_list> + <code_list>2700</code_list> + <code_list>2800</code_list> + <code_list>2900</code_list> + <code_list>3000</code_list> + <code_list>3100</code_list> + <code_list>3200</code_list> + <code_list>3300</code_list> + <code_list>3400</code_list> + <code_list>3500</code_list> + <code_list>3600</code_list> + <code_list>2316</code_list> + <code_list>2425</code_list> + <code_list>3700</code_list> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Fachabteilungsschlüssel</list> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0052</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0050</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_BOOLEAN</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0046</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0047</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </interval> + </cardinality> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Fachliche Organisationseinheit</list> + </item> + </children> + </attributes> + </children> + </attributes> + <archetype_id> + <value>openEHR-EHR-CLUSTER.organization.v0</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="description">Eine fachliche Einheit, Organisation, Abteilung, Zusammenschluss, Gruppierung mit einem gemeinsamen Ziel.</items> + <items id="fhir">Organization</items> + <items id="text">Organisationseinheit</items> + </term_definitions> + <term_definitions code="at0024"> + <items id="description">Eindeutiger Identifikator der Organisationseinheit.</items> + <items id="fhir">Organization.identifier</items> + <items id="text">Organisationsschlüssel</items> + </term_definitions> + <term_definitions code="at0046"> + <items id="description">Zusätzliche Informationen</items> + <items id="text">Zusätzliche Beschreibung</items> + </term_definitions> + <term_definitions code="at0047"> + <items id="description">Für die Erfassung weiterer Angaben über die Organisationseinheit, zum Beispiel Adresse oder Telekommunikationsdetails.</items> + <items id="fhir">Organization.address</items> + <items id="text">Details</items> + </term_definitions> + <term_definitions code="at0050"> + <items id="description">Gibt an, ob die Organisationseinheit noch aktiv ist.</items> + <items id="fhir">Organization.active</items> + <items id="text">Aktiv/Inaktiv</items> + </term_definitions> + <term_definitions code="at0051"> + <items id="comment">Zum Beispiel: Fachabteilung im Krankenhaus, Versicherungsunternehmen, Sponsor</items> + <items id="description">Art der Organisationseinheit.</items> + <items id="fhir">Organization.type</items> + <items id="text">Typ</items> + </term_definitions> + <term_definitions code="at0052"> + <items id="description">Bezeichnung für die Organisationseinheit</items> + <items id="fhir">Organization.name</items> + <items id="text">Name</items> + </term_definitions> + <term_definitions code="0100"> + <items id="text">Innere Medizin</items> + </term_definitions> + <term_definitions code="0200"> + <items id="text">Geriatrie</items> + </term_definitions> + <term_definitions code="0300"> + <items id="text">Kardiologie</items> + </term_definitions> + <term_definitions code="0400"> + <items id="text">Nephrologie</items> + </term_definitions> + <term_definitions code="0500"> + <items id="text">Hamatologie und internistische Onkologie</items> + </term_definitions> + <term_definitions code="0600"> + <items id="text">Endokrinologie</items> + </term_definitions> + <term_definitions code="0700"> + <items id="text">Gastroenterologie</items> + </term_definitions> + <term_definitions code="0800"> + <items id="text">Pneumologie</items> + </term_definitions> + <term_definitions code="0900"> + <items id="text">Rheumatologie</items> + </term_definitions> + <term_definitions code="1000"> + <items id="text">Padiatrie</items> + </term_definitions> + <term_definitions code="1100"> + <items id="text">Kinderkardiologie</items> + </term_definitions> + <term_definitions code="1200"> + <items id="text">Neonatologie</items> + </term_definitions> + <term_definitions code="1300"> + <items id="text">Kinderchirurgie</items> + </term_definitions> + <term_definitions code="1400"> + <items id="text">Lungen- und Bronchialheilkunde</items> + </term_definitions> + <term_definitions code="1500"> + <items id="text">Allgemeine Chirurgie</items> + </term_definitions> + <term_definitions code="1600"> + <items id="text">Unfallchirurgie</items> + </term_definitions> + <term_definitions code="1700"> + <items id="text">Neurochirurgie</items> + </term_definitions> + <term_definitions code="1800"> + <items id="text">Gefa.chirurgie</items> + </term_definitions> + <term_definitions code="1900"> + <items id="text">Plastische Chirurgie</items> + </term_definitions> + <term_definitions code="2000"> + <items id="text">Thoraxchirurgie</items> + </term_definitions> + <term_definitions code="2100"> + <items id="text">Herzchirurgie</items> + </term_definitions> + <term_definitions code="2200"> + <items id="text">Urologie</items> + </term_definitions> + <term_definitions code="2300"> + <items id="text">Orthopadie</items> + </term_definitions> + <term_definitions code="2400"> + <items id="text">Frauenheilkunde und Geburtshilfe</items> + </term_definitions> + <term_definitions code="2500"> + <items id="text">Geburtshilfe</items> + </term_definitions> + <term_definitions code="2600"> + <items id="text">Hals-, Nasen-, Ohrenheilkunde</items> + </term_definitions> + <term_definitions code="2700"> + <items id="text">Augenheilkunde</items> + </term_definitions> + <term_definitions code="2800"> + <items id="text">Neurologie</items> + </term_definitions> + <term_definitions code="2900"> + <items id="text">Allgemeine Psychiatrie</items> + </term_definitions> + <term_definitions code="3000"> + <items id="text">Kinder- und Jugendpsychiatrie</items> + </term_definitions> + <term_definitions code="3100"> + <items id="text">Psychosomatik/Psychotherapie</items> + </term_definitions> + <term_definitions code="3200"> + <items id="text">Nuklearmedizin</items> + </term_definitions> + <term_definitions code="3300"> + <items id="text">Strahlenheilkunde</items> + </term_definitions> + <term_definitions code="3400"> + <items id="text">Dermatologie</items> + </term_definitions> + <term_definitions code="3500"> + <items id="text">Zahn- und Kieferheilkunde, Mund- und Kieferchirurgie</items> + </term_definitions> + <term_definitions code="3600"> + <items id="text">Intensivmedizin</items> + </term_definitions> + <term_definitions code="2316"> + <items id="text">Orthopadie und Unfallchirurgie</items> + </term_definitions> + <term_definitions code="2425"> + <items id="text">Frauenheilkunde</items> + </term_definitions> + <term_definitions code="3700"> + <items id="text">Sonstige Fachabteilung</items> + </term_definitions> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0009</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </interval> + </cardinality> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Versorgungsaufenthalt</list> + </item> + </children> + </attributes> + </children> + </attributes> + <archetype_id> + <value>openEHR-EHR-ADMIN_ENTRY.hospitalization.v0</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="description">Zur Erfassung der administrativen Aufenthaltsdaten eines Patienten.</items> + <items id="text">Aufenthaltsdaten</items> + </term_definitions> + <term_definitions code="at0001"> + <items id="description">@ internal @</items> + <items id="text">Baum</items> + </term_definitions> + <term_definitions code="at0003"> + <items id="description">Art des Aufenthaltes.</items> + <items id="text">Art des Aufenthaltes</items> + </term_definitions> + <term_definitions code="at0004"> + <items id="description">Zeitlicher Beginn des Aufenthaltes am beschriebenen Ort.</items> + <items id="text">Beginn</items> + </term_definitions> + <term_definitions code="at0005"> + <items id="description">Zeitliches Ende des Aufenthaltes am beschriebenen Ort.</items> + <items id="text">Ende</items> + </term_definitions> + <term_definitions code="at0006"> + <items id="description">Grund des Aufenthaltes</items> + <items id="text">Grund des Aufenthaltes</items> + </term_definitions> + <term_definitions code="at0008"> + <items id="description">Dieser Slot dient der Erfassung des Standortes des Patienten während des Krankenhausaufenthaltes.</items> + <items id="text">Standort</items> + </term_definitions> + <term_definitions code="at0009"> + <items id="description">Zusätzliche Kommentare.</items> + <items id="text">Kommentar</items> + </term_definitions> + <term_definitions code="at0010"> + <items id="description">Stationär</items> + <items id="text">Stationär</items> + </term_definitions> + <term_definitions code="at0011"> + <items id="description">Ambulant</items> + <items id="text">Ambulant</items> + </term_definitions> + <term_definitions code="at0012"> + <items id="description">Sonstige</items> + <items id="text">Sonstige</items> + </term_definitions> + <term_definitions code="at0013"> + <items id="description">Verantwortliche Organisationseinheit, z.B. die fachliche Organisationseinheit (Fachabteilung).</items> + <items id="text">Verantwortliche Organisationseinheit</items> + </term_definitions> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </interval> + </cardinality> + </attributes> + <archetype_id> + <value>openEHR-EHR-COMPOSITION.event_summary.v0</value> + </archetype_id> + <template_id> + <value>Patientenaufenthalt</value> + </template_id> + <term_definitions code="at0000"> + <items id="description">Zusammenfassung eines einzelnen, wesentlichen Vorgangs im Gesundheitswesen, eines Kontakts oder einer Behandlungsepisode.</items> + <items id="text">Zusammenfassung eines Vorgangs</items> + </term_definitions> + <term_definitions code="at0001"> + <items id="description">@ internal @</items> + <items id="text">Tree</items> + </term_definitions> + <term_definitions code="at0002"> + <items id="comment">Zum Beispiel: Lokaler Informationsbedarf oder zusätzliche Metadaten zur Anpassung an FHIR-Resourcen oder CIMI-Äquivalente.</items> + <items id="description">Zusätzliche Informationen zur Erfassung lokaler Inhalte oder Anpassung an andere Referenzmodelle/Formalismen +Ergänzende lokale Informationen oder solche, die zum Abgleich mit anderen Referenzmodellen/Formalismen benötigt werden.</items> + <items id="text">Erweiterung</items> + </term_definitions> + </definition> + <annotations path="[openEHR-EHR-COMPOSITION.event_summary.v0]/content[openEHR-EHR-ADMIN_ENTRY.hospitalization.v0]/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]"> + <items id="fhir">Organization</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.event_summary.v0]/content[openEHR-EHR-ADMIN_ENTRY.hospitalization.v0]/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]/items[at0051]"> + <items id="fhir">Organization.type</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.event_summary.v0]/content[openEHR-EHR-ADMIN_ENTRY.hospitalization.v0]/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]/items[at0050]"> + <items id="fhir">Organization.active</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.event_summary.v0]/content[openEHR-EHR-ADMIN_ENTRY.hospitalization.v0]/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]/items[at0052]"> + <items id="fhir">Organization.name</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.event_summary.v0]/content[openEHR-EHR-ADMIN_ENTRY.hospitalization.v0]/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]/items[at0024]"> + <items id="fhir">Organization.identifier</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.event_summary.v0]/content[openEHR-EHR-ADMIN_ENTRY.hospitalization.v0]/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]/items[at0047]"> + <items id="fhir">Organization.address</items> + </annotations> + <view/> +</template> \ No newline at end of file diff --git a/src/main/resources/opt/Stationaerer_Versorgungsfall.opt b/src/main/resources/opt/Stationaerer_Versorgungsfall.opt new file mode 100644 index 000000000..3a4bd44be --- /dev/null +++ b/src/main/resources/opt/Stationaerer_Versorgungsfall.opt @@ -0,0 +1,3843 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Operational template XML automatically generated by Ocean OPT Generator webservice --> +<template xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.openehr.org/v1"> + <language> + <terminology_id> + <value>ISO_639-1</value> + </terminology_id> + <code_string>de</code_string> + </language> + <description> + <original_author id="Original Author">Not Specified</original_author> + <lifecycle_state>Initial</lifecycle_state> + <other_details id="MetaDataSet:Sample Set ">Template metadata sample set</other_details> + <other_details id="Acknowledgements"/> + <other_details id="Business Process Level"/> + <other_details id="Care setting"/> + <other_details id="Client group"/> + <other_details id="Clinical Record Element"/> + <other_details id="Copyright"/> + <other_details id="Issues"/> + <other_details id="Owner"/> + <other_details id="Sign off"/> + <other_details id="Speciality"/> + <other_details id="User roles"/> + <other_details id="MD5-CAM-1.0.1">9aa7feba879aa3e931604e0e9f4c088d</other_details> + <other_details id="PARENT:MD5-CAM-1.0.1">AFFFB351A3113D61F0822FEBDF5F42E3</other_details> + <other_details id="original_language">ISO_639-1::de</other_details> + <other_details id="original_language">ISO_639-1::de</other_details> + <details> + <language> + <terminology_id> + <value>ISO_639-1</value> + </terminology_id> + <code_string>de</code_string> + </language> + <purpose>Zur Repräsentation der administrativen Daten eines Falls (Fallinformationen, Aufnahme, Entlassung) eines Patienten innerhalb einer Einrichtung. Ein “Fall” beginnt mit der Aufnahme ins Krankenhaus an einem Aufnahmedatum und endet mit der Entlassung an einem Entlassungsdatum.</purpose> + <keywords>Versorgungsfall</keywords> + <keywords>Fall</keywords> + <keywords>Aufnahme</keywords> + <use>Für die Abbildung stationärer Aufenthalte eines Patienten in einer Gesundheitseinrichtung.</use> + <misuse>Nicht zur Repräsentation eines einzelnen stationären Aufenthalts eines Patienten auf einer Station zu verwenden. Bitte den Archetyp ADMIN_ENTRY.krankenhausaufenthalt.v0 zur Dokumentation einzelne Aufenthalte unterhalb eines Falls verwenden.</misuse> + </details> + </description> + <uid> + <value>fd914852-07d5-4aaf-b982-34beb3bd83e6</value> + </uid> + <template_id> + <value>Stationärer Versorgungsfall</value> + </template_id> + <concept>Stationärer Versorgungsfall</concept> + <definition> + <rm_type_name>COMPOSITION</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>category</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>openehr</value> + </terminology_id> + <code_list>433</code_list> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>context</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>EVENT_CONTEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>other_context</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ITEM_TREE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0001</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0005</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Einrichtungskontakt</list> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0004</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Stationär</list> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0010</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>http://hl7.org/fhir/encounter-status</value> + </terminology_id> + <code_list>planned</code_list> + <code_list>in-progress</code_list> + <code_list>onleave</code_list> + <code_list>finished</code_list> + <code_list>cancelled</code_list> + <code_list>entered-in-error</code_list> + <code_list>unknown</code_list> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0003</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Fall-Kennung</list> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0011</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0002</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0051</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Hospital Department</list> + <list_open>true</list_open> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0024</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>Anhang 1 der BPflV (31.12.2003)</value> + </terminology_id> + <code_list>0100</code_list> + <code_list>0200</code_list> + <code_list>0300</code_list> + <code_list>0400</code_list> + <code_list>0500</code_list> + <code_list>0600</code_list> + <code_list>0700</code_list> + <code_list>0800</code_list> + <code_list>0900</code_list> + <code_list>1000</code_list> + <code_list>1100</code_list> + <code_list>1200</code_list> + <code_list>1300</code_list> + <code_list>1400</code_list> + <code_list>1500</code_list> + <code_list>1600</code_list> + <code_list>1700</code_list> + <code_list>1800</code_list> + <code_list>1900</code_list> + <code_list>2000</code_list> + <code_list>2100</code_list> + <code_list>2200</code_list> + <code_list>2300</code_list> + <code_list>2400</code_list> + <code_list>2500</code_list> + <code_list>2600</code_list> + <code_list>2700</code_list> + <code_list>2800</code_list> + <code_list>2900</code_list> + <code_list>3000</code_list> + <code_list>3100</code_list> + <code_list>3200</code_list> + <code_list>3300</code_list> + <code_list>3400</code_list> + <code_list>3500</code_list> + <code_list>3600</code_list> + <code_list>2316</code_list> + <code_list>2425</code_list> + <code_list>3700</code_list> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0052</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0050</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_BOOLEAN</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0046</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0047</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </interval> + </cardinality> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Fachliche Organisationseinheit</list> + </item> + </children> + </attributes> + </children> + </attributes> + <archetype_id> + <value>openEHR-EHR-CLUSTER.organization.v0</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="description">Eine fachliche Einheit, Organisation, Abteilung, Zusammenschluss, Gruppierung mit einem gemeinsamen Ziel.</items> + <items id="fhir">Organization</items> + <items id="text">Organisationseinheit</items> + </term_definitions> + <term_definitions code="at0024"> + <items id="description">Eindeutiger Identifikator der Organisationseinheit.</items> + <items id="fhir">Organization.identifier</items> + <items id="text">Organisationsschlüssel</items> + </term_definitions> + <term_definitions code="at0046"> + <items id="description">Zusätzliche Informationen</items> + <items id="text">Zusätzliche Beschreibung</items> + </term_definitions> + <term_definitions code="at0047"> + <items id="description">Für die Erfassung weiterer Angaben über die Organisationseinheit, zum Beispiel Adresse oder Telekommunikationsdetails.</items> + <items id="fhir">Organization.address</items> + <items id="text">Details</items> + </term_definitions> + <term_definitions code="at0050"> + <items id="description">Gibt an, ob die Organisationseinheit noch aktiv ist.</items> + <items id="fhir">Organization.active</items> + <items id="text">Aktiv/Inaktiv</items> + </term_definitions> + <term_definitions code="at0051"> + <items id="comment">Zum Beispiel: Fachabteilung im Krankenhaus, Versicherungsunternehmen, Sponsor</items> + <items id="description">Art der Organisationseinheit.</items> + <items id="fhir">Organization.type</items> + <items id="text">Typ</items> + </term_definitions> + <term_definitions code="at0052"> + <items id="description">Bezeichnung für die Organisationseinheit</items> + <items id="fhir">Organization.name</items> + <items id="text">Name</items> + </term_definitions> + <term_definitions code="0100"> + <items id="text">Innere Medizin</items> + </term_definitions> + <term_definitions code="0200"> + <items id="text">Geriatrie</items> + </term_definitions> + <term_definitions code="0300"> + <items id="text">Kardiologie</items> + </term_definitions> + <term_definitions code="0400"> + <items id="text">Nephrologie</items> + </term_definitions> + <term_definitions code="0500"> + <items id="text">Hamatologie und internistische Onkologie</items> + </term_definitions> + <term_definitions code="0600"> + <items id="text">Endokrinologie</items> + </term_definitions> + <term_definitions code="0700"> + <items id="text">Gastroenterologie</items> + </term_definitions> + <term_definitions code="0800"> + <items id="text">Pneumologie</items> + </term_definitions> + <term_definitions code="0900"> + <items id="text">Rheumatologie</items> + </term_definitions> + <term_definitions code="1000"> + <items id="text">Padiatrie</items> + </term_definitions> + <term_definitions code="1100"> + <items id="text">Kinderkardiologie</items> + </term_definitions> + <term_definitions code="1200"> + <items id="text">Neonatologie</items> + </term_definitions> + <term_definitions code="1300"> + <items id="text">Kinderchirurgie</items> + </term_definitions> + <term_definitions code="1400"> + <items id="text">Lungen- und Bronchialheilkunde</items> + </term_definitions> + <term_definitions code="1500"> + <items id="text">Allgemeine Chirurgie</items> + </term_definitions> + <term_definitions code="1600"> + <items id="text">Unfallchirurgie</items> + </term_definitions> + <term_definitions code="1700"> + <items id="text">Neurochirurgie</items> + </term_definitions> + <term_definitions code="1800"> + <items id="text">Gefa.chirurgie</items> + </term_definitions> + <term_definitions code="1900"> + <items id="text">Plastische Chirurgie</items> + </term_definitions> + <term_definitions code="2000"> + <items id="text">Thoraxchirurgie</items> + </term_definitions> + <term_definitions code="2100"> + <items id="text">Herzchirurgie</items> + </term_definitions> + <term_definitions code="2200"> + <items id="text">Urologie</items> + </term_definitions> + <term_definitions code="2300"> + <items id="text">Orthopadie</items> + </term_definitions> + <term_definitions code="2400"> + <items id="text">Frauenheilkunde und Geburtshilfe</items> + </term_definitions> + <term_definitions code="2500"> + <items id="text">Geburtshilfe</items> + </term_definitions> + <term_definitions code="2600"> + <items id="text">Hals-, Nasen-, Ohrenheilkunde</items> + </term_definitions> + <term_definitions code="2700"> + <items id="text">Augenheilkunde</items> + </term_definitions> + <term_definitions code="2800"> + <items id="text">Neurologie</items> + </term_definitions> + <term_definitions code="2900"> + <items id="text">Allgemeine Psychiatrie</items> + </term_definitions> + <term_definitions code="3000"> + <items id="text">Kinder- und Jugendpsychiatrie</items> + </term_definitions> + <term_definitions code="3100"> + <items id="text">Psychosomatik/Psychotherapie</items> + </term_definitions> + <term_definitions code="3200"> + <items id="text">Nuklearmedizin</items> + </term_definitions> + <term_definitions code="3300"> + <items id="text">Strahlenheilkunde</items> + </term_definitions> + <term_definitions code="3400"> + <items id="text">Dermatologie</items> + </term_definitions> + <term_definitions code="3500"> + <items id="text">Zahn- und Kieferheilkunde, Mund- und Kieferchirurgie</items> + </term_definitions> + <term_definitions code="3600"> + <items id="text">Intensivmedizin</items> + </term_definitions> + <term_definitions code="2316"> + <items id="text">Orthopadie und Unfallchirurgie</items> + </term_definitions> + <term_definitions code="2425"> + <items id="text">Frauenheilkunde</items> + </term_definitions> + <term_definitions code="3700"> + <items id="text">Sonstige Fachabteilung</items> + </term_definitions> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </interval> + </cardinality> + </attributes> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Stationärer Versorgungsfall</list> + </item> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>content</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>ADMIN_ENTRY</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>data</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ITEM_TREE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0001</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0013</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>§21 KHEntgG</value> + </terminology_id> + <code_list>01</code_list> + <code_list>02</code_list> + <code_list>03</code_list> + <code_list>04</code_list> + <code_list>05</code_list> + <code_list>06</code_list> + <code_list>07</code_list> + <code_list>08</code_list> + <code_list>10</code_list> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0049</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>§21 KHEntgG</value> + </terminology_id> + <code_list>E</code_list> + <code_list>Z</code_list> + <code_list>N</code_list> + <code_list>R</code_list> + <code_list>V</code_list> + <code_list>A</code_list> + <code_list>G</code_list> + <code_list>B</code_list> + </children> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Aufnahmeanlass</list> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0023</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0071</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_DATE_TIME</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0131</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0024</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0025</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0028</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0027</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0029</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0034</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0046</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0047</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0049</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </interval> + </cardinality> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Vorheriger Patientenstandort (vor Aufnahme)</list> + </item> + </children> + </attributes> + </children> + </attributes> + <archetype_id> + <value>openEHR-EHR-CLUSTER.location.v1</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="description">Standort umfasst sowohl beiläufige Orte (ein Ort, der für die medizinische Versorgung ohne vorherige Benennung oder Genehmigung genutzt wird) als auch spezielle, offiziell benannte Orte. Die Standorte können privat, öffentlich, mobil oder stationär sein.</items> + <items id="text">Standort</items> + </term_definitions> + <term_definitions code="at0024"> + <items id="description">Eine Gruppe von Gebäuden an anderen Orten, wie ein örtlich entfernter Campus, der außerhalb der Einrichtung liegt, aber zur Institution gehört.</items> + <items id="text">Campus</items> + </term_definitions> + <term_definitions code="at0025"> + <items id="description">Ein Gebäude oder Bauwerk. Dazu können Räume, Flure, Flügel, etc. gehören. Es hat möglicherweise keine Wände oder ein Dach, wird aber dennoch als definierter/zugeordneter Raum angesehen.</items> + <items id="text">Gebäudegruppe</items> + </term_definitions> + <term_definitions code="at0027"> + <items id="description">Eine Station ist Teil einer medizinischen Einrichtung, die Räume und andere Arten von Orten enthalten kann.</items> + <items id="text">Station</items> + </term_definitions> + <term_definitions code="at0028"> + <items id="description">Die Ebene in einem mehrstöckigen Gebäude/Bauwerk.</items> + <items id="text">Ebene</items> + </term_definitions> + <term_definitions code="at0029"> + <items id="description">Ein Ort, der als Zimmer deklariert wurde. Bei einigen Standorten kann das Zimmer im Flur liegen zB: Station XYZ Flur 2. Hierbei liegt der Bettstellplatz 2 auf dem Flur der jeweiligen Station.</items> + <items id="text">Zimmer</items> + </term_definitions> + <term_definitions code="at0034"> + <items id="description">Beschreibung des Bettstellplatzes z.B. Bett stand neben dem Fenster oder neben der Tür.</items> + <items id="text">Bettstellplatz</items> + </term_definitions> + <term_definitions code="at0046"> + <items id="description">Das Feld enthält die Freitextbeschreibung des Standorts, z.B. Throax-, Herz- und Gefäßchirurgie.</items> + <items id="text">Zusätzliche Beschreibung</items> + </term_definitions> + <term_definitions code="at0047"> + <items id="description">Für die Erfassung weiterer Angaben über das Bett oder der Adresse. Verwenden Sie dazu den Archetyp CLUSTER.device oder CLUSTER.address.</items> + <items id="text">Details</items> + </term_definitions> + <term_definitions code="at0049"> + <items id="description">Organisation, die für die Bereitstellung und Instandhaltung verantwortlich ist + +Die Organisation, die für die Bereitstellung und den Unterhalt des Standorts verantwortlich ist.</items> + <items id="text">Leitende Organisationseinheit</items> + </term_definitions> + </children> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0051</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0024</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0052</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0050</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_BOOLEAN</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0046</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0047</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </interval> + </cardinality> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Vorherige verantwortliche Organisationseinheit (vor Aufnahme)</list> + </item> + </children> + </attributes> + </children> + </attributes> + <archetype_id> + <value>openEHR-EHR-CLUSTER.organization.v0</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="description">Eine fachliche Einheit, Organisation, Abteilung, Zusammenschluss, Gruppierung mit einem gemeinsamen Ziel.</items> + <items id="fhir">Organization</items> + <items id="text">Organisationseinheit</items> + </term_definitions> + <term_definitions code="at0024"> + <items id="description">Eindeutiger Identifikator der Organisationseinheit.</items> + <items id="fhir">Organization.identifier</items> + <items id="text">Organisationsschlüssel</items> + </term_definitions> + <term_definitions code="at0046"> + <items id="description">Zusätzliche Informationen</items> + <items id="text">Zusätzliche Beschreibung</items> + </term_definitions> + <term_definitions code="at0047"> + <items id="description">Für die Erfassung weiterer Angaben über die Organisationseinheit, zum Beispiel Adresse oder Telekommunikationsdetails.</items> + <items id="fhir">Organization.address</items> + <items id="text">Details</items> + </term_definitions> + <term_definitions code="at0050"> + <items id="description">Gibt an, ob die Organisationseinheit noch aktiv ist.</items> + <items id="fhir">Organization.active</items> + <items id="text">Aktiv/Inaktiv</items> + </term_definitions> + <term_definitions code="at0051"> + <items id="comment">Zum Beispiel: Fachabteilung im Krankenhaus, Versicherungsunternehmen, Sponsor</items> + <items id="description">Art der Organisationseinheit.</items> + <items id="fhir">Organization.type</items> + <items id="text">Typ</items> + </term_definitions> + <term_definitions code="at0052"> + <items id="description">Bezeichnung für die Organisationseinheit</items> + <items id="fhir">Organization.name</items> + <items id="text">Name</items> + </term_definitions> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </interval> + </cardinality> + </attributes> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Aufnahmedaten</list> + </item> + </children> + </attributes> + </children> + </attributes> + <archetype_id> + <value>openEHR-EHR-ADMIN_ENTRY.admission.v0</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="description">Wird nur für aufgenommene Patienten verwendet. Es signalisiert den Beginn des Aufenthalts eines Patienten in einer Gesundheitseinrichtung.</items> + <items id="text">Patientenaufnahme</items> + </term_definitions> + <term_definitions code="at0001"> + <items id="description">@ internal @</items> + <items id="text">Tree</items> + </term_definitions> + <term_definitions code="at0002"> + <items id="description">Bestimmte Behandlungsmethode oder Vorgesehene Behandlungsmethode.</items> + <items id="text">Patientenklasse</items> + </term_definitions> + <term_definitions code="at0013"> + <items id="description">Der Umstand, unter dem der Patient aufgenommen wird.</items> + <items id="text">Aufnahmegrund</items> + </term_definitions> + <term_definitions code="at0023"> + <items id="description">Identifikationsnummer des Patienten vor der Aufnahme</items> + <items id="text">Identifikationsnummer des Patienten vor der Aufnahme</items> + </term_definitions> + <term_definitions code="at0025"> + <items id="description">Arzt, der den Patienten an den konsultierten Arzt überwiesen hat.</items> + <items id="text">Überweisender Arzt</items> + </term_definitions> + <term_definitions code="at0041"> + <items id="description">Für die lokale Verwendung enthält dieses Feld die Art der Organisationseinheit oder klinischen Einheit, z.B. CARDIO.</items> + <items id="text">Krankenhausdienst</items> + </term_definitions> + <term_definitions code="at0049"> + <items id="description">Nähere Beschreibung der Art der Aufnahme, z.B. Unfall oder Notfall.</items> + <items id="text">Art der Aufnahme</items> + </term_definitions> + <term_definitions code="at0051"> + <items id="description">Der Arzt, welche den Patienten aufgenommen hat.</items> + <items id="text">Aufnehmender Arzt</items> + </term_definitions> + <term_definitions code="at0061"> + <items id="description">Die Art der Finanzierung.</items> + <items id="text">Art der Finanzierung</items> + </term_definitions> + <term_definitions code="at0071"> + <items id="description">Datum/Zeit, an dem der Patient aufgenommen wurde.</items> + <items id="text">Datum/Uhrzeit der Aufnahme</items> + </term_definitions> + <term_definitions code="at0098"> + <items id="description">Der behandelnde Arzt, der Dienstleistungen für den Patienten erbringt.</items> + <items id="text">Behandelnder Arzt</items> + </term_definitions> + <term_definitions code="at0099"> + <items id="description">Identifikationsnummer</items> + <items id="text">ID</items> + </term_definitions> + <term_definitions code="at0100"> + <items id="description">Familienname</items> + <items id="text">Familienname</items> + </term_definitions> + <term_definitions code="at0120"> + <items id="description">Nachname</items> + <items id="text">Nachname</items> + </term_definitions> + <term_definitions code="at0121"> + <items id="description">Für die Behandlung des Patienten verantwortlicher Berater, einschließlich angestellter Facharzt, Amtsarzt.</items> + <items id="text">Konsultierter Arzt</items> + </term_definitions> + <term_definitions code="at0131"> + <items id="description">Zugewiesener Patientenstandort</items> + <items id="text">Zugewiesener Patientenstandort</items> + </term_definitions> + <term_definitions code="at0132"> + <items id="description">Vorheriger Patientenstandort</items> + <items id="text">Vorheriger Patientenstandort</items> + </term_definitions> + <term_definitions code="01"> + <items id="text">Krankenhausbehandlung, vollstationär</items> + </term_definitions> + <term_definitions code="02"> + <items id="text">Krankenhausbehandlung, vollstationär mit vorausgegangener vorstationärer Behandlung</items> + </term_definitions> + <term_definitions code="03"> + <items id="text">Krankenhausbehandlung, teilstationär</items> + </term_definitions> + <term_definitions code="04"> + <items id="text">vorstationäre Behandlung ohne anschließende vollstationäre Behandlung</items> + </term_definitions> + <term_definitions code="05"> + <items id="text">Stationäre Entbindung</items> + </term_definitions> + <term_definitions code="06"> + <items id="text">Geburt</items> + </term_definitions> + <term_definitions code="07"> + <items id="text">Wiederaufnahme wegen Komplikationen (Fallpauschale) nach KFPV 2003</items> + </term_definitions> + <term_definitions code="08"> + <items id="text">Stationäre Aufnahme zur Organentnahme</items> + </term_definitions> + <term_definitions code="10"> + <items id="text">Stationsäquivalente Behandlung</items> + </term_definitions> + <term_definitions code="E"> + <items id="text">Einweisung durch einen Arzt</items> + </term_definitions> + <term_definitions code="Z"> + <items id="text">Einweisung durch einen Zahnarzt</items> + </term_definitions> + <term_definitions code="N"> + <items id="text">Notfall</items> + </term_definitions> + <term_definitions code="R"> + <items id="text">Aufnahme nach vorausgehender Behandlung in einer Rehabilitationseinrichtung</items> + </term_definitions> + <term_definitions code="V"> + <items id="text">Verlegung mit Behandlungsdauer im verlegenden Krankenhaus länger als 24 Stunden</items> + </term_definitions> + <term_definitions code="A"> + <items id="text">Verlegung mit Behandlungsdauer im verlegenden Krankenhaus bis zu 24 Stunden</items> + </term_definitions> + <term_definitions code="G"> + <items id="text">Geburt</items> + </term_definitions> + <term_definitions code="B"> + <items id="text">Begleitperson oder mitaufgenommene Pflegekraft</items> + </term_definitions> + </children> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>ADMIN_ENTRY</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>data</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ITEM_TREE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0001</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0040</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>§21 KHEntgG</value> + </terminology_id> + <code_list>01</code_list> + <code_list>02</code_list> + <code_list>03</code_list> + <code_list>04</code_list> + <code_list>05</code_list> + <code_list>06</code_list> + <code_list>07</code_list> + <code_list>08</code_list> + <code_list>09</code_list> + <code_list>10</code_list> + <code_list>11</code_list> + <code_list>12</code_list> + <code_list>13</code_list> + <code_list>14</code_list> + <code_list>15</code_list> + <code_list>16</code_list> + <code_list>17</code_list> + <code_list>18</code_list> + <code_list>19</code_list> + <code_list>20</code_list> + <code_list>21</code_list> + <code_list>22</code_list> + <code_list>23</code_list> + <code_list>24</code_list> + <code_list>25</code_list> + <code_list>26</code_list> + <code_list>27</code_list> + <code_list>28</code_list> + <code_list>29</code_list> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0002</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_CODED_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>defining_code</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_CODE_PHRASE"> + <rm_type_name>CODE_PHRASE</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <terminology_id> + <value>local</value> + </terminology_id> + <code_list>at0003</code_list> + <code_list>at0004</code_list> + <code_list>at0005</code_list> + <code_list>at0006</code_list> + <code_list>at0007</code_list> + <code_list>at0008</code_list> + <code_list>at0068</code_list> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0011</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_DATE_TIME</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Datum/Uhrzeit der Entlassung</list> + </item> + </children> + </attributes> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0050</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0066</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0024</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0025</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0028</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0027</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0029</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0034</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0046</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0047</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0049</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </interval> + </cardinality> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Zugewiesener Standort (bei Entlassung)</list> + </item> + </children> + </attributes> + </children> + </attributes> + <archetype_id> + <value>openEHR-EHR-CLUSTER.location.v1</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="description">Standort umfasst sowohl beiläufige Orte (ein Ort, der für die medizinische Versorgung ohne vorherige Benennung oder Genehmigung genutzt wird) als auch spezielle, offiziell benannte Orte. Die Standorte können privat, öffentlich, mobil oder stationär sein.</items> + <items id="text">Standort</items> + </term_definitions> + <term_definitions code="at0024"> + <items id="description">Eine Gruppe von Gebäuden an anderen Orten, wie ein örtlich entfernter Campus, der außerhalb der Einrichtung liegt, aber zur Institution gehört.</items> + <items id="text">Campus</items> + </term_definitions> + <term_definitions code="at0025"> + <items id="description">Ein Gebäude oder Bauwerk. Dazu können Räume, Flure, Flügel, etc. gehören. Es hat möglicherweise keine Wände oder ein Dach, wird aber dennoch als definierter/zugeordneter Raum angesehen.</items> + <items id="text">Gebäudegruppe</items> + </term_definitions> + <term_definitions code="at0027"> + <items id="description">Eine Station ist Teil einer medizinischen Einrichtung, die Räume und andere Arten von Orten enthalten kann.</items> + <items id="text">Station</items> + </term_definitions> + <term_definitions code="at0028"> + <items id="description">Die Ebene in einem mehrstöckigen Gebäude/Bauwerk.</items> + <items id="text">Ebene</items> + </term_definitions> + <term_definitions code="at0029"> + <items id="description">Ein Ort, der als Zimmer deklariert wurde. Bei einigen Standorten kann das Zimmer im Flur liegen zB: Station XYZ Flur 2. Hierbei liegt der Bettstellplatz 2 auf dem Flur der jeweiligen Station.</items> + <items id="text">Zimmer</items> + </term_definitions> + <term_definitions code="at0034"> + <items id="description">Beschreibung des Bettstellplatzes z.B. Bett stand neben dem Fenster oder neben der Tür.</items> + <items id="text">Bettstellplatz</items> + </term_definitions> + <term_definitions code="at0046"> + <items id="description">Das Feld enthält die Freitextbeschreibung des Standorts, z.B. Throax-, Herz- und Gefäßchirurgie.</items> + <items id="text">Zusätzliche Beschreibung</items> + </term_definitions> + <term_definitions code="at0047"> + <items id="description">Für die Erfassung weiterer Angaben über das Bett oder der Adresse. Verwenden Sie dazu den Archetyp CLUSTER.device oder CLUSTER.address.</items> + <items id="text">Details</items> + </term_definitions> + <term_definitions code="at0049"> + <items id="description">Organisation, die für die Bereitstellung und Instandhaltung verantwortlich ist + +Die Organisation, die für die Bereitstellung und den Unterhalt des Standorts verantwortlich ist.</items> + <items id="text">Leitende Organisationseinheit</items> + </term_definitions> + </children> + <children xsi:type="C_ARCHETYPE_ROOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0000</node_id> + <attributes xsi:type="C_MULTIPLE_ATTRIBUTE"> + <rm_attribute_name>items</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0051</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id>at0024</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0052</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0050</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_BOOLEAN</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0046</node_id> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + </children> + </attributes> + </children> + <children xsi:type="ARCHETYPE_SLOT"> + <rm_type_name>CLUSTER</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </occurrences> + <node_id>at0047</node_id> + <includes> + <expression xsi:type="EXPR_BINARY_OPERATOR"> + <type>Boolean</type> + <operator>2007</operator> + <precedence_overridden>false</precedence_overridden> + <left_operand xsi:type="EXPR_LEAF"> + <type>String</type> + <item xsi:type="xsd:string">archetype_id/value</item> + <reference_type>attribute</reference_type> + </left_operand> + <right_operand xsi:type="EXPR_LEAF"> + <type>C_STRING</type> + <item xsi:type="C_STRING"> + <pattern>.*</pattern> + </item> + <reference_type>constraint</reference_type> + </right_operand> + </expression> + </includes> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>1</lower> + </interval> + </cardinality> + </attributes> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>name</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>DV_TEXT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <attributes xsi:type="C_SINGLE_ATTRIBUTE"> + <rm_attribute_name>value</rm_attribute_name> + <existence> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </existence> + <children xsi:type="C_PRIMITIVE_OBJECT"> + <rm_type_name>STRING</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>1</lower> + <upper>1</upper> + </occurrences> + <node_id/> + <item xsi:type="C_STRING"> + <list>Zugewiesene verantwortliche Organisationseinheit (bei Entlassung)</list> + </item> + </children> + </attributes> + </children> + </attributes> + <archetype_id> + <value>openEHR-EHR-CLUSTER.organization.v0</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="description">Eine fachliche Einheit, Organisation, Abteilung, Zusammenschluss, Gruppierung mit einem gemeinsamen Ziel.</items> + <items id="fhir">Organization</items> + <items id="text">Organisationseinheit</items> + </term_definitions> + <term_definitions code="at0024"> + <items id="description">Eindeutiger Identifikator der Organisationseinheit.</items> + <items id="fhir">Organization.identifier</items> + <items id="text">Organisationsschlüssel</items> + </term_definitions> + <term_definitions code="at0046"> + <items id="description">Zusätzliche Informationen</items> + <items id="text">Zusätzliche Beschreibung</items> + </term_definitions> + <term_definitions code="at0047"> + <items id="description">Für die Erfassung weiterer Angaben über die Organisationseinheit, zum Beispiel Adresse oder Telekommunikationsdetails.</items> + <items id="fhir">Organization.address</items> + <items id="text">Details</items> + </term_definitions> + <term_definitions code="at0050"> + <items id="description">Gibt an, ob die Organisationseinheit noch aktiv ist.</items> + <items id="fhir">Organization.active</items> + <items id="text">Aktiv/Inaktiv</items> + </term_definitions> + <term_definitions code="at0051"> + <items id="comment">Zum Beispiel: Fachabteilung im Krankenhaus, Versicherungsunternehmen, Sponsor</items> + <items id="description">Art der Organisationseinheit.</items> + <items id="fhir">Organization.type</items> + <items id="text">Typ</items> + </term_definitions> + <term_definitions code="at0052"> + <items id="description">Bezeichnung für die Organisationseinheit</items> + <items id="fhir">Organization.name</items> + <items id="text">Name</items> + </term_definitions> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </interval> + </cardinality> + </attributes> + </children> + </attributes> + <archetype_id> + <value>openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0</value> + </archetype_id> + <term_definitions code="at0000"> + <items id="description">Wird nur für entlassene Patienten verwendet.</items> + <items id="text">Entlassungsdaten</items> + </term_definitions> + <term_definitions code="at0001"> + <items id="description">@ internal @</items> + <items id="text">Tree</items> + </term_definitions> + <term_definitions code="at0002"> + <items id="description">Klinischer Zustand des Patienten.</items> + <items id="text">Klinischer Zustand des Patienten</items> + </term_definitions> + <term_definitions code="at0003"> + <items id="description">Der Patient ist geheilt.</items> + <items id="text">Geheilt</items> + </term_definitions> + <term_definitions code="at0004"> + <items id="description">Der Gesundheitszustand des Patienten hat sich verbessert.</items> + <items id="text">Verbessert</items> + </term_definitions> + <term_definitions code="at0005"> + <items id="description">Der Gesundheitszustand des Patienten ist identisch, wie bei der Aufnahme.</items> + <items id="text">Identischer Zustand</items> + </term_definitions> + <term_definitions code="at0006"> + <items id="description">Der Gesundheitszustand des Patienten ist schlechter, als bei der Aufnahme.</items> + <items id="text">Schlechter</items> + </term_definitions> + <term_definitions code="at0007"> + <items id="description">Der Patient verstarb während des Krankenhausaufenthaltes.</items> + <items id="text">Verstorben</items> + </term_definitions> + <term_definitions code="at0008"> + <items id="description">Unbestimmt.</items> + <items id="text">Unbestimmt</items> + </term_definitions> + <term_definitions code="at0011"> + <items id="description">Datum/Uhrzeit, an dem der Patient entlassen wurde.</items> + <items id="text">Entlassungsdatum/-uhrzeit</items> + </term_definitions> + <term_definitions code="at0033"> + <items id="description">Informationen zum Entlassungsarzt.</items> + <items id="text">Entlassungsarzt</items> + </term_definitions> + <term_definitions code="at0034"> + <items id="description">*</items> + <items id="text">ID</items> + </term_definitions> + <term_definitions code="at0035"> + <items id="description">*</items> + <items id="text">Familienname</items> + </term_definitions> + <term_definitions code="at0036"> + <items id="description">*</items> + <items id="text">Nachname</items> + </term_definitions> + <term_definitions code="at0038"> + <items id="description">Dauer des Krankenhausaufenthaltes.</items> + <items id="text">Aufenthaltsdauer</items> + </term_definitions> + <term_definitions code="at0040"> + <items id="description">Grund der Entlassung</items> + <items id="text">Art der Entlassung</items> + </term_definitions> + <term_definitions code="at0050"> + <items id="description">Kommentare</items> + <items id="text">Zusätzliche Informationen</items> + </term_definitions> + <term_definitions code="at0051"> + <items id="description">Entlassungsanweisungen für Patienten.</items> + <items id="text">Entlassungsanweisungen</items> + </term_definitions> + <term_definitions code="at0058"> + <items id="description">Der behandelnde Arzt, der dem Patienten eine Dienstleistung erbracht hat.</items> + <items id="text">Behandelnder Arzt</items> + </term_definitions> + <term_definitions code="at0059"> + <items id="description">*</items> + <items id="text">ID</items> + </term_definitions> + <term_definitions code="at0060"> + <items id="description">*</items> + <items id="text">Familienname</items> + </term_definitions> + <term_definitions code="at0061"> + <items id="description">*</items> + <items id="text">Nachname</items> + </term_definitions> + <term_definitions code="at0062"> + <items id="description">Arzt, der den Patienten an den behandelnden Arzt überwiesen hat.</items> + <items id="text">Überweisender Arzt</items> + </term_definitions> + <term_definitions code="at0063"> + <items id="description">*</items> + <items id="text">Nachname</items> + </term_definitions> + <term_definitions code="at0064"> + <items id="description">*</items> + <items id="text">Familienname</items> + </term_definitions> + <term_definitions code="at0065"> + <items id="description">*</items> + <items id="text">ID</items> + </term_definitions> + <term_definitions code="at0066"> + <items id="description">*</items> + <items id="text">Letzter Patientenstandort</items> + </term_definitions> + <term_definitions code="at0067"> + <items id="description">Für die lokale Verwendung enthält dieses Feld den Typ der Organisationseinheit oder der klinischen Einheit.</items> + <items id="text">Zugewiesener Patientenstandort</items> + </term_definitions> + <term_definitions code="at0068"> + <items id="description">Sonstige</items> + <items id="text">Sonstige</items> + </term_definitions> + <term_definitions code="01"> + <items id="text">Behandlung regulär beendet</items> + </term_definitions> + <term_definitions code="02"> + <items id="text">Behandlung regulär beendet, nachstationäre Behandlung vorgesehen</items> + </term_definitions> + <term_definitions code="03"> + <items id="text">Behandlung aus sonstigen Gründen beendet</items> + </term_definitions> + <term_definitions code="04"> + <items id="text">Behandlung gegen ärztlichen Rat beendet</items> + </term_definitions> + <term_definitions code="05"> + <items id="text">Zuständigkeitswechsel des Kostenträgers</items> + </term_definitions> + <term_definitions code="06"> + <items id="text">Verlegung in ein anderes Krankenhaus</items> + </term_definitions> + <term_definitions code="07"> + <items id="text">Tod</items> + </term_definitions> + <term_definitions code="08"> + <items id="text">Verlegung in ein anderes Krankenhaus im Rahmen einer Zusammenarbeit (§ 14 Abs. 5 Satz 2 BPflV in der am 31.12.2003 geltenden Fassung)</items> + </term_definitions> + <term_definitions code="09"> + <items id="text">Entlassung in eine Rehabilitationseinrichtung</items> + </term_definitions> + <term_definitions code="10"> + <items id="text">Entlassung in eine Pflegeeinrichtung</items> + </term_definitions> + <term_definitions code="11"> + <items id="text">Entlassung in ein Hospiz</items> + </term_definitions> + <term_definitions code="12"> + <items id="text">interne Verlegung</items> + </term_definitions> + <term_definitions code="13"> + <items id="text">externe Verlegung zur psychiatrischen Behandlung</items> + </term_definitions> + <term_definitions code="14"> + <items id="text">Behandlung aus sonstigen Gründen beendet, nachstationäre Behandlung vorgesehen</items> + </term_definitions> + <term_definitions code="15"> + <items id="text">Behandlung gegen ärztlichen Rat beendet, nachstationäre Behandlung vorgesehen</items> + </term_definitions> + <term_definitions code="16"> + <items id="text">externe Verlegung mit Rückverlegung oder Wechsel zwischen den Entgeltbereichen der DRG-Fallpau- schalen, nach der BPflV oder für besondere Einrichtungen nach § 17b Abs. 1 Satz 15 KHG mit Rückverlegung</items> + </term_definitions> + <term_definitions code="17"> + <items id="text">interne Verlegung mit Wechsel zwischen den Entgeltbereichen der DRG-Fallpauschalen, nach der BPflV oder für besondere Einrichtungen nach § 17b Abs. 1 Satz 15 KHG</items> + </term_definitions> + <term_definitions code="18"> + <items id="text">Rückverlegung</items> + </term_definitions> + <term_definitions code="19"> + <items id="text">Entlassung vor Wiederaufnahme mit Neueinstufung</items> + </term_definitions> + <term_definitions code="20"> + <items id="text">Entlassung vor Wiederaufnahme mit Neueinstufung wegen Komplikation</items> + </term_definitions> + <term_definitions code="21"> + <items id="text">Entlassung oder Verlegung mit nachfolgender Wiederaufnahme</items> + </term_definitions> + <term_definitions code="22"> + <items id="text">Fallabschluss (interne Verlegung) bei Wechsel zwischen voll-, teilstationärer und stationsäquivalenter Behandlung</items> + </term_definitions> + <term_definitions code="23"> + <items id="text">Beginn eines externen Aufenthalts mit Abwesenheit über Mitternacht (BPflV-Bereich – für verlegende Fachabteilung)</items> + </term_definitions> + <term_definitions code="24"> + <items id="text">Beendigung eines externen Aufenthalts mit Abwesenheit über Mitternacht (BPflV-Bereich – für Pseudo-Fachabteilung 0003)</items> + </term_definitions> + <term_definitions code="25"> + <items id="text">Entlassung zum Jahresende bei Aufnahme im Vorjahr (für Zwecke der Abrechnung - § 4 PEPPV)</items> + </term_definitions> + <term_definitions code="26"> + <items id="text">Beginn eines Zeitraumes ohne direkten Patientenkontakt (stationsäquivalente Behandlung)</items> + </term_definitions> + <term_definitions code="27"> + <items id="text">Beendigung eines Zeitraumes ohne direkten Patientenkontakt (stationsäquivalente Behandlung – für Pseudo-Fachabteilung 0004)</items> + </term_definitions> + <term_definitions code="28"> + <items id="text">Behandlung regulär beendet, beatmet entlassen</items> + </term_definitions> + <term_definitions code="29"> + <items id="text">Behandlung regulär beendet, beatmet verlegt</items> + </term_definitions> + </children> + <cardinality> + <is_ordered>false</is_ordered> + <is_unique>false</is_unique> + <interval> + <lower_included>true</lower_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>true</upper_unbounded> + <lower>0</lower> + </interval> + </cardinality> + </attributes> + <archetype_id> + <value>openEHR-EHR-COMPOSITION.fall.v1</value> + </archetype_id> + <template_id> + <value>Stationärer Versorgungsfall</value> + </template_id> + <term_definitions code="at0000"> + <items id="description">Strukturierte Sammlung von Informationen zu einem Sachverhalt oder Problem, der bzw. das bearbeitet werden muss. Die Bearbeitungsschritte eines Falles werden durch Aktivitäten und Bearbeiter definiert, die dem Fall zugeordnet werden.</items> + <items id="text">Fall</items> + </term_definitions> + <term_definitions code="at0001"> + <items id="description">@ internal @</items> + <items id="text">Baum</items> + </term_definitions> + <term_definitions code="at0002"> + <items id="description">Ergänzende Angaben zum Fall</items> + <items id="text">Erweiterung</items> + </term_definitions> + <term_definitions code="at0003"> + <items id="description">Eindeutige Identifikation des Falls, z.B. Fallnummer.</items> + <items id="text">Fall-ID</items> + </term_definitions> + <term_definitions code="at0004"> + <items id="description">Nähere Beschreibung des Falls als Fallklasse, z.B. ambulanter Besuch, stationärer, prä- oder nachstationärer Aufenthalt.</items> + <items id="text">Fallklasse</items> + </term_definitions> + <term_definitions code="at0005"> + <items id="description">Charaktierisierung des Falls, bspw. als Einrichtungskontakt, Abteilungskontakt, Versorgungsstellenkontakt.</items> + <items id="text">Falltyp</items> + </term_definitions> + <term_definitions code="at0010"> + <items id="comment">Status des Falls</items> + <items id="description">Status des Falls</items> + <items id="fhir">Encounter.status</items> + <items id="text">Fallstatus</items> + </term_definitions> + <term_definitions code="at0011"> + <items id="comment">Ein anderer Fall, von dem dieser Fall ein Teil ist (administrativ oder zeitlich).</items> + <items id="description">Ein anderer Fall, von dem dieser Fall ein Teil ist (administrativ oder zeitlich).</items> + <items id="fhir">Encounter.partOf</items> + <items id="text">Übergeordneter Fall</items> + </term_definitions> + <term_definitions code="at0012"> + <items id="description">*</items> + <items id="text">Verantwortliche Organisationseinheit</items> + </term_definitions> + <term_definitions code="planned"> + <items id="text">Planned</items> + </term_definitions> + <term_definitions code="in-progress"> + <items id="text">In Progress</items> + </term_definitions> + <term_definitions code="onleave"> + <items id="text">On Leave</items> + </term_definitions> + <term_definitions code="finished"> + <items id="text">Finished</items> + </term_definitions> + <term_definitions code="cancelled"> + <items id="text">Cancelled</items> + </term_definitions> + <term_definitions code="entered-in-error"> + <items id="text">Entered in Error</items> + </term_definitions> + <term_definitions code="unknown"> + <items id="text">Unknown</items> + </term_definitions> + </definition> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/context/other_context[at0001]/items[at0010]"> + <items id="fhir">Encounter.status</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/context/other_context[at0001]/items[at0011]"> + <items id="fhir">Encounter.partOf</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]"> + <items id="fhir">Organization</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]/items[at0050]"> + <items id="fhir">Organization.active</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]/items[at0052]"> + <items id="fhir">Organization.name</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]/items[at0047]"> + <items id="fhir">Organization.address</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]/items[at0051]"> + <items id="fhir">Organization.type</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]/items[at0024]"> + <items id="fhir">Organization.identifier</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/content[openEHR-EHR-ADMIN_ENTRY.admission.v0]/data[at0001]/items[at0023]"> + <items id="fhir">Encounter.preAdmissionIdentifier</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/content[openEHR-EHR-ADMIN_ENTRY.admission.v0]/data[at0001]/items[at0041]"> + <items id="fhir">Encounter.serviceProvider</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/content[openEHR-EHR-ADMIN_ENTRY.admission.v0]/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]"> + <items id="fhir">Organization</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/content[openEHR-EHR-ADMIN_ENTRY.admission.v0]/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]/items[at0051]"> + <items id="fhir">Organization.type</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/content[openEHR-EHR-ADMIN_ENTRY.admission.v0]/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]/items[at0050]"> + <items id="fhir">Organization.active</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/content[openEHR-EHR-ADMIN_ENTRY.admission.v0]/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]/items[at0052]"> + <items id="fhir">Organization.name</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/content[openEHR-EHR-ADMIN_ENTRY.admission.v0]/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]/items[at0024]"> + <items id="fhir">Organization.identifier</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/content[openEHR-EHR-ADMIN_ENTRY.admission.v0]/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]/items[at0047]"> + <items id="fhir">Organization.address</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/content[openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0]/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]"> + <items id="fhir">Organization</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/content[openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0]/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]/items[at0051]"> + <items id="fhir">Organization.type</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/content[openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0]/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]/items[at0050]"> + <items id="fhir">Organization.active</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/content[openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0]/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]/items[at0052]"> + <items id="fhir">Organization.name</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/content[openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0]/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]/items[at0024]"> + <items id="fhir">Organization.identifier</items> + </annotations> + <annotations path="[openEHR-EHR-COMPOSITION.fall.v1]/content[openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0]/data[at0001]/items[openEHR-EHR-CLUSTER.organization.v0]/items[at0047]"> + <items id="fhir">Organization.address</items> + </annotations> + <view/> +</template> \ No newline at end of file diff --git a/src/main/resources/profiles/KontaktGesundheitseinrichtung.xml b/src/main/resources/profiles/KontaktGesundheitseinrichtung.xml new file mode 100644 index 000000000..f19e6b473 --- /dev/null +++ b/src/main/resources/profiles/KontaktGesundheitseinrichtung.xml @@ -0,0 +1,8166 @@ +<StructureDefinition xmlns="http://hl7.org/fhir"> + <url value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/StructureDefinition/KontaktGesundheitseinrichtung" /> + <version value="1.0" /> + <name value="KontaktGesundheitseinrichtung" /> + <title value="Medizininformatik-Initative - StructureDefinition - Kontakt mit einer Gesundheitseinrichtung" /> + <status value="active" /> + <fhirVersion value="4.0.1" /> + <mapping> + <identity value="workflow" /> + <uri value="http://hl7.org/fhir/workflow" /> + <name value="Workflow Pattern" /> + </mapping> + <mapping> + <identity value="rim" /> + <uri value="http://hl7.org/v3" /> + <name value="RIM Mapping" /> + </mapping> + <mapping> + <identity value="w5" /> + <uri value="http://hl7.org/fhir/fivews" /> + <name value="FiveWs Pattern Mapping" /> + </mapping> + <mapping> + <identity value="v2" /> + <uri value="http://hl7.org/v2" /> + <name value="HL7 v2 Mapping" /> + </mapping> + <kind value="resource" /> + <abstract value="false" /> + <type value="Encounter" /> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + <derivation value="constraint" /> + <snapshot> + <element id="Encounter"> + <path value="Encounter" /> + <short value="An interaction during which services are provided to the patient" /> + <definition value="An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient." /> + <alias value="Visit" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Encounter" /> + <min value="0" /> + <max value="*" /> + </base> + <constraint> + <key value="dom-2" /> + <severity value="error" /> + <human value="If the resource is contained in another resource, it SHALL NOT contain nested Resources" /> + <expression value="contained.contained.empty()" /> + <xpath value="not(parent::f:contained and f:contained)" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="dom-4" /> + <severity value="error" /> + <human value="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated" /> + <expression value="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()" /> + <xpath value="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="dom-3" /> + <severity value="error" /> + <human value="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 value="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 value="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 value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice"> + <valueBoolean value="true" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation"> + <valueMarkdown value="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." /> + </extension> + <key value="dom-6" /> + <severity value="warning" /> + <human value="A resource should have narrative for robust management" /> + <expression value="text.`div`.exists()" /> + <xpath value="exists(f:text/h:div)" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="dom-5" /> + <severity value="error" /> + <human value="If a resource is contained in another resource, it SHALL NOT have a security label" /> + <expression value="contained.meta.security.empty()" /> + <xpath value="not(exists(f:contained/*/f:meta/f:security))" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="mii-enc-1" /> + <severity value="error" /> + <human value="Falls der Encounter abgeschlossen wurde muss ein Enddatum bekannt sein" /> + <expression value="status = 'finished' implies period.end.exists()" /> + <source value="https://www.medizininformatik-initiative.de/fhir/core/StructureDefinition/Encounter/KontaktGesundheitseinrichtung" /> + </constraint> + <constraint> + <key value="mii-enc-2" /> + <severity value="error" /> + <human value="Falls der Encounter abgeschlossen wurde muss eine Diagnose bekannt sein" /> + <expression value="status = 'finished' implies diagnosis.exists()" /> + <source value="https://www.medizininformatik-initiative.de/fhir/core/StructureDefinition/Encounter/KontaktGesundheitseinrichtung" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="Entity. Role, or Act" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Encounter[@moodCode='EVN']" /> + </mapping> + </element> + <element id="Encounter.id"> + <path value="Encounter.id" /> + <short value="Logical id of this artifact" /> + <definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mustSupport value="true" /> + <isSummary value="true" /> + </element> + <element id="Encounter.meta"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.meta" /> + <short value="Metadata about the resource" /> + <definition value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.meta" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Meta" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.meta.id"> + <path value="Encounter.meta.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.meta.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.meta.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.meta.versionId"> + <path value="Encounter.meta.versionId" /> + <short value="Version specific identifier" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Meta.versionId" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.meta.lastUpdated"> + <path value="Encounter.meta.lastUpdated" /> + <short value="When the resource version last changed" /> + <definition value="When the resource last changed - e.g. when the version changed." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Meta.lastUpdated" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="instant" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.meta.source"> + <path value="Encounter.meta.source" /> + <short value="Identifies where the resource comes from" /> + <definition value="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 value="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. This 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 value="0" /> + <max value="1" /> + <base> + <path value="Meta.source" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.meta.profile"> + <path value="Encounter.meta.profile" /> + <short value="Profiles this resource claims to conform to" /> + <definition value="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 value="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 value="0" /> + <max value="*" /> + <base> + <path value="Meta.profile" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="canonical" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/StructureDefinition" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.meta.security"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.meta.security" /> + <short value="Security Labels applied to this resource" /> + <definition value="Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure." /> + <comment value="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 value="0" /> + <max value="*" /> + <base> + <path value="Meta.security" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="SecurityLabels" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> + <valueBoolean value="true" /> + </extension> + <strength value="extensible" /> + <description value="Security Labels from the Healthcare Privacy and Security Classification System." /> + <valueSet value="http://hl7.org/fhir/ValueSet/security-labels" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + </element> + <element id="Encounter.meta.tag"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.meta.tag" /> + <short value="Tags applied to this resource" /> + <definition value="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 value="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 value="0" /> + <max value="*" /> + <base> + <path value="Meta.tag" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="Tags" /> + </extension> + <strength value="example" /> + <description value="Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones"." /> + <valueSet value="http://hl7.org/fhir/ValueSet/common-tags" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + </element> + <element id="Encounter.implicitRules"> + <path value="Encounter.implicitRules" /> + <short value="A set of rules under which this content was created" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.implicitRules" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="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 value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.language"> + <path value="Encounter.language" /> + <short value="Language of the resource content" /> + <definition value="The base language in which the resource is written." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.language" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"> + <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="Language" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> + <valueBoolean value="true" /> + </extension> + <strength value="preferred" /> + <description value="A human language." /> + <valueSet value="http://hl7.org/fhir/ValueSet/languages" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.text" /> + <short value="Text summary of the resource, for human interpretation" /> + <definition value="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 value="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 value="narrative" /> + <alias value="html" /> + <alias value="xhtml" /> + <alias value="display" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="DomainResource.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Narrative" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Act.text?" /> + </mapping> + </element> + <element id="Encounter.contained"> + <path value="Encounter.contained" /> + <short value="Contained, inline Resources" /> + <definition value="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 value="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 value="inline resources" /> + <alias value="anonymous resources" /> + <alias value="contained resources" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.contained" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Resource" /> + </type> + <mapping> + <identity value="rim" /> + <map value="Entity. Role, or Act" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.modifierExtension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Extensions that cannot be ignored" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.identifier"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.identifier" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Identifier(s) by which this encounter is known" /> + <definition value="Identifier(s) by which this encounter is known." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Encounter.identifier" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Identifier" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="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]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="Identifier" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.identifier" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.identifier" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1-19" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".id" /> + </mapping> + </element> + <element id="Encounter.identifier:aufnahmenummer"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.identifier" /> + <sliceName value="aufnahmenummer" /> + <short value="Identifier(s) by which this encounter is known" /> + <definition value="Identifier(s) by which this encounter is known." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Encounter.identifier" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Identifier" /> + </type> + <patternIdentifier> + <type> + <coding> + <system value="http://terminology.hl7.org/CodeSystem/v2-0203" /> + <code value="VN" /> + </coding> + </type> + </patternIdentifier> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="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]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="Identifier" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.identifier" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.identifier" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1-19" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".id" /> + </mapping> + </element> + <element id="Encounter.identifier:aufnahmenummer.id"> + <path value="Encounter.identifier.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.identifier:aufnahmenummer.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.identifier.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.identifier:aufnahmenummer.use"> + <path value="Encounter.identifier.use" /> + <short value="usual | official | temp | secondary | old (If known)" /> + <definition value="The purpose of this identifier." /> + <comment value="Applications can assume that an identifier is permanent unless it explicitly says that it is temporary." /> + <requirements value="Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Identifier.use" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="This is labeled as "Is Modifier" because applications should not mistake a temporary id for a permanent one." /> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="IdentifierUse" /> + </extension> + <strength value="required" /> + <description value="Identifies the purpose for this identifier, if known ." /> + <valueSet value="http://hl7.org/fhir/ValueSet/identifier-use|4.0.1" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Role.code or implied by context" /> + </mapping> + </element> + <element id="Encounter.identifier:aufnahmenummer.type"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.identifier.type" /> + <short value="Description of identifier" /> + <definition value="A coded type for the identifier that can be used to determine which identifier to use for a specific purpose." /> + <comment value="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 value="Allows users to make use of identifiers when the identifier system is not known." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Identifier.type" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="IdentifierType" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> + <valueBoolean value="true" /> + </extension> + <strength value="extensible" /> + <description value="A coded type for an identifier that can be used to determine which identifier to use for a specific purpose." /> + <valueSet value="http://hl7.org/fhir/ValueSet/identifier-type" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX.5" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Role.code or implied by context" /> + </mapping> + </element> + <element id="Encounter.identifier:aufnahmenummer.type.id"> + <path value="Encounter.identifier.type.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.identifier:aufnahmenummer.type.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.identifier.type.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.identifier:aufnahmenummer.type.coding"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.identifier.type.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Encounter.identifier:aufnahmenummer.type.coding:vn-type"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.identifier.type.coding" /> + <sliceName value="vn-type" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="http://terminology.hl7.org/CodeSystem/v2-0203" /> + <code value="VN" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Encounter.identifier:aufnahmenummer.type.coding:vn-type.id"> + <path value="Encounter.identifier.type.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.identifier:aufnahmenummer.type.coding:vn-type.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.identifier.type.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.identifier:aufnahmenummer.type.coding:vn-type.system"> + <path value="Encounter.identifier.type.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Encounter.identifier:aufnahmenummer.type.coding:vn-type.version"> + <path value="Encounter.identifier.type.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Encounter.identifier:aufnahmenummer.type.coding:vn-type.code"> + <path value="Encounter.identifier.type.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Encounter.identifier:aufnahmenummer.type.coding:vn-type.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Encounter.identifier.type.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Encounter.identifier:aufnahmenummer.type.coding:vn-type.userSelected"> + <path value="Encounter.identifier.type.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Encounter.identifier:aufnahmenummer.type.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Encounter.identifier.type.text" /> + <short value="Plain text representation of the concept" /> + <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="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 value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element id="Encounter.identifier:aufnahmenummer.system"> + <path value="Encounter.identifier.system" /> + <short value="The namespace for the identifier value" /> + <definition value="Establishes the namespace for the value - that is, a URL that describes a set values that are unique." /> + <comment value="Identifier.system is always case sensitive." /> + <requirements value="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 value="1" /> + <max value="1" /> + <base> + <path value="Identifier.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <example> + <label value="General" /> + <valueUri value="http://www.acme.com/identifiers/patient" /> + </example> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX.4 / EI-2-4" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="II.root or Role.id.root" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./IdentifierType" /> + </mapping> + </element> + <element id="Encounter.identifier:aufnahmenummer.value"> + <path value="Encounter.identifier.value" /> + <short value="The value that is unique" /> + <definition value="The portion of the identifier typically relevant to the user and which is unique within the context of the system." /> + <comment value="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 value="1" /> + <max value="1" /> + <base> + <path value="Identifier.value" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <example> + <label value="General" /> + <valueString value="123456" /> + </example> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX.1 / EI.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./Value" /> + </mapping> + </element> + <element id="Encounter.identifier:aufnahmenummer.period"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.identifier.period" /> + <short value="Time period when id is/was valid for use" /> + <definition value="Time period during which identifier is/was valid for use." /> + <comment value="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"). Period is not used for a duration (a measure of elapsed time). See [Duration](datatypes.html#Duration)." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Identifier.period" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="per-1" /> + <severity value="error" /> + <human value="If present, start SHALL have a lower value than end" /> + <expression value="start.hasValue().not() or end.hasValue().not() or (start <= end)" /> + <xpath value="not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX.7 + CX.8" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Role.effectiveTime or implied by context" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./StartDate and ./EndDate" /> + </mapping> + </element> + <element id="Encounter.identifier:aufnahmenummer.assigner"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.identifier.assigner" /> + <short value="Organization that issued id (may be just text)" /> + <definition value="Organization that issued/manages the identifier." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Identifier.assigner" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX.4 / (CX.4,CX.9,CX.10)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="II.assigningAuthorityName but note that this is an improper use by the definition of the field. Also Role.scoper" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./IdentifierIssuingAuthority" /> + </mapping> + </element> + <element id="Encounter.status"> + <path value="Encounter.status" /> + <short value="planned | | in-progress | onleave | finished | cancelled +" /> + <definition value="planned | | in-progress | onleave | finished | cancelled +" /> + <comment value="Note that internal business rules will determine the appropriate transitions that may occur between statuses (and also classes)." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Encounter.status" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isModifier value="true" /> + <isModifierReason value="This element is labeled 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 value="true" /> + <binding> + <strength value="required" /> + <description value="Current state of the encounter." /> + <valueSet value="https://www.medizininformatik-initiative.de/fhir/core/ValueSet/RestrictedEncounterStatus" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.status" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.status" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="No clear equivalent in HL7 v2; active/finished could be inferred from PV1-44, PV1-45, PV2-24; inactive could be inferred from PV2-16" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".statusCode" /> + </mapping> + </element> + <element id="Encounter.statusHistory"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name"> + <valueString value="StatusHistory" /> + </extension> + <path value="Encounter.statusHistory" /> + <short value="List of past encounter statuses" /> + <definition value="The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them." /> + <comment value="The current status is always found in the current version of the resource, not the status history." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Encounter.statusHistory" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.statusHistory.id"> + <path value="Encounter.statusHistory.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.statusHistory.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.statusHistory.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.statusHistory.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.statusHistory.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.statusHistory.status"> + <path value="Encounter.statusHistory.status" /> + <short value="planned | arrived | triaged | in-progress | onleave | finished | cancelled +" /> + <definition value="planned | arrived | triaged | in-progress | onleave | finished | cancelled +." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Encounter.statusHistory.status" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="EncounterStatus" /> + </extension> + <strength value="required" /> + <description value="Current state of the encounter." /> + <valueSet value="http://hl7.org/fhir/ValueSet/encounter-status|4.0.1" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.statusHistory.period"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.statusHistory.period" /> + <short value="The time that the episode was in the specified status" /> + <definition value="The time that the episode was in the specified status." /> + <comment value="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"). Period is not used for a duration (a measure of elapsed time). See [Duration](datatypes.html#Duration)." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Encounter.statusHistory.period" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="per-1" /> + <severity value="error" /> + <human value="If present, start SHALL have a lower value than end" /> + <expression value="start.hasValue().not() or end.hasValue().not() or (start <= end)" /> + <xpath value="not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]" /> + </mapping> + </element> + <element id="Encounter.class"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.class" /> + <short value="Classification of patient encounter" /> + <definition value="Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations." /> + <comment value="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." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Encounter.class" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <strength value="extensible" /> + <description value="Classification of the encounter." /> + <valueSet value="https://www.medizininformatik-initiative.de/fhir/core/ValueSet/EncounterClassDE" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.class" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1-2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".inboundRelationship[typeCode=SUBJ].source[classCode=LIST].code" /> + </mapping> + </element> + <element id="Encounter.classHistory"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name"> + <valueString value="ClassHistory" /> + </extension> + <path value="Encounter.classHistory" /> + <short value="List of past encounter classes" /> + <definition value="The class history permits the tracking of the encounters transitions without needing to go through the resource history. This would be used for a case where an admission starts of as an emergency encounter, then transitions into an inpatient scenario. Doing this and not restarting a new encounter ensures that any lab/diagnostic results can more easily follow the patient and not require re-processing and not get lost or cancelled during a kind of discharge from emergency to inpatient." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Encounter.classHistory" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.classHistory.id"> + <path value="Encounter.classHistory.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.classHistory.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.classHistory.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.classHistory.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.classHistory.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.classHistory.class"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.classHistory.class" /> + <short value="inpatient | outpatient | ambulatory | emergency +" /> + <definition value="inpatient | outpatient | ambulatory | emergency +." /> + <comment value="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." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Encounter.classHistory.class" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="EncounterClass" /> + </extension> + <strength value="extensible" /> + <description value="Classification of the encounter." /> + <valueSet value="http://terminology.hl7.org/ValueSet/v3-ActEncounterCode" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + </element> + <element id="Encounter.classHistory.period"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.classHistory.period" /> + <short value="The time that the episode was in the specified class" /> + <definition value="The time that the episode was in the specified class." /> + <comment value="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"). Period is not used for a duration (a measure of elapsed time). See [Duration](datatypes.html#Duration)." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Encounter.classHistory.period" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="per-1" /> + <severity value="error" /> + <human value="If present, start SHALL have a lower value than end" /> + <expression value="start.hasValue().not() or end.hasValue().not() or (start <= end)" /> + <xpath value="not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]" /> + </mapping> + </element> + <element id="Encounter.type"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.type" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Specific type of encounter" /> + <definition value="Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation)." /> + <comment value="Since there are many ways to further classify encounters, this element is 0..*." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Encounter.type" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="EncounterType" /> + </extension> + <strength value="example" /> + <description value="The type of encounter." /> + <valueSet value="http://hl7.org/fhir/ValueSet/encounter-type" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.code" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.class" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1-4 / PV1-18" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".code" /> + </mapping> + </element> + <element id="Encounter.type:kontaktebene"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.type" /> + <sliceName value="kontaktebene" /> + <short value="Specific type of encounter" /> + <definition value="Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation)." /> + <comment value="Since there are many ways to further classify encounters, this element is 0..*." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Encounter.type" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <patternCodeableConcept> + <coding> + <system value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/ValueSet/Kontaktebene" /> + </coding> + </patternCodeableConcept> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="Kontaktebene" /> + <valueSet value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/ValueSet/Kontaktebene" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.code" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.class" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1-4 / PV1-18" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".code" /> + </mapping> + </element> + <element id="Encounter.serviceType"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.serviceType" /> + <short value="Specific type of service" /> + <definition value="Broad categorization of the service that is to be provided (e.g. cardiology)." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Encounter.serviceType" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="EncounterServiceType" /> + </extension> + <strength value="example" /> + <description value="Broad categorization of the service that is to be provided." /> + <valueSet value="http://hl7.org/fhir/ValueSet/service-type" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.code" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1-10" /> + </mapping> + </element> + <element id="Encounter.serviceType.id"> + <path value="Encounter.serviceType.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.serviceType.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.serviceType.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.serviceType.coding"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.serviceType.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Encounter.serviceType.coding:fachabteilungsschluessel"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.serviceType.coding" /> + <sliceName value="fachabteilungsschluessel" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <strength value="extensible" /> + <valueSet value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Encounter.serviceType.coding:fachabteilungsschluessel.id"> + <path value="Encounter.serviceType.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.serviceType.coding:fachabteilungsschluessel.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.serviceType.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.serviceType.coding:fachabteilungsschluessel.system"> + <path value="Encounter.serviceType.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Encounter.serviceType.coding:fachabteilungsschluessel.version"> + <path value="Encounter.serviceType.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Encounter.serviceType.coding:fachabteilungsschluessel.code"> + <path value="Encounter.serviceType.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Encounter.serviceType.coding:fachabteilungsschluessel.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Encounter.serviceType.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Encounter.serviceType.coding:fachabteilungsschluessel.userSelected"> + <path value="Encounter.serviceType.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Encounter.serviceType.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Encounter.serviceType.text" /> + <short value="Plain text representation of the concept" /> + <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="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 value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element id="Encounter.priority"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.priority" /> + <short value="Indicates the urgency of the encounter" /> + <definition value="Indicates the urgency of the encounter." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Encounter.priority" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="Priority" /> + </extension> + <strength value="example" /> + <description value="Indicates the urgency of the encounter." /> + <valueSet value="http://terminology.hl7.org/ValueSet/v3-ActPriority" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.grade" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV2-25" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".priorityCode" /> + </mapping> + </element> + <element id="Encounter.subject"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.subject" /> + <short value="A reference from one resource to another" /> + <definition value="A reference from one resource to another." /> + <comment value="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 value="patient" /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Encounter.subject" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <profile value="https://www.medizininformatik-initiative.de/fhir/core/StructureDefinition/MII-Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Group" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <constraint> + <key value="mii-reference-1" /> + <severity value="error" /> + <human value="Either reference.reference OR reference.identifier exists" /> + <expression value="($this.reference.exists() or ($this.identifier.value.exists() and $this.identifier.system.exists())) xor $this.extension('http://hl7.org/fhir/StructureDefinition/data-absent-reason').exists()" /> + <source value="https://www.medizininformatik-initiative.de/fhir/core/StructureDefinition/MII-Reference" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.subject" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.subject[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation[typeCode=SBJ]/role[classCode=PAT]" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.subject" /> + </mapping> + </element> + <element id="Encounter.episodeOfCare"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.episodeOfCare" /> + <short value="Episode(s) of care that this encounter should be recorded against" /> + <definition value="Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years)." /> + <comment value="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 value="0" /> + <max value="*" /> + <base> + <path value="Encounter.episodeOfCare" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/EpisodeOfCare" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.context" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.context" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1-54, PV1-53" /> + </mapping> + </element> + <element id="Encounter.basedOn"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.basedOn" /> + <short value="The ServiceRequest that initiated this encounter" /> + <definition value="The request this encounter satisfies (e.g. incoming referral or procedure request)." /> + <comment value="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 value="incomingReferral" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Encounter.basedOn" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/ServiceRequest" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.basedOn" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".reason.ClinicalDocument" /> + </mapping> + </element> + <element id="Encounter.participant"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.participant" /> + <short value="List of participants involved in the encounter" /> + <definition value="The list of people responsible for providing the service." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Encounter.participant" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.performer" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="ROL" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation[typeCode=PFM]" /> + </mapping> + </element> + <element id="Encounter.participant.id"> + <path value="Encounter.participant.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.participant.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.participant.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.participant.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.participant.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.participant.type"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.participant.type" /> + <short value="Role of participant in encounter" /> + <definition value="Role of participant in encounter." /> + <comment value="The participant type indicates how an individual participates in an encounter. It includes non-practitioner participants, and for practitioners this is to describe the action type in the context of this encounter (e.g. Admitting Dr, Attending Dr, Translator, Consulting Dr). This is different to the practitioner roles which are functional roles, derived from terms of employment, education, licensing, etc." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Encounter.participant.type" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ParticipantType" /> + </extension> + <strength value="extensible" /> + <description value="Role of participant in encounter." /> + <valueSet value="http://hl7.org/fhir/ValueSet/encounter-participant-type" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.performer.function" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="ROL-3 (or maybe PRT-4)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".functionCode" /> + </mapping> + </element> + <element id="Encounter.participant.period"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.participant.period" /> + <short value="Period of time during the encounter that the participant participated" /> + <definition value="The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period." /> + <comment value="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"). Period is not used for a duration (a measure of elapsed time). See [Duration](datatypes.html#Duration)." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Encounter.participant.period" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="per-1" /> + <severity value="error" /> + <human value="If present, start SHALL have a lower value than end" /> + <expression value="start.hasValue().not() or end.hasValue().not() or (start <= end)" /> + <xpath value="not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="ROL-5, ROL-6 (or maybe PRT-5)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".time" /> + </mapping> + </element> + <element id="Encounter.participant.individual"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.participant.individual" /> + <short value="Persons involved in the encounter other than the patient" /> + <definition value="Persons involved in the encounter other than the patient." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Encounter.participant.individual" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.performer.actor" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.who" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="ROL-4" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".role" /> + </mapping> + </element> + <element id="Encounter.appointment"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.appointment" /> + <short value="The appointment that scheduled this encounter" /> + <definition value="The appointment that scheduled this encounter." /> + <comment value="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 value="0" /> + <max value="*" /> + <base> + <path value="Encounter.appointment" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Appointment" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.basedOn" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SCH-1 / SCH-2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".outboundRelationship[typeCode=FLFS].target[classCode=ENC, moodCode=APT]" /> + </mapping> + </element> + <element id="Encounter.period"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.period" /> + <short value="The start and end time of the encounter" /> + <definition value="The start and end time of the encounter." /> + <comment value="If not (yet) known, the end of the Period may be omitted." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Encounter.period" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="per-1" /> + <severity value="error" /> + <human value="If present, start SHALL have a lower value than end" /> + <expression value="start.hasValue().not() or end.hasValue().not() or (start <= end)" /> + <xpath value="not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <mustSupport value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.occurrence[x]" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.done[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1-44, PV1-45" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".effectiveTime (low & high)" /> + </mapping> + </element> + <element id="Encounter.period.id"> + <path value="Encounter.period.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.period.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.period.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.period.start"> + <path value="Encounter.period.start" /> + <short value="Starting time with inclusive boundary" /> + <definition value="The start of the period. The boundary is inclusive." /> + <comment value="If the low element is missing, the meaning is that the low boundary is not known." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Period.start" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./low" /> + </mapping> + </element> + <element id="Encounter.period.end"> + <path value="Encounter.period.end" /> + <short value="End time with inclusive boundary, if not ongoing" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Period.end" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <meaningWhenMissing value="If the end of the period is missing, it means that the period is ongoing" /> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./high" /> + </mapping> + </element> + <element id="Encounter.length"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.length" /> + <short value="Quantity of time the encounter lasted (less time absent)" /> + <definition value="Quantity of time the encounter lasted. This excludes the time during leaves of absence." /> + <comment value="May differ from the time the Encounter.period lasted because of leave of absence." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Encounter.length" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Duration" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <constraint> + <key value="drt-1" /> + <severity value="error" /> + <human value="There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM." /> + <expression value="code.exists() implies ((system = %ucum) and value.exists())" /> + <xpath value="(f:code or not(f:value)) and (not(exists(f:system)) or f:system/@value='http://unitsofmeasure.org')" /> + <source value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"> + <valueCanonical value="http://hl7.org/fhir/ValueSet/all-time-units" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="DurationUnits" /> + </extension> + <strength value="extensible" /> + <description value="Appropriate units for Duration." /> + <valueSet value="http://hl7.org/fhir/ValueSet/duration-units" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ> depending on the values" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.occurrence[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="(PV1-45 less PV1-44) iff ( (PV1-44 not empty) and (PV1-45 not empty) ); units in minutes" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".lengthOfStayQuantity" /> + </mapping> + </element> + <element id="Encounter.reasonCode"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.reasonCode" /> + <short value="Coded reason the encounter takes place" /> + <definition value="Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis." /> + <comment value="For systems that need to know which was the primary diagnosis, these will be marked with the standard extension primaryDiagnosis (which is a sequence value rather than a flag, 1 = primary diagnosis)." /> + <alias value="Indication" /> + <alias value="Admission diagnosis" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Encounter.reasonCode" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="EncounterReason" /> + </extension> + <strength value="preferred" /> + <description value="Reason why the encounter takes place." /> + <valueSet value="http://hl7.org/fhir/ValueSet/encounter-reason" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.reasonCode" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.why[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="EVN-4 / PV2-3 (note: PV2-3 is nominally constrained to inpatient admissions; HL7 v2 makes no vocabulary suggestions for PV2-3; would not expect PV2 segment or PV2-3 to be in use in all implementations )" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".reasonCode" /> + </mapping> + </element> + <element id="Encounter.reasonCode.id"> + <path value="Encounter.reasonCode.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.reasonCode.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.reasonCode.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.reasonCode.coding"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.reasonCode.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Encounter.reasonCode.coding:aufnahmegrund"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.reasonCode.coding" /> + <sliceName value="aufnahmegrund" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <valueSet value="https://www.medizininformatik-initiative.de/fhir/modul-fall/core/ValueSet/Aufnahmegrund" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Encounter.reasonCode.coding:aufnahmegrund.id"> + <path value="Encounter.reasonCode.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.reasonCode.coding:aufnahmegrund.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.reasonCode.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.reasonCode.coding:aufnahmegrund.system"> + <path value="Encounter.reasonCode.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Encounter.reasonCode.coding:aufnahmegrund.version"> + <path value="Encounter.reasonCode.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Encounter.reasonCode.coding:aufnahmegrund.code"> + <path value="Encounter.reasonCode.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Encounter.reasonCode.coding:aufnahmegrund.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Encounter.reasonCode.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Encounter.reasonCode.coding:aufnahmegrund.userSelected"> + <path value="Encounter.reasonCode.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Encounter.reasonCode.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Encounter.reasonCode.text" /> + <short value="Plain text representation of the concept" /> + <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="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 value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element id="Encounter.reasonReference"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.reasonReference" /> + <short value="Reason the encounter takes place (reference)" /> + <definition value="Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis." /> + <comment value="For systems that need to know which was the primary diagnosis, these will be marked with the standard extension primaryDiagnosis (which is a sequence value rather than a flag, 1 = primary diagnosis)." /> + <alias value="Indication" /> + <alias value="Admission diagnosis" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Encounter.reasonReference" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Condition" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Procedure" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.reasonCode" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.why[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="EVN-4 / PV2-3 (note: PV2-3 is nominally constrained to inpatient admissions; HL7 v2 makes no vocabulary suggestions for PV2-3; would not expect PV2 segment or PV2-3 to be in use in all implementations )" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".reasonCode" /> + </mapping> + </element> + <element id="Encounter.diagnosis"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name"> + <valueString value="Diagnosis" /> + </extension> + <path value="Encounter.diagnosis" /> + <short value="The list of diagnosis relevant to this encounter" /> + <definition value="The list of diagnosis relevant to this encounter." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Encounter.diagnosis" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".outboundRelationship[typeCode=RSON]" /> + </mapping> + </element> + <element id="Encounter.diagnosis.id"> + <path value="Encounter.diagnosis.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.diagnosis.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.diagnosis.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.diagnosis.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.diagnosis.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.diagnosis.condition"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.diagnosis.condition" /> + <short value="A reference from one resource to another" /> + <definition value="A reference from one resource to another." /> + <comment value="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 value="Admission diagnosis" /> + <alias value="discharge diagnosis" /> + <alias value="indication" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Encounter.diagnosis.condition" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <profile value="https://www.medizininformatik-initiative.de/fhir/core/StructureDefinition/MII-Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Condition" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Procedure" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <constraint> + <key value="mii-reference-1" /> + <severity value="error" /> + <human value="Either reference.reference OR reference.identifier exists" /> + <expression value="($this.reference.exists() or ($this.identifier.value.exists() and $this.identifier.system.exists())) xor $this.extension('http://hl7.org/fhir/StructureDefinition/data-absent-reason').exists()" /> + <source value="https://www.medizininformatik-initiative.de/fhir/core/StructureDefinition/MII-Reference" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.reasonReference" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.why[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Resources that would commonly referenced at Encounter.indication would be Condition and/or Procedure. These most closely align with DG1/PRB and PR1 respectively." /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".outboundRelationship[typeCode=RSON].target" /> + </mapping> + </element> + <element id="Encounter.diagnosis.use"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.diagnosis.use" /> + <short value="Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …)" /> + <definition value="Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …)." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Encounter.diagnosis.use" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="DiagnosisRole" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> + <valueBoolean value="true" /> + </extension> + <strength value="preferred" /> + <description value="The type of diagnosis this condition represents." /> + <valueSet value="http://hl7.org/fhir/ValueSet/diagnosis-role" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + </element> + <element id="Encounter.diagnosis.rank"> + <path value="Encounter.diagnosis.rank" /> + <short value="Ranking of the diagnosis (for each role type)" /> + <definition value="Ranking of the diagnosis (for each role type)." /> + <comment value="32 bit number; for values larger than this, use decimal" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Encounter.diagnosis.rank" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="positiveInt" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".outboundRelationship[typeCode=RSON].priority" /> + </mapping> + </element> + <element id="Encounter.account"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.account" /> + <short value="The set of accounts that may be used for billing for this Encounter" /> + <definition value="The set of accounts that may be used for billing for this Encounter." /> + <comment value="The billing system may choose to allocate billable items associated with the Encounter to different referenced Accounts based on internal business rules." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Encounter.account" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Account" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".pertains.A_Account" /> + </mapping> + </element> + <element id="Encounter.hospitalization"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.hospitalization" /> + <short value="Details about the admission to a healthcare service" /> + <definition value="Details about the admission to a healthcare service." /> + <comment value="An Encounter may cover more than just the inpatient stay. Contexts such as outpatients, community clinics, and aged care facilities are also included. The duration recorded in the period of this encounter covers the entire scope of this hospitalization record." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Encounter.hospitalization" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".outboundRelationship[typeCode=COMP].target[classCode=ENC, moodCode=EVN]" /> + </mapping> + </element> + <element id="Encounter.hospitalization.id"> + <path value="Encounter.hospitalization.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.hospitalization.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.hospitalization.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.hospitalization.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.hospitalization.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.hospitalization.preAdmissionIdentifier"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.hospitalization.preAdmissionIdentifier" /> + <short value="Pre-admission identifier" /> + <definition value="Pre-admission identifier." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Encounter.hospitalization.preAdmissionIdentifier" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Identifier" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="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]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="Identifier" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1-5" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".id" /> + </mapping> + </element> + <element id="Encounter.hospitalization.origin"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.hospitalization.origin" /> + <short value="The location/organization from which the patient came before admission" /> + <definition value="The location/organization from which the patient came before admission." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Encounter.hospitalization.origin" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation[typeCode=ORG].role" /> + </mapping> + </element> + <element id="Encounter.hospitalization.admitSource"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.hospitalization.admitSource" /> + <short value="From where patient was admitted (physician referral, transfer)" /> + <definition value="From where patient was admitted (physician referral, transfer)." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Encounter.hospitalization.admitSource" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="AdmitSource" /> + </extension> + <strength value="preferred" /> + <description value="From where the patient was admitted." /> + <valueSet value="http://hl7.org/fhir/ValueSet/encounter-admit-source" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1-14" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".admissionReferralSourceCode" /> + </mapping> + </element> + <element id="Encounter.hospitalization.admitSource.id"> + <path value="Encounter.hospitalization.admitSource.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.hospitalization.admitSource.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.hospitalization.admitSource.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.hospitalization.admitSource.coding"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.hospitalization.admitSource.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Encounter.hospitalization.admitSource.coding:aufnahmeanlass"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.hospitalization.admitSource.coding" /> + <sliceName value="aufnahmeanlass" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <valueSet value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/ValueSet/Aufnahmeanlass" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Encounter.hospitalization.admitSource.coding:aufnahmeanlass.id"> + <path value="Encounter.hospitalization.admitSource.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.hospitalization.admitSource.coding:aufnahmeanlass.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.hospitalization.admitSource.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.hospitalization.admitSource.coding:aufnahmeanlass.system"> + <path value="Encounter.hospitalization.admitSource.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <fixedUri value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass" /> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Encounter.hospitalization.admitSource.coding:aufnahmeanlass.version"> + <path value="Encounter.hospitalization.admitSource.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Encounter.hospitalization.admitSource.coding:aufnahmeanlass.code"> + <path value="Encounter.hospitalization.admitSource.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Encounter.hospitalization.admitSource.coding:aufnahmeanlass.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Encounter.hospitalization.admitSource.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Encounter.hospitalization.admitSource.coding:aufnahmeanlass.userSelected"> + <path value="Encounter.hospitalization.admitSource.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Encounter.hospitalization.admitSource.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Encounter.hospitalization.admitSource.text" /> + <short value="Plain text representation of the concept" /> + <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="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 value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element id="Encounter.hospitalization.reAdmission"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.hospitalization.reAdmission" /> + <short value="The type of hospital re-admission that has occurred (if any). If the value is absent, then this is not identified as a readmission" /> + <definition value="Whether this hospitalization is a readmission and why if known." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Encounter.hospitalization.reAdmission" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ReAdmissionType" /> + </extension> + <strength value="example" /> + <description value="The reason for re-admission of this hospitalization encounter." /> + <valueSet value="http://terminology.hl7.org/ValueSet/v2-0092" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1-13" /> + </mapping> + </element> + <element id="Encounter.hospitalization.dietPreference"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.hospitalization.dietPreference" /> + <short value="Diet preferences reported by the patient" /> + <definition value="Diet preferences reported by the patient." /> + <comment value="For example, a patient may request both a dairy-free and nut-free diet preference (not mutually exclusive)." /> + <requirements value="Used to track patient's diet restrictions and/or preference. For a complete description of the nutrition needs of a patient during their stay, one should use the nutritionOrder resource which links to Encounter." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Encounter.hospitalization.dietPreference" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="PatientDiet" /> + </extension> + <strength value="example" /> + <description value="Medical, cultural or ethical food preferences to help with catering requirements." /> + <valueSet value="http://hl7.org/fhir/ValueSet/encounter-diet" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1-38" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".outboundRelationship[typeCode=COMP].target[classCode=SBADM, moodCode=EVN, code="diet"]" /> + </mapping> + </element> + <element id="Encounter.hospitalization.specialCourtesy"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.hospitalization.specialCourtesy" /> + <short value="Special courtesies (VIP, board member)" /> + <definition value="Special courtesies (VIP, board member)." /> + <comment value="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 value="0" /> + <max value="*" /> + <base> + <path value="Encounter.hospitalization.specialCourtesy" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="Courtesies" /> + </extension> + <strength value="preferred" /> + <description value="Special courtesies." /> + <valueSet value="http://hl7.org/fhir/ValueSet/encounter-special-courtesy" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1-16" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".specialCourtesiesCode" /> + </mapping> + </element> + <element id="Encounter.hospitalization.specialArrangement"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.hospitalization.specialArrangement" /> + <short value="Wheelchair, translator, stretcher, etc." /> + <definition value="Any special requests that have been made for this hospitalization encounter, such as the provision of specific equipment or other things." /> + <comment value="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 value="0" /> + <max value="*" /> + <base> + <path value="Encounter.hospitalization.specialArrangement" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="Arrangements" /> + </extension> + <strength value="preferred" /> + <description value="Special arrangements." /> + <valueSet value="http://hl7.org/fhir/ValueSet/encounter-special-arrangements" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1-15 / OBR-30 / OBR-43" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".specialArrangementCode" /> + </mapping> + </element> + <element id="Encounter.hospitalization.destination"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.hospitalization.destination" /> + <short value="Location/organization to which the patient is discharged" /> + <definition value="Location/organization to which the patient is discharged." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Encounter.hospitalization.destination" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1-37" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation[typeCode=DST]" /> + </mapping> + </element> + <element id="Encounter.hospitalization.dischargeDisposition"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.hospitalization.dischargeDisposition" /> + <short value="Category or kind of location after discharge" /> + <definition value="Category or kind of location after discharge." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Encounter.hospitalization.dischargeDisposition" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="DischargeDisp" /> + </extension> + <strength value="example" /> + <description value="Discharge Disposition." /> + <valueSet value="http://hl7.org/fhir/ValueSet/encounter-discharge-disposition" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1-36" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".dischargeDispositionCode" /> + </mapping> + </element> + <element id="Encounter.hospitalization.dischargeDisposition.id"> + <path value="Encounter.hospitalization.dischargeDisposition.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.hospitalization.dischargeDisposition.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.hospitalization.dischargeDisposition.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.hospitalization.dischargeDisposition.coding"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.hospitalization.dischargeDisposition.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Encounter.hospitalization.dischargeDisposition.coding:entlassungsgrund"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.hospitalization.dischargeDisposition.coding" /> + <sliceName value="entlassungsgrund" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <valueSet value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/ValueSet/Entlassungsgrund" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Encounter.hospitalization.dischargeDisposition.coding:entlassungsgrund.id"> + <path value="Encounter.hospitalization.dischargeDisposition.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.hospitalization.dischargeDisposition.coding:entlassungsgrund.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.hospitalization.dischargeDisposition.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.hospitalization.dischargeDisposition.coding:entlassungsgrund.system"> + <path value="Encounter.hospitalization.dischargeDisposition.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <fixedUri value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund" /> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Encounter.hospitalization.dischargeDisposition.coding:entlassungsgrund.version"> + <path value="Encounter.hospitalization.dischargeDisposition.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Encounter.hospitalization.dischargeDisposition.coding:entlassungsgrund.code"> + <path value="Encounter.hospitalization.dischargeDisposition.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Encounter.hospitalization.dischargeDisposition.coding:entlassungsgrund.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Encounter.hospitalization.dischargeDisposition.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Encounter.hospitalization.dischargeDisposition.coding:entlassungsgrund.userSelected"> + <path value="Encounter.hospitalization.dischargeDisposition.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Encounter.hospitalization.dischargeDisposition.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Encounter.hospitalization.dischargeDisposition.text" /> + <short value="Plain text representation of the concept" /> + <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="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 value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element id="Encounter.location"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.location" /> + <short value="List of locations where the patient has been" /> + <definition value="List of locations where the patient has been during this encounter." /> + <comment value="Virtual encounters can be recorded in the Encounter by specifying a location reference to a location of type "kind" such as "client's home" and an encounter.class = "virtual"." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Encounter.location" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".participation[typeCode=LOC]" /> + </mapping> + </element> + <element id="Encounter.location.id"> + <path value="Encounter.location.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Encounter.location.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.location.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.location.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.location.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Encounter.location.location"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.location.location" /> + <short value="Location the encounter takes place" /> + <definition value="The location where the encounter takes place." /> + <comment value="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 value="1" /> + <max value="1" /> + <base> + <path value="Encounter.location.location" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.location" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.where[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1-3 / PV1-6 / PV1-11 / PV1-42 / PV1-43" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".role" /> + </mapping> + </element> + <element id="Encounter.location.status"> + <path value="Encounter.location.status" /> + <short value="planned | active | reserved | completed" /> + <definition value="The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time." /> + <comment value="When the patient is no longer active at a location, then the period end date is entered, and the status may be changed to completed." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Encounter.location.status" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="EncounterLocationStatus" /> + </extension> + <strength value="required" /> + <description value="The status of the location." /> + <valueSet value="http://hl7.org/fhir/ValueSet/encounter-location-status|4.0.1" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".role.statusCode" /> + </mapping> + </element> + <element id="Encounter.location.physicalType"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.location.physicalType" /> + <short value="The physical type of the location (usually the level in the location hierachy - bed room ward etc.)" /> + <definition value="This will be used to specify the required levels (bed/ward/room/etc.) desired to be recorded to simplify either messaging or query." /> + <comment value="This information is de-normalized from the Location resource to support the easier understanding of the encounter resource and processing in messaging or query. There may be many levels in the hierachy, and this may only pic specific levels that are required for a specific usage scenario." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Encounter.location.physicalType" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="PhysicalType" /> + </extension> + <strength value="example" /> + <description value="Physical form of the location." /> + <valueSet value="http://hl7.org/fhir/ValueSet/location-physical-type" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + </element> + <element id="Encounter.location.period"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.location.period" /> + <short value="Time period during which the patient was present at the location" /> + <definition value="Time period during which the patient was present at the location." /> + <comment value="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"). Period is not used for a duration (a measure of elapsed time). See [Duration](datatypes.html#Duration)." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Encounter.location.period" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="per-1" /> + <severity value="error" /> + <human value="If present, start SHALL have a lower value than end" /> + <expression value="start.hasValue().not() or end.hasValue().not() or (start <= end)" /> + <xpath value="not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".time" /> + </mapping> + </element> + <element id="Encounter.serviceProvider"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.serviceProvider" /> + <short value="The organization (facility) responsible for this encounter" /> + <definition value="The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation. Refer to the example bundle showing an abbreviated set of Encounters for a colonoscopy." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Encounter.serviceProvider" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <mustSupport value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.performer.actor" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PL.6 & PL.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".particiaption[typeCode=PFM].role" /> + </mapping> + </element> + <element id="Encounter.partOf"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Encounter.partOf" /> + <short value="Another Encounter this encounter is part of" /> + <definition value="Another Encounter of which this encounter is a part of (administratively or in time)." /> + <comment value="This is also used for associating a child's encounter back to the mother's encounter. Refer to the Notes section in the Patient resource for further details." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Encounter.partOf" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy"> + <valueBoolean value="true" /> + </extension> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </constraint> + <mustSupport value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.partOf" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".inboundRelationship[typeCode=COMP].source[classCode=COMP, moodCode=EVN]" /> + </mapping> + </element> + </snapshot> + <differential> + <element id="Encounter"> + <path value="Encounter" /> + <constraint> + <key value="mii-enc-1" /> + <severity value="error" /> + <human value="Falls der Encounter abgeschlossen wurde muss ein Enddatum bekannt sein" /> + <expression value="status = 'finished' implies period.end.exists()" /> + <source value="https://www.medizininformatik-initiative.de/fhir/core/StructureDefinition/Encounter/KontaktGesundheitseinrichtung" /> + </constraint> + <constraint> + <key value="mii-enc-2" /> + <severity value="error" /> + <human value="Falls der Encounter abgeschlossen wurde muss eine Diagnose bekannt sein" /> + <expression value="status = 'finished' implies diagnosis.exists()" /> + <source value="https://www.medizininformatik-initiative.de/fhir/core/StructureDefinition/Encounter/KontaktGesundheitseinrichtung" /> + </constraint> + </element> + <element id="Encounter.id"> + <path value="Encounter.id" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.meta"> + <path value="Encounter.meta" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.meta.source"> + <path value="Encounter.meta.source" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.meta.profile"> + <path value="Encounter.meta.profile" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.identifier"> + <path value="Encounter.identifier" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <mustSupport value="true" /> + </element> + <element id="Encounter.identifier:aufnahmenummer"> + <path value="Encounter.identifier" /> + <sliceName value="aufnahmenummer" /> + <max value="1" /> + <patternIdentifier> + <type> + <coding> + <system value="http://terminology.hl7.org/CodeSystem/v2-0203" /> + <code value="VN" /> + </coding> + </type> + </patternIdentifier> + <mustSupport value="true" /> + </element> + <element id="Encounter.identifier:aufnahmenummer.type"> + <path value="Encounter.identifier.type" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.identifier:aufnahmenummer.type.coding"> + <path value="Encounter.identifier.type.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + </element> + <element id="Encounter.identifier:aufnahmenummer.type.coding:vn-type"> + <path value="Encounter.identifier.type.coding" /> + <sliceName value="vn-type" /> + <min value="1" /> + <max value="1" /> + <patternCoding> + <system value="http://terminology.hl7.org/CodeSystem/v2-0203" /> + <code value="VN" /> + </patternCoding> + <mustSupport value="true" /> + </element> + <element id="Encounter.identifier:aufnahmenummer.type.coding:vn-type.system"> + <path value="Encounter.identifier.type.coding.system" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.identifier:aufnahmenummer.type.coding:vn-type.code"> + <path value="Encounter.identifier.type.coding.code" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.identifier:aufnahmenummer.system"> + <path value="Encounter.identifier.system" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.identifier:aufnahmenummer.value"> + <path value="Encounter.identifier.value" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.status"> + <path value="Encounter.status" /> + <short value="planned | | in-progress | onleave | finished | cancelled +" /> + <definition value="planned | | in-progress | onleave | finished | cancelled +" /> + <mustSupport value="true" /> + <binding> + <strength value="required" /> + <valueSet value="https://www.medizininformatik-initiative.de/fhir/core/ValueSet/RestrictedEncounterStatus" /> + </binding> + </element> + <element id="Encounter.class"> + <path value="Encounter.class" /> + <mustSupport value="true" /> + <binding> + <strength value="extensible" /> + <valueSet value="https://www.medizininformatik-initiative.de/fhir/core/ValueSet/EncounterClassDE" /> + </binding> + </element> + <element id="Encounter.type"> + <path value="Encounter.type" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <mustSupport value="true" /> + </element> + <element id="Encounter.type:kontaktebene"> + <path value="Encounter.type" /> + <sliceName value="kontaktebene" /> + <max value="1" /> + <patternCodeableConcept> + <coding> + <system value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/ValueSet/Kontaktebene" /> + </coding> + </patternCodeableConcept> + <mustSupport value="true" /> + <binding> + <strength value="required" /> + <description value="Kontaktebene" /> + <valueSet value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/ValueSet/Kontaktebene" /> + </binding> + </element> + <element id="Encounter.serviceType"> + <path value="Encounter.serviceType" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.serviceType.coding"> + <path value="Encounter.serviceType.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <mustSupport value="true" /> + </element> + <element id="Encounter.serviceType.coding:fachabteilungsschluessel"> + <path value="Encounter.serviceType.coding" /> + <sliceName value="fachabteilungsschluessel" /> + <max value="1" /> + <patternCoding> + <system value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel" /> + </patternCoding> + <mustSupport value="true" /> + <binding> + <strength value="extensible" /> + <valueSet value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel" /> + </binding> + </element> + <element id="Encounter.serviceType.coding:fachabteilungsschluessel.system"> + <path value="Encounter.serviceType.coding.system" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.serviceType.coding:fachabteilungsschluessel.code"> + <path value="Encounter.serviceType.coding.code" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.subject"> + <path value="Encounter.subject" /> + <min value="1" /> + <type> + <code value="Reference" /> + <profile value="https://www.medizininformatik-initiative.de/fhir/core/StructureDefinition/MII-Reference" /> + </type> + <mustSupport value="true" /> + </element> + <element id="Encounter.period"> + <path value="Encounter.period" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.period.start"> + <path value="Encounter.period.start" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.period.end"> + <path value="Encounter.period.end" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.reasonCode.coding"> + <path value="Encounter.reasonCode.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <mustSupport value="true" /> + </element> + <element id="Encounter.reasonCode.coding:aufnahmegrund"> + <path value="Encounter.reasonCode.coding" /> + <sliceName value="aufnahmegrund" /> + <max value="1" /> + <patternCoding> + <system value="https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund" /> + </patternCoding> + <binding> + <strength value="required" /> + <valueSet value="https://www.medizininformatik-initiative.de/fhir/modul-fall/core/ValueSet/Aufnahmegrund" /> + </binding> + </element> + <element id="Encounter.reasonCode.coding:aufnahmegrund.system"> + <path value="Encounter.reasonCode.coding.system" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.reasonCode.coding:aufnahmegrund.code"> + <path value="Encounter.reasonCode.coding.code" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.diagnosis"> + <path value="Encounter.diagnosis" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.diagnosis.condition"> + <path value="Encounter.diagnosis.condition" /> + <type> + <code value="Reference" /> + <profile value="https://www.medizininformatik-initiative.de/fhir/core/StructureDefinition/MII-Reference" /> + </type> + <mustSupport value="true" /> + </element> + <element id="Encounter.diagnosis.use"> + <path value="Encounter.diagnosis.use" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.diagnosis.rank"> + <path value="Encounter.diagnosis.rank" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.hospitalization"> + <path value="Encounter.hospitalization" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.hospitalization.admitSource"> + <path value="Encounter.hospitalization.admitSource" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.hospitalization.admitSource.coding"> + <path value="Encounter.hospitalization.admitSource.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <min value="1" /> + </element> + <element id="Encounter.hospitalization.admitSource.coding:aufnahmeanlass"> + <path value="Encounter.hospitalization.admitSource.coding" /> + <sliceName value="aufnahmeanlass" /> + <min value="1" /> + <max value="1" /> + <patternCoding> + <system value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass" /> + </patternCoding> + <binding> + <strength value="required" /> + <valueSet value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/ValueSet/Aufnahmeanlass" /> + </binding> + </element> + <element id="Encounter.hospitalization.admitSource.coding:aufnahmeanlass.system"> + <path value="Encounter.hospitalization.admitSource.coding.system" /> + <min value="1" /> + <fixedUri value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.hospitalization.admitSource.coding:aufnahmeanlass.code"> + <path value="Encounter.hospitalization.admitSource.coding.code" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.hospitalization.dischargeDisposition"> + <path value="Encounter.hospitalization.dischargeDisposition" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.hospitalization.dischargeDisposition.coding"> + <path value="Encounter.hospitalization.dischargeDisposition.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.hospitalization.dischargeDisposition.coding:entlassungsgrund"> + <path value="Encounter.hospitalization.dischargeDisposition.coding" /> + <sliceName value="entlassungsgrund" /> + <min value="1" /> + <max value="1" /> + <patternCoding> + <system value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund" /> + </patternCoding> + <mustSupport value="true" /> + <binding> + <strength value="required" /> + <valueSet value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/ValueSet/Entlassungsgrund" /> + </binding> + </element> + <element id="Encounter.hospitalization.dischargeDisposition.coding:entlassungsgrund.system"> + <path value="Encounter.hospitalization.dischargeDisposition.coding.system" /> + <min value="1" /> + <fixedUri value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.hospitalization.dischargeDisposition.coding:entlassungsgrund.code"> + <path value="Encounter.hospitalization.dischargeDisposition.coding.code" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.location"> + <path value="Encounter.location" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.serviceProvider"> + <path value="Encounter.serviceProvider" /> + <mustSupport value="true" /> + </element> + <element id="Encounter.partOf"> + <path value="Encounter.partOf" /> + <mustSupport value="true" /> + </element> + </differential> +</StructureDefinition> \ No newline at end of file From e4bfb00f4498df90072e31292cad723eb12fb115 Mon Sep 17 00:00:00 2001 From: zhu13 <yufei.zhu@med.uni-goettingen.de> Date: Mon, 17 May 2021 16:21:53 +0200 Subject: [PATCH 062/141] rebase & add test data in postman collection --- .../fhir-bridge.postman_collection.json | 65 ++++++++++++++++++- 1 file changed, 63 insertions(+), 2 deletions(-) diff --git a/config/postman/fhir-bridge.postman_collection.json b/config/postman/fhir-bridge.postman_collection.json index 97ddc7911..400c16ee1 100644 --- a/config/postman/fhir-bridge.postman_collection.json +++ b/config/postman/fhir-bridge.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "d9f6a4ea-db6e-4816-986d-79b7d1f45886", + "_postman_id": "4a3b60bc-e061-4b50-80a7-67bca2a95dcb", "name": "fhir-bridge", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, @@ -2784,6 +2784,67 @@ "response": [] } ] + }, + { + "name": "Encounter", + "item": [ + { + "name": "Create Stat. Versorgunsfall", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Encounter\",\r\n \"id\": \"5844e89b-c8f3-4e26-bc0f-502e00293874\",\r\n \"status\": \"finished\",\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"VN\"\r\n }\r\n ]\r\n },\r\n \"system\": \"http://medizininformatik-initiative.de/fhir/NamingSystem/Aufnahmenummer/MusterKrankenhaus\",\r\n \"value\": \"F_0000002\",\r\n \"period\": {\r\n \"start\": \"2021-02-13T03:04:00+01:00\",\r\n \"end\": \"2021-03-01T20:42:00+01:00\"\r\n }\r\n }\r\n ],\r\n \"class\": {\r\n \"code\": \"IMP\",\r\n \"display\": \"stationär\",\r\n \"system\": \"http://hl7.org/fhir/v3/ActCode/cs.html\"\r\n },\r\n \"serviceType\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel\",\r\n \"code\": \"3700\",\r\n \"userSelected\": false\r\n }\r\n ]\r\n },\r\n \"serviceProvider\": {\r\n \"identifier\": {\r\n \"system\": \"http://medizininformatik-initiative.de/fhir/NamingSystem/Einrichtungsidentifikator/MusterKrankenhaus\",\r\n \"value\": \"260123451_MusterKrankenhaus\"\r\n }\r\n },\r\n \"diagnosis\": [\r\n {\r\n \"condition\": {\r\n \"reference\": \"Condition/e6b6895c-549b-47c5-a842-41100761385d\"\r\n }\r\n }\r\n ],\r\n \"hospitalization\": {\r\n \"admitSource\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass\",\r\n \"code\": \"N\"\r\n }\r\n ]\r\n },\r\n \"dischargeDisposition\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund\",\r\n \"code\": \"12\"\r\n }\r\n ]\r\n }\r\n },\r\n \"reasonCode\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund\",\r\n \"code\": \"07\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"period\": {\r\n \"start\": \"2021-02-13T03:04:00+01:00\",\r\n \"end\": \"2021-03-01T20:42:00+01:00\"\r\n }\r\n}" + }, + "url": { + "raw": "{{baseUrl}}/fhir/Encounter", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Encounter" + ] + } + }, + "response": [] + }, + { + "name": "Create Patienten Aufenthalt", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Encounter\",\r\n \"id\": \"28436186-b5b3-4881-b000-8a89abf659b7\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/StructureDefinition/KontaktGesundheitseinrichtung\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"VN\"\r\n }\r\n ]\r\n },\r\n \"system\": \"http://medizininformatik-initiative.de/fhir/NamingSystem/Aufnahmenummer/MusterKrankenhaus\",\r\n \"value\": \"F_0000001\",\r\n \"period\": {\r\n \"start\": \"2021-02-13T03:04:00+01:00\",\r\n \"end\": \"2021-03-01T20:42:00+01:00\"\r\n }\r\n }\r\n ],\r\n \"status\": \"finished\",\r\n \"class\": {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/CodeSystem/EncounterClassAdditionsDE\",\r\n \"code\": \"operation\",\r\n \"display\": \"Operation\"\r\n },\r\n \"type\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Kontaktebene\",\r\n \"code\": \"abteilungskontakt\",\r\n \"display\": \"Abteilungskontakt\",\r\n \"userSelected\": false\r\n }\r\n ]\r\n }\r\n ],\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"diagnosis\": [\r\n {\r\n \"condition\": {\r\n \"reference\": \"Condition/e6b6895c-549b-47c5-a842-41100761385d\"\r\n }\r\n }\r\n ],\r\n \"period\": {\r\n \"start\": \"2021-02-13T03:04:00+01:00\",\r\n \"end\": \"2021-03-01T20:42:00+01:00\"\r\n },\r\n \"reasonCode\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund\",\r\n \"code\": \"01\",\r\n \"display\": \"Krankenhausbehandlung, vollstationär\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"hospitalization\": {\r\n \"admitSource\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass\",\r\n \"code\": \"E\",\r\n \"display\": \"Einweisung durch einen Arzt\"\r\n }\r\n ]\r\n },\r\n \"dischargeDisposition\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund\",\r\n \"code\": \"019\",\r\n \"display\": \"Behandlung regulär beendet, arbeitsfähig entlassen\"\r\n }\r\n ]\r\n }\r\n },\r\n \"location\": [\r\n {\r\n \"location\": {\r\n \"reference\": \"Location/FD7DF5FD052E1CBCF7F41B12804D596C71FFBE1958B58EF06401DD781B2A53D3\"\r\n },\r\n \"status\": \"active\",\r\n \"physicalType\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.hl7.org/fhir/valueset-location-physical-type.html\",\r\n \"code\": \"bd\",\r\n \"userSelected\": false\r\n }\r\n ],\r\n \"text\": \"Bett\"\r\n },\r\n \"period\": {\r\n \"start\": \"2021-02-13T03:04:00+01:00\",\r\n \"end\": \"2021-03-01T20:42:00+01:00\"\r\n }\r\n }\r\n ],\r\n \"serviceType\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel\",\r\n \"code\": \"3700\",\r\n \"userSelected\": false\r\n }\r\n ]\r\n },\r\n \"serviceProvider\": {\r\n \"identifier\": {\r\n \"system\": \"http://medizininformatik-initiative.de/fhir/NamingSystem/Abteilungsidentifikator/MusterKrankenhaus\",\r\n \"value\": \"1500_ACHI\"\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{baseUrl}}/fhir/Encounter", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Encounter" + ] + } + }, + "response": [] + } + ] } ] }, @@ -3034,4 +3095,4 @@ ] } ] -} +} \ No newline at end of file From b59645c45a805b63fcd420d87b517200ef3ecd84 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 18 May 2021 13:28:22 +0200 Subject: [PATCH 063/141] Update Provide Observation implementation --- .../{Constants.java => CamelConstants.java} | 12 ++-- .../AuditCreateResourceProcessor.java | 4 +- .../camel/processor/FhirProfileValidator.java | 6 +- ... ProvideResourcePersistenceProcessor.java} | 26 ++++---- .../ProvideResourceResponseProcessor.java | 63 +++++++++++++++++++ .../processor/ResourceResponseProcessor.java | 4 +- .../fhirbridge/camel/route/BundleRoutes.java | 10 +-- .../camel/route/ConditionRoutes.java | 4 +- .../fhirbridge/camel/route/ConsentRoutes.java | 4 +- .../camel/route/DiagnosticReportRoutes.java | 4 +- .../route/MedicationStatementRoutes.java | 4 +- .../camel/route/ObservationRoutes.java | 21 ++++--- .../fhirbridge/camel/route/PatientRoutes.java | 6 +- .../camel/route/ProcedureRoutes.java | 4 +- .../route/QuestionnaireResponseRoutes.java | 4 +- .../fhirbridge/core/domain/PatientId.java | 2 +- .../fhirbridge/core/domain/ResourceMap.java | 42 +++++++------ .../ProvideObservationProvider.java | 21 ++++--- .../db/changelog/db.changelog-1.2.xml | 4 +- 19 files changed, 161 insertions(+), 84 deletions(-) rename src/main/java/org/ehrbase/fhirbridge/camel/{Constants.java => CamelConstants.java} (70%) rename src/main/java/org/ehrbase/fhirbridge/camel/processor/{FhirResourcePersistenceProcessor.java => ProvideResourcePersistenceProcessor.java} (76%) create mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/Constants.java b/src/main/java/org/ehrbase/fhirbridge/camel/CamelConstants.java similarity index 70% rename from src/main/java/org/ehrbase/fhirbridge/camel/Constants.java rename to src/main/java/org/ehrbase/fhirbridge/camel/CamelConstants.java index 75b1a7038..31421767d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/Constants.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/CamelConstants.java @@ -16,19 +16,23 @@ package org.ehrbase.fhirbridge.camel; +import org.openehealth.ipf.commons.ihe.fhir.Constants; + /** - * Custom Camel constants used by the FHIR Bridge. + * Constants used in the FHIR Bridge. * * @since 1.0.0 */ -public final class Constants { +public final class CamelConstants implements Constants { + + public static final String COMPOSITION_VERSION_UID = "FhirBridgeCompositionVersionUid"; public static final String METHOD_OUTCOME = "FhirBridgeMethodOutcome"; public static final String PROFILE = "FhirBridgeProfile"; - public static final String VERSION_UID = "FhirBridgeVersionUid"; + public static final String RESOURCE_ID = "FhirBridgeResourceId"; - private Constants() { + private CamelConstants() { } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/AuditCreateResourceProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/AuditCreateResourceProcessor.java index 2dcd395f7..590196bac 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/AuditCreateResourceProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/AuditCreateResourceProcessor.java @@ -5,7 +5,7 @@ import ca.uhn.fhir.rest.api.server.RequestDetails; import org.apache.camel.Exchange; import org.apache.camel.Processor; -import org.ehrbase.fhirbridge.camel.Constants; +import org.ehrbase.fhirbridge.camel.CamelConstants; import org.hl7.fhir.r4.model.AuditEvent; import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.Identifier; @@ -78,7 +78,7 @@ private AuditEvent.AuditEventEntityComponent entity(Exchange exchange) { } private MethodOutcome extractMethodOutcome(Exchange exchange) { - return exchange.getIn().getHeader(Constants.METHOD_OUTCOME, MethodOutcome.class); + return exchange.getIn().getHeader(CamelConstants.METHOD_OUTCOME, MethodOutcome.class); } private RequestDetails extractRequestDetails(Exchange exchange) { diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirProfileValidator.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirProfileValidator.java index 4a3a3163c..3a064a05d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirProfileValidator.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirProfileValidator.java @@ -4,7 +4,7 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.apache.camel.Exchange; import org.apache.camel.Processor; -import org.ehrbase.fhirbridge.camel.Constants; +import org.ehrbase.fhirbridge.camel.CamelConstants; import org.ehrbase.fhirbridge.fhir.common.Profile; import org.ehrbase.fhirbridge.fhir.support.Resources; import org.hl7.fhir.r4.model.OperationOutcome; @@ -57,7 +57,7 @@ public void process(Exchange exchange) { throw new UnprocessableEntityException(fhirContext, operationOutcome); } - exchange.getMessage().setHeader(Constants.PROFILE, defaultProfile); + exchange.getMessage().setHeader(CamelConstants.PROFILE, defaultProfile); } else { Set<Profile> supportedProfiles = Profile.resolveAll(resource); if (supportedProfiles.isEmpty()) { @@ -78,7 +78,7 @@ public void process(Exchange exchange) { throw new UnprocessableEntityException(fhirContext, operationOutcome); } - exchange.getMessage().setHeader(Constants.PROFILE, supportedProfiles.iterator().next()); + exchange.getMessage().setHeader(CamelConstants.PROFILE, supportedProfiles.iterator().next()); } LOG.info("{} resource validated", resource.getResourceType()); diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirResourcePersistenceProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourcePersistenceProcessor.java similarity index 76% rename from src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirResourcePersistenceProcessor.java rename to src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourcePersistenceProcessor.java index 4861ea90b..82f4d1efa 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirResourcePersistenceProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourcePersistenceProcessor.java @@ -22,21 +22,18 @@ import ca.uhn.fhir.rest.api.server.RequestDetails; import org.apache.camel.Exchange; import org.apache.camel.Processor; -import org.ehrbase.fhirbridge.camel.Constants; +import org.ehrbase.fhirbridge.camel.CamelConstants; import org.ehrbase.fhirbridge.core.repository.ResourceMapRepository; import org.hl7.fhir.instance.model.api.IBaseResource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * Camel {@link Processor} that handles creation or modification of the submitted FHIR resource - * into the internal database. - * * @since 1.2.0 */ -public class FhirResourcePersistenceProcessor<T extends IBaseResource> implements Processor { +public class ProvideResourcePersistenceProcessor<T extends IBaseResource> implements Processor { - private static final Logger LOG = LoggerFactory.getLogger(FhirResourcePersistenceProcessor.class); + private static final Logger LOG = LoggerFactory.getLogger(ProvideResourcePersistenceProcessor.class); private final IFhirResourceDao<T> resourceDao; @@ -44,8 +41,8 @@ public class FhirResourcePersistenceProcessor<T extends IBaseResource> implement private final ResourceMapRepository resourceMapRepository; - public FhirResourcePersistenceProcessor(IFhirResourceDao<T> resourceDao, Class<T> resourceType, - ResourceMapRepository resourceMapRepository) { + public ProvideResourcePersistenceProcessor(IFhirResourceDao<T> resourceDao, Class<T> resourceType, + ResourceMapRepository resourceMapRepository) { this.resourceDao = resourceDao; this.resourceType = resourceType; this.resourceMapRepository = resourceMapRepository; @@ -56,23 +53,24 @@ public FhirResourcePersistenceProcessor(IFhirResourceDao<T> resourceDao, Class<T */ @Override public void process(Exchange exchange) throws Exception { - LOG.debug("FHIR resource persistence processing..."); + LOG.trace("Processing..."); var resource = exchange.getIn().getBody(resourceType); - var requestDetails = exchange.getIn().getHeader(org.openehealth.ipf.commons.ihe.fhir.Constants.FHIR_REQUEST_DETAILS, RequestDetails.class); + var requestDetails = exchange.getIn().getHeader(CamelConstants.FHIR_REQUEST_DETAILS, RequestDetails.class); MethodOutcome outcome; if (requestDetails.getRestOperationType() == RestOperationTypeEnum.CREATE) { outcome = handleCreateResource(resource, requestDetails); } else if (requestDetails.getRestOperationType() == RestOperationTypeEnum.UPDATE) { outcome = handleUpdateResource(resource, requestDetails); - resourceMapRepository.findById(outcome.getId().getValue()) - .ifPresent(resourceMap -> exchange.getMessage().setHeader(Constants.VERSION_UID, resourceMap.getVersionUid())); + resourceMapRepository.findById(outcome.getId().getIdPart()) + .ifPresent(resourceMap -> exchange.getMessage().setHeader(CamelConstants.COMPOSITION_VERSION_UID, resourceMap.getCompositionVersionUid())); } else { throw new UnsupportedOperationException("Only 'Create' and 'Update' operations are supported"); } - exchange.setProperty(Constants.METHOD_OUTCOME, outcome); + exchange.getMessage().setHeader(CamelConstants.RESOURCE_ID, outcome.getId().getIdPart()); + exchange.setProperty(CamelConstants.METHOD_OUTCOME, outcome); } /** @@ -90,7 +88,7 @@ private MethodOutcome handleCreateResource(T resource, RequestDetails requestDet } /** - * Updates the existing resource. + * Updates an existing resource. * * @param resource the updated resource * @param requestDetails the context of the current request diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java new file mode 100644 index 000000000..bcb4d9e58 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java @@ -0,0 +1,63 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.camel.processor; + +import ca.uhn.fhir.rest.api.MethodOutcome; +import org.apache.camel.Exchange; +import org.apache.camel.Processor; +import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; +import org.ehrbase.fhirbridge.camel.CamelConstants; +import org.ehrbase.fhirbridge.core.domain.ResourceMap; +import org.ehrbase.fhirbridge.core.repository.ResourceMapRepository; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +/** + * {@link Processor} that handles the persistence of the {@link ResourceMap} entity and + * returns the {@link MethodOutcome} stored in the exchange properties. + * + * @since 1.2.0 + */ +@Component +public class ProvideResourceResponseProcessor implements Processor { + + private static final Logger LOG = LoggerFactory.getLogger(ProvideResourceResponseProcessor.class); + + private final ResourceMapRepository resourceMapRepository; + + public ProvideResourceResponseProcessor(ResourceMapRepository resourceMapRepository) { + this.resourceMapRepository = resourceMapRepository; + } + + @Override + public void process(Exchange exchange) throws Exception { + LOG.trace("Processing Exchange: {}", exchange); + + var composition = exchange.getIn().getMandatoryBody(CompositionEntity.class); + var resourceId = exchange.getIn().getHeader(CamelConstants.RESOURCE_ID, String.class); + + var resourceMap = resourceMapRepository.findById(resourceId) + .orElse(new ResourceMap(resourceId)); + resourceMap.setCompositionVersionUid(composition.getVersionUid().toString()); + + resourceMapRepository.save(resourceMap); + LOG.debug("Saved ResourceMap: {}", resourceMap); + + exchange.getMessage().setBody(exchange.getProperty(CamelConstants.METHOD_OUTCOME, MethodOutcome.class)); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourceResponseProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourceResponseProcessor.java index 5484929d7..0b188f2cc 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourceResponseProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourceResponseProcessor.java @@ -5,7 +5,7 @@ import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.camel.Constants; +import org.ehrbase.fhirbridge.camel.CamelConstants; import org.ehrbase.fhirbridge.camel.component.ehr.composition.CompositionConstants; import org.ehrbase.fhirbridge.fhir.support.Resources; import org.hl7.fhir.r4.model.Identifier; @@ -33,7 +33,7 @@ public void process(Exchange exchange) throws Exception { } private MethodOutcome getMethodOutcome(Exchange exchange) { - MethodOutcome methodOutcome = exchange.getIn().getHeader(Constants.METHOD_OUTCOME, MethodOutcome.class); + MethodOutcome methodOutcome = exchange.getIn().getHeader(CamelConstants.METHOD_OUTCOME, MethodOutcome.class); if (methodOutcome == null) { throw new InternalErrorException("MethodOutcome must not be null"); } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/BundleRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/BundleRoutes.java index d8099d17d..64bd30d9d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/BundleRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/BundleRoutes.java @@ -18,7 +18,7 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.Constants; +import org.ehrbase.fhirbridge.camel.CamelConstants; import org.ehrbase.fhirbridge.fhir.bundle.converter.AntiBodyPanelConverter; import org.ehrbase.fhirbridge.fhir.bundle.converter.BloodGasPanelConverter; import org.ehrbase.fhirbridge.fhir.bundle.converter.DiagnosticReportLabConverter; @@ -48,13 +48,13 @@ public void configure() throws Exception { // 'Provide Bundle' route definition from("bundle-provide:consumer?fhirContext=#fhirContext") - .setHeader(Constants.PROFILE, method(Bundles.class, "getTransactionProfile")) + .setHeader(CamelConstants.PROFILE, method(Bundles.class, "getTransactionProfile")) .choice() - .when(header(Constants.PROFILE).isEqualTo(Profile.BLOOD_GAS_PANEL)) + .when(header(CamelConstants.PROFILE).isEqualTo(Profile.BLOOD_GAS_PANEL)) .to("direct:process-blood-gas-panel-bundle") - .when(header(Constants.PROFILE).isEqualTo(Profile.ANTI_BODY_PANEL)) + .when(header(CamelConstants.PROFILE).isEqualTo(Profile.ANTI_BODY_PANEL)) .to("direct:process-anti-body-panel-bundle") - .when(header(Constants.PROFILE).isEqualTo(Profile.DIAGNOSTIC_REPORT_LAB)) + .when(header(CamelConstants.PROFILE).isEqualTo(Profile.DIAGNOSTIC_REPORT_LAB)) .to("direct:process-diagnostic-report-lab-bundle") .otherwise() .throwException(new UnprocessableEntityException("Unsupported transaction: provided Bundle should have a resource that " + diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java index 73450365b..e2f192f9d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java @@ -17,7 +17,7 @@ package org.ehrbase.fhirbridge.camel.route; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.Constants; +import org.ehrbase.fhirbridge.camel.CamelConstants; import org.hl7.fhir.r4.model.Condition; import org.springframework.stereotype.Component; @@ -41,7 +41,7 @@ public void configure() throws Exception { .process("auditCreateResourceProcessor") .end() .process("fhirProfileValidator") - .setHeader(Constants.METHOD_OUTCOME, method("conditionDao", "create(${body}, ${headers.FhirRequestDetails})")) + .setHeader(CamelConstants.METHOD_OUTCOME, method("conditionDao", "create(${body}, ${headers.FhirRequestDetails})")) .process("ehrIdLookupProcessor") .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java index d1a20d0b9..796315c9f 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java @@ -17,7 +17,7 @@ package org.ehrbase.fhirbridge.camel.route; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.Constants; +import org.ehrbase.fhirbridge.camel.CamelConstants; import org.springframework.stereotype.Component; /** @@ -40,7 +40,7 @@ public void configure() throws Exception { .process("auditCreateResourceProcessor") .end() .process("fhirProfileValidator") - .setHeader(Constants.METHOD_OUTCOME, method("consentDao", "create(${body}, ${headers.FhirRequestDetails})")) + .setHeader(CamelConstants.METHOD_OUTCOME, method("consentDao", "create(${body}, ${headers.FhirRequestDetails})")) .process("ehrIdLookupProcessor") .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java index cc28b53a1..40b8873cb 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java @@ -17,7 +17,7 @@ package org.ehrbase.fhirbridge.camel.route; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.Constants; +import org.ehrbase.fhirbridge.camel.CamelConstants; import org.hl7.fhir.r4.model.DiagnosticReport; import org.springframework.stereotype.Component; @@ -54,7 +54,7 @@ public void configure() throws Exception { // Internal routes definition from("direct:process-diagnostic-report") - .setHeader(Constants.METHOD_OUTCOME, method("diagnosticReportDao", "create(${body}, ${headers.FhirRequestDetails})")) + .setHeader(CamelConstants.METHOD_OUTCOME, method("diagnosticReportDao", "create(${body}, ${headers.FhirRequestDetails})")) .process("ehrIdLookupProcessor") .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java index 315158b1e..c59392818 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java @@ -17,7 +17,7 @@ package org.ehrbase.fhirbridge.camel.route; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.Constants; +import org.ehrbase.fhirbridge.camel.CamelConstants; import org.springframework.stereotype.Component; /** @@ -40,7 +40,7 @@ public void configure() throws Exception { .process("auditCreateResourceProcessor") .end() .process("fhirProfileValidator") - .setHeader(Constants.METHOD_OUTCOME, method("medicationStatementDao", "create(${body}, ${headers.FhirRequestDetails})")) + .setHeader(CamelConstants.METHOD_OUTCOME, method("medicationStatementDao", "create(${body}, ${headers.FhirRequestDetails})")) .process("ehrIdLookupProcessor") .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java index 27f884749..ae7b385ed 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java @@ -20,8 +20,8 @@ import org.apache.camel.builder.RouteBuilder; import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.camel.Constants; -import org.ehrbase.fhirbridge.camel.processor.FhirResourcePersistenceProcessor; +import org.ehrbase.fhirbridge.camel.CamelConstants; +import org.ehrbase.fhirbridge.camel.processor.ProvideResourcePersistenceProcessor; import org.ehrbase.fhirbridge.core.repository.ResourceMapRepository; import org.hl7.fhir.r4.model.Observation; import org.springframework.context.annotation.Bean; @@ -43,19 +43,22 @@ public void configure() throws Exception { // 'Provide Observation' route definition from("observation-provide:consumer?fhirContext=#fhirContext") +// .onCompletion() +// .process("auditEventProcessor") +// .end() .process("fhirProfileValidator") .process("observationPersistenceProcessor") .process("ehrIdLookupProcessor") .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") .choice() - .when(header(Constants.VERSION_UID).isNotNull()) + .when(header(CamelConstants.COMPOSITION_VERSION_UID).isNotNull()) .process(exchange -> { CompositionEntity composition = exchange.getIn().getMandatoryBody(CompositionEntity.class); - composition.setVersionUid(new VersionUid(exchange.getIn().getHeader(Constants.VERSION_UID, String.class))); + composition.setVersionUid(new VersionUid(exchange.getIn().getHeader(CamelConstants.COMPOSITION_VERSION_UID, String.class))); }) .end() .to("ehr-composition:producer?operation=mergeCompositionEntity") - .setBody(exchangeProperty(Constants.METHOD_OUTCOME)); + .process("provideResourceResponseProcessor"); // 'Create Observation' route definition from("observation-create:consumer?fhirContext=#fhirContext") @@ -76,7 +79,7 @@ public void configure() throws Exception { // Internal routes definition from("direct:process-observation") - .setHeader(Constants.METHOD_OUTCOME, method("observationDao", "create(${body}, ${headers.FhirRequestDetails})")) + .setHeader(CamelConstants.METHOD_OUTCOME, method("observationDao", "create(${body}, ${headers.FhirRequestDetails})")) .process("ehrIdLookupProcessor") .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") .to("ehr-composition:compositionEndpoint?operation=mergeCompositionEntity") @@ -86,8 +89,8 @@ public void configure() throws Exception { } @Bean - public FhirResourcePersistenceProcessor<Observation> observationPersistenceProcessor(IFhirResourceDao<Observation> observationDao, - ResourceMapRepository resourceMapRepository) { - return new FhirResourcePersistenceProcessor<>(observationDao, Observation.class, resourceMapRepository); + public ProvideResourcePersistenceProcessor<Observation> observationPersistenceProcessor(IFhirResourceDao<Observation> observationDao, + ResourceMapRepository resourceMapRepository) { + return new ProvideResourcePersistenceProcessor<>(observationDao, Observation.class, resourceMapRepository); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java index 2cf29787e..1e1265823 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java @@ -17,7 +17,7 @@ package org.ehrbase.fhirbridge.camel.route; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.Constants; +import org.ehrbase.fhirbridge.camel.CamelConstants; import org.hl7.fhir.r4.model.Patient; import org.springframework.stereotype.Component; @@ -41,11 +41,11 @@ public void configure() throws Exception { .process("auditCreateResourceProcessor") .end() .process("fhirProfileValidator") - .setHeader(Constants.METHOD_OUTCOME, method("patientDao", "create(${body}, ${headers.FhirRequestDetails})")) + .setHeader(CamelConstants.METHOD_OUTCOME, method("patientDao", "create(${body}, ${headers.FhirRequestDetails})")) .process("ehrIdLookupProcessor") .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") - .setBody(header(Constants.METHOD_OUTCOME)); + .setBody(header(CamelConstants.METHOD_OUTCOME)); // 'Find Patient' route definition from("patient-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java index dfc85a76b..a25bd2b8c 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java @@ -17,7 +17,7 @@ package org.ehrbase.fhirbridge.camel.route; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.Constants; +import org.ehrbase.fhirbridge.camel.CamelConstants; import org.ehrbase.fhirbridge.camel.processor.ResourceResponseProcessor; import org.hl7.fhir.r4.model.Procedure; import org.springframework.stereotype.Component; @@ -42,7 +42,7 @@ public void configure() throws Exception { .process("auditCreateResourceProcessor") .end() .process("fhirProfileValidator") - .setHeader(Constants.METHOD_OUTCOME, method("procedureDao", "create(${body}, ${headers.FhirRequestDetails})")) + .setHeader(CamelConstants.METHOD_OUTCOME, method("procedureDao", "create(${body}, ${headers.FhirRequestDetails})")) .process("ehrIdLookupProcessor") .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java index 775414158..5dad408af 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java @@ -17,7 +17,7 @@ package org.ehrbase.fhirbridge.camel.route; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.Constants; +import org.ehrbase.fhirbridge.camel.CamelConstants; import org.hl7.fhir.r4.model.QuestionnaireResponse; import org.springframework.stereotype.Component; @@ -41,7 +41,7 @@ public void configure() throws Exception { .process("auditCreateResourceProcessor") .end() .process("fhirProfileValidator") - .setHeader(Constants.METHOD_OUTCOME, method("questionnaireResponseDao", "create(${body}, ${headers.FhirRequestDetails})")) + .setHeader(CamelConstants.METHOD_OUTCOME, method("questionnaireResponseDao", "create(${body}, ${headers.FhirRequestDetails})")) .process("ehrIdLookupProcessor") .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") diff --git a/src/main/java/org/ehrbase/fhirbridge/core/domain/PatientId.java b/src/main/java/org/ehrbase/fhirbridge/core/domain/PatientId.java index 59b0af9f7..dc3198c8b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/core/domain/PatientId.java +++ b/src/main/java/org/ehrbase/fhirbridge/core/domain/PatientId.java @@ -26,7 +26,7 @@ import java.util.UUID; /** - * PatientId JPA Entity. + * PatientId Entity. * * @since 1.0.0 */ diff --git a/src/main/java/org/ehrbase/fhirbridge/core/domain/ResourceMap.java b/src/main/java/org/ehrbase/fhirbridge/core/domain/ResourceMap.java index 8de21d523..3e871dc2e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/core/domain/ResourceMap.java +++ b/src/main/java/org/ehrbase/fhirbridge/core/domain/ResourceMap.java @@ -21,10 +21,9 @@ import javax.persistence.Id; import javax.persistence.Table; import java.util.Objects; -import java.util.UUID; /** - * ResourceMap JPA Entity. + * ResourceMap Entity. * * @since 1.2.0 */ @@ -33,26 +32,33 @@ public class ResourceMap { @Id - @Column(name = "RES_ID") - private String id; + @Column(name = "RESOURCE_ID") + private String resourceId; - @Column(name = "VERSION_UID") - private UUID versionUid; + @Column(name = "COMPOSITION_VERSION_UID") + private String compositionVersionUid; - public String getId() { - return id; + public ResourceMap() { } - public void setId(String id) { - this.id = id; + public ResourceMap(String resourceId) { + this.resourceId = resourceId; } - public UUID getVersionUid() { - return versionUid; + public String getResourceId() { + return resourceId; } - public void setVersionUid(UUID versionUid) { - this.versionUid = versionUid; + public void setResourceId(String id) { + this.resourceId = id; + } + + public String getCompositionVersionUid() { + return compositionVersionUid; + } + + public void setCompositionVersionUid(String versionUid) { + this.compositionVersionUid = versionUid; } @Override @@ -64,19 +70,19 @@ public boolean equals(Object o) { return false; } ResourceMap that = (ResourceMap) o; - return Objects.equals(id, that.id) && Objects.equals(versionUid, that.versionUid); + return Objects.equals(resourceId, that.resourceId) && Objects.equals(compositionVersionUid, that.compositionVersionUid); } @Override public int hashCode() { - return Objects.hash(id, versionUid); + return Objects.hash(resourceId, compositionVersionUid); } @Override public String toString() { return "ResourceMap{" + - "id='" + id + '\'' + - ", versionUid=" + versionUid + + "resourceId='" + resourceId + '\'' + + ", compositionVersionUid='" + compositionVersionUid + '\'' + '}'; } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationProvider.java index 9c4ab4fee..ad7efd812 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationProvider.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationProvider.java @@ -43,19 +43,22 @@ public class ProvideObservationProvider extends AbstractPlainProvider { private static final Logger LOG = LoggerFactory.getLogger(ProvideObservationProvider.class); @Create - public MethodOutcome create(@ResourceParam Observation observation, RequestDetails requestDetails, - HttpServletRequest request, HttpServletResponse response) { - LOG.debug("Executing 'Provide Observation' using Create operation..."); - + public MethodOutcome create(@ResourceParam Observation observation, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide Observation' transaction using 'create' operation..."); return requestAction(observation, null, request, response, requestDetails); } @Update - public MethodOutcome update(@ResourceParam Observation observation, @IdParam IdType theId, - @ConditionalUrlParam String theConditional, RequestDetails requestDetails, - HttpServletRequest request, HttpServletResponse response) { - LOG.debug("Executing 'Provide Observation' using Update operation..."); - + public MethodOutcome update(@ResourceParam Observation observation, + @IdParam IdType id, + @ConditionalUrlParam String conditionalUrl, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide Observation' transaction using 'update' operation..."); return requestAction(observation, null, request, response, requestDetails); } } diff --git a/src/main/resources/db/changelog/db.changelog-1.2.xml b/src/main/resources/db/changelog/db.changelog-1.2.xml index 65587184b..1d4f7c4c4 100644 --- a/src/main/resources/db/changelog/db.changelog-1.2.xml +++ b/src/main/resources/db/changelog/db.changelog-1.2.xml @@ -108,10 +108,10 @@ <changeSet id="3" author="subigre"> <createTable tableName="FB_RESOURCE_MAP"> - <column name="RES_ID" type="varchar(255)"> + <column name="RESOURCE_ID" type="varchar(255)"> <constraints nullable="false" primaryKey="true"/> </column> - <column name="VERSION_UID" type="varchar(36)"> + <column name="COMPOSITION_VERSION_UID" type="varchar(255)"> <constraints nullable="false" unique="true"/> </column> </createTable> From 0b862c558afab7383125194d6225ffc73c400c23 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 18 May 2021 14:12:33 +0200 Subject: [PATCH 064/141] Fix issue after merging with develop --- .../DNRAnordnungComposition.java | 473 +++++++++--------- .../GECCOEntlassungsdatenComposition.java | 473 +++++++++--------- .../GECCOStudienteilnahmeComposition.java | 473 +++++++++--------- 3 files changed, 708 insertions(+), 711 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/DNRAnordnungComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/DNRAnordnungComposition.java index 78b945e71..54de46a9e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/DNRAnordnungComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/dnranordnungcomposition/DNRAnordnungComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,256 +17,259 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.DnrAnordnungEvaluation; import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.DnrAnordnungKategorieElement; import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.StatusDefiningCode; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-10T09:43:22.030214400+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-03-10T09:43:22.030214400+01:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("DNR-Anordnung") -public class DNRAnordnungComposition implements Composition, CompositionEntity { - /** - * Path: DNR-Anordnung/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: DNR-Anordnung/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: DNR-Anordnung/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: DNR-Anordnung/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: DNR-Anordnung/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]") - private List<DnrAnordnungKategorieElement> kategorie; - - /** - * Path: DNR-Anordnung/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: DNR-Anordnung/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: DNR-Anordnung/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: DNR-Anordnung/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: DNR-Anordnung/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: DNR-Anordnung/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: DNR-Anordnung/DNR-Anordnung - * Description: Ein Framework zur Kommunikation der Präferenzen einer Person für zukünftige medizinische Behandlung und Pflege. - */ - @Path("/content[openEHR-EHR-EVALUATION.advance_care_directive.v1 and name/value='DNR-Anordnung']") - private DnrAnordnungEvaluation dnrAnordnung; - - /** - * Path: DNR-Anordnung/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: DNR-Anordnung/language - */ - @Path("/language") - private Language language; - - /** - * Path: DNR-Anordnung/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: DNR-Anordnung/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorie(List<DnrAnordnungKategorieElement> kategorie) { - this.kategorie = kategorie; - } - - public List<DnrAnordnungKategorieElement> getKategorie() { - return this.kategorie ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } - - public void setDnrAnordnung(DnrAnordnungEvaluation dnrAnordnung) { - this.dnrAnordnung = dnrAnordnung; - } - - public DnrAnordnungEvaluation getDnrAnordnung() { - return this.dnrAnordnung ; - } +public class DNRAnordnungComposition implements CompositionEntity { + /** + * Path: DNR-Anordnung/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: DNR-Anordnung/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: DNR-Anordnung/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: DNR-Anordnung/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: DNR-Anordnung/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]") + private List<DnrAnordnungKategorieElement> kategorie; + + /** + * Path: DNR-Anordnung/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: DNR-Anordnung/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: DNR-Anordnung/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: DNR-Anordnung/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: DNR-Anordnung/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: DNR-Anordnung/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: DNR-Anordnung/DNR-Anordnung + * Description: Ein Framework zur Kommunikation der Präferenzen einer Person für zukünftige medizinische Behandlung und Pflege. + */ + @Path("/content[openEHR-EHR-EVALUATION.advance_care_directive.v1 and name/value='DNR-Anordnung']") + private DnrAnordnungEvaluation dnrAnordnung; + + /** + * Path: DNR-Anordnung/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: DNR-Anordnung/language + */ + @Path("/language") + private Language language; + + /** + * Path: DNR-Anordnung/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: DNR-Anordnung/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setKategorie(List<DnrAnordnungKategorieElement> kategorie) { + this.kategorie = kategorie; + } + + public List<DnrAnordnungKategorieElement> getKategorie() { + return this.kategorie; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setLocation(String location) { + this.location = location; + } + + public String getLocation() { + return this.location; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setDnrAnordnung(DnrAnordnungEvaluation dnrAnordnung) { + this.dnrAnordnung = dnrAnordnung; + } + + public DnrAnordnungEvaluation getDnrAnordnung() { + return this.dnrAnordnung; + } - public void setComposer(PartyProxy composer) { - this.composer = composer; - } + public void setComposer(PartyProxy composer) { + this.composer = composer; + } - public PartyProxy getComposer() { - return this.composer ; - } + public PartyProxy getComposer() { + return this.composer; + } - public void setLanguage(Language language) { - this.language = language; - } + public void setLanguage(Language language) { + this.language = language; + } - public Language getLanguage() { - return this.language ; - } + public Language getLanguage() { + return this.language; + } - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } + public FeederAudit getFeederAudit() { + return this.feederAudit; + } - public void setTerritory(Territory territory) { - this.territory = territory; - } + public void setTerritory(Territory territory) { + this.territory = territory; + } - public Territory getTerritory() { - return this.territory ; - } + public Territory getTerritory() { + return this.territory; + } - public VersionUid getVersionUid() { - return this.versionUid ; - } + public VersionUid getVersionUid() { + return this.versionUid; + } - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/GECCOEntlassungsdatenComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/GECCOEntlassungsdatenComposition.java index a0f813345..6dc0329ef 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/GECCOEntlassungsdatenComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoentlassungsdatencomposition/GECCOEntlassungsdatenComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,256 +17,259 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.definition.EntlassungsartAdminEntry; import org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.definition.EntlassungsdatenKategorieElement; import org.ehrbase.fhirbridge.ehr.opt.geccoentlassungsdatencomposition.definition.StatusDefiningCode; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-04-22T10:43:11.519377600+02:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-04-22T10:43:11.519377600+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @Template("GECCO_Entlassungsdaten") -public class GECCOEntlassungsdatenComposition implements CompositionEntity, Composition { - /** - * Path: Entlassungsdaten/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Entlassungsdaten/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: Entlassungsdaten/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: Entlassungsdaten/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: Entlassungsdaten/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]") - private List<EntlassungsdatenKategorieElement> kategorie; - - /** - * Path: Entlassungsdaten/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Entlassungsdaten/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Entlassungsdaten/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Entlassungsdaten/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Entlassungsdaten/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Entlassungsdaten/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Entlassungsdaten/Entlassungsart - * Description: Wird nur für entlassene Patienten verwendet. - */ - @Path("/content[openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0 and name/value='Entlassungsart']") - private EntlassungsartAdminEntry entlassungsart; - - /** - * Path: Entlassungsdaten/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Entlassungsdaten/language - */ - @Path("/language") - private Language language; - - /** - * Path: Entlassungsdaten/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Entlassungsdaten/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorie(List<EntlassungsdatenKategorieElement> kategorie) { - this.kategorie = kategorie; - } - - public List<EntlassungsdatenKategorieElement> getKategorie() { - return this.kategorie ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } - - public void setEntlassungsart(EntlassungsartAdminEntry entlassungsart) { - this.entlassungsart = entlassungsart; - } - - public EntlassungsartAdminEntry getEntlassungsart() { - return this.entlassungsart ; - } +public class GECCOEntlassungsdatenComposition implements CompositionEntity { + /** + * Path: Entlassungsdaten/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Entlassungsdaten/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: Entlassungsdaten/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: Entlassungsdaten/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: Entlassungsdaten/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]") + private List<EntlassungsdatenKategorieElement> kategorie; + + /** + * Path: Entlassungsdaten/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Entlassungsdaten/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Entlassungsdaten/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Entlassungsdaten/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Entlassungsdaten/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Entlassungsdaten/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Entlassungsdaten/Entlassungsart + * Description: Wird nur für entlassene Patienten verwendet. + */ + @Path("/content[openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0 and name/value='Entlassungsart']") + private EntlassungsartAdminEntry entlassungsart; + + /** + * Path: Entlassungsdaten/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Entlassungsdaten/language + */ + @Path("/language") + private Language language; + + /** + * Path: Entlassungsdaten/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Entlassungsdaten/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setKategorie(List<EntlassungsdatenKategorieElement> kategorie) { + this.kategorie = kategorie; + } + + public List<EntlassungsdatenKategorieElement> getKategorie() { + return this.kategorie; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setLocation(String location) { + this.location = location; + } + + public String getLocation() { + return this.location; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setEntlassungsart(EntlassungsartAdminEntry entlassungsart) { + this.entlassungsart = entlassungsart; + } + + public EntlassungsartAdminEntry getEntlassungsart() { + return this.entlassungsart; + } - public void setComposer(PartyProxy composer) { - this.composer = composer; - } + public void setComposer(PartyProxy composer) { + this.composer = composer; + } - public PartyProxy getComposer() { - return this.composer ; - } + public PartyProxy getComposer() { + return this.composer; + } - public void setLanguage(Language language) { - this.language = language; - } + public void setLanguage(Language language) { + this.language = language; + } - public Language getLanguage() { - return this.language ; - } + public Language getLanguage() { + return this.language; + } - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } + public FeederAudit getFeederAudit() { + return this.feederAudit; + } - public void setTerritory(Territory territory) { - this.territory = territory; - } + public void setTerritory(Territory territory) { + this.territory = territory; + } - public Territory getTerritory() { - return this.territory ; - } + public Territory getTerritory() { + return this.territory; + } - public VersionUid getVersionUid() { - return this.versionUid ; - } + public VersionUid getVersionUid() { + return this.versionUid; + } - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeComposition.java index aa3eb7908..ef69fa401 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccostudienteilnahmecomposition/GECCOStudienteilnahmeComposition.java @@ -5,10 +5,6 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; -import java.lang.String; -import java.time.temporal.TemporalAccessor; -import java.util.List; -import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -21,256 +17,259 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.GeccoStudienteilnahmeEvaluation; import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.GeccoStudienteilnahmeKategorieElement; import org.ehrbase.fhirbridge.ehr.opt.geccostudienteilnahmecomposition.definition.StatusDefiningCode; +import javax.annotation.processing.Generated; +import java.time.temporal.TemporalAccessor; +import java.util.List; + @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T17:37:36.490444500+02:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-05-04T17:37:36.490444500+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @Template("GECCO_Studienteilnahme") -public class GECCOStudienteilnahmeComposition implements CompositionEntity, Composition { - /** - * Path: GECCO_Studienteilnahme/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: GECCO_Studienteilnahme/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: GECCO_Studienteilnahme/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: GECCO_Studienteilnahme/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: GECCO_Studienteilnahme/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]") - private List<GeccoStudienteilnahmeKategorieElement> kategorie; - - /** - * Path: GECCO_Studienteilnahme/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: GECCO_Studienteilnahme/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: GECCO_Studienteilnahme/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: GECCO_Studienteilnahme/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: GECCO_Studienteilnahme/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: GECCO_Studienteilnahme/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme - * Description: GECCO_Studienteilnahme - */ - @Path("/content[openEHR-EHR-EVALUATION.gecco_study_participation.v0]") - private GeccoStudienteilnahmeEvaluation geccoStudienteilnahme; - - /** - * Path: GECCO_Studienteilnahme/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: GECCO_Studienteilnahme/language - */ - @Path("/language") - private Language language; - - /** - * Path: GECCO_Studienteilnahme/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: GECCO_Studienteilnahme/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode ; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung ; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode ; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode ; - } - - public void setKategorie(List<GeccoStudienteilnahmeKategorieElement> kategorie) { - this.kategorie = kategorie; - } - - public List<GeccoStudienteilnahmeKategorieElement> getKategorie() { - return this.kategorie ; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue ; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public List<Participation> getParticipations() { - return this.participations ; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue ; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getLocation() { - return this.location ; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility ; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode ; - } - - public void setGeccoStudienteilnahme(GeccoStudienteilnahmeEvaluation geccoStudienteilnahme) { - this.geccoStudienteilnahme = geccoStudienteilnahme; - } - - public GeccoStudienteilnahmeEvaluation getGeccoStudienteilnahme() { - return this.geccoStudienteilnahme ; - } +public class GECCOStudienteilnahmeComposition implements CompositionEntity { + /** + * Path: GECCO_Studienteilnahme/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: GECCO_Studienteilnahme/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: GECCO_Studienteilnahme/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: GECCO_Studienteilnahme/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: GECCO_Studienteilnahme/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]") + private List<GeccoStudienteilnahmeKategorieElement> kategorie; + + /** + * Path: GECCO_Studienteilnahme/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: GECCO_Studienteilnahme/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: GECCO_Studienteilnahme/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: GECCO_Studienteilnahme/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: GECCO_Studienteilnahme/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: GECCO_Studienteilnahme/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: GECCO_Studienteilnahme/GECCO_Studienteilnahme + * Description: GECCO_Studienteilnahme + */ + @Path("/content[openEHR-EHR-EVALUATION.gecco_study_participation.v0]") + private GeccoStudienteilnahmeEvaluation geccoStudienteilnahme; + + /** + * Path: GECCO_Studienteilnahme/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: GECCO_Studienteilnahme/language + */ + @Path("/language") + private Language language; + + /** + * Path: GECCO_Studienteilnahme/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: GECCO_Studienteilnahme/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode; + } + + public void setKategorie(List<GeccoStudienteilnahmeKategorieElement> kategorie) { + this.kategorie = kategorie; + } + + public List<GeccoStudienteilnahmeKategorieElement> getKategorie() { + return this.kategorie; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public List<Participation> getParticipations() { + return this.participations; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue; + } + + public void setLocation(String location) { + this.location = location; + } + + public String getLocation() { + return this.location; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode; + } + + public void setGeccoStudienteilnahme(GeccoStudienteilnahmeEvaluation geccoStudienteilnahme) { + this.geccoStudienteilnahme = geccoStudienteilnahme; + } + + public GeccoStudienteilnahmeEvaluation getGeccoStudienteilnahme() { + return this.geccoStudienteilnahme; + } - public void setComposer(PartyProxy composer) { - this.composer = composer; - } + public void setComposer(PartyProxy composer) { + this.composer = composer; + } - public PartyProxy getComposer() { - return this.composer ; - } + public PartyProxy getComposer() { + return this.composer; + } - public void setLanguage(Language language) { - this.language = language; - } + public void setLanguage(Language language) { + this.language = language; + } - public Language getLanguage() { - return this.language ; - } + public Language getLanguage() { + return this.language; + } - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } - public FeederAudit getFeederAudit() { - return this.feederAudit ; - } + public FeederAudit getFeederAudit() { + return this.feederAudit; + } - public void setTerritory(Territory territory) { - this.territory = territory; - } + public void setTerritory(Territory territory) { + this.territory = territory; + } - public Territory getTerritory() { - return this.territory ; - } + public Territory getTerritory() { + return this.territory; + } - public VersionUid getVersionUid() { - return this.versionUid ; - } + public VersionUid getVersionUid() { + return this.versionUid; + } - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } From 8fa5700303795c34c95ceb4106eb9b807747cf05 Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Tue, 18 May 2021 18:54:07 +0200 Subject: [PATCH 065/141] fixed routes --- .../org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java index 1e2ac2c5c..5df351638 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java @@ -46,9 +46,10 @@ public void configure() throws Exception { .choice() .when(header(FhirBridgeConstants.PROFILE).isEqualTo(Profile.PATIENTEN_AUFENTHALT)) .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") - .otherwise() + .to("ehr-composition:compositionEndpoint?operation=mergeCompositionEntity") + .otherwise() .to("bean:fhirResourceConversionService?method=convertDefaultEncounter(${body})") - .to("ehr-composition:compositionEndpoint?operation=mergeCompositionEntity") + .to("ehr-composition:compositionEndpoint?operation=mergeCompositionEntity") .process("resourceResponseProcessor"); // @formatter:on From 75c0b9875b2c87ee06420845e65a471c1202033d Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 18 May 2021 19:42:54 +0200 Subject: [PATCH 066/141] Implement Provide Consent, Provide Patient and Provide Medication Statement transactions --- .../fhirbridge/fhir/consent/FindConsentAuditStrategy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentAuditStrategy.java index a802881d7..347c3d8cb 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentAuditStrategy.java @@ -38,7 +38,7 @@ public FindConsentAuditStrategy() { @Override public AuditMessage[] makeAuditMessage(AuditContext auditContext, FhirQueryAuditDataset auditDataset) { - return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FindConsent) + return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FIND_CONSENT) .addPatients(auditDataset.getPatientIds()) .getMessages(); } From ebe1bac6afb254f502282c186bf7e4c0796afaad Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 18 May 2021 20:18:49 +0200 Subject: [PATCH 067/141] Implement Provide Consent, Provide Patient and Provide Medication Statement transactions --- ...nt.java => ProvideConditionComponent.java} | 14 ++-- ...nent.java => ProvideConsentComponent.java} | 14 ++-- ... ProvideMedicationStatementComponent.java} | 15 +++-- ...nent.java => ProvidePatientComponent.java} | 16 ++--- .../fhirbridge/camel/route/CommonRoutes.java | 36 ++++++++++ .../camel/route/ConditionRoutes.java | 25 +++---- .../fhirbridge/camel/route/ConsentRoutes.java | 30 ++++----- .../route/MedicationStatementRoutes.java | 26 +++----- .../fhirbridge/camel/route/PatientRoutes.java | 26 +++----- .../config/CamelProcessorConfiguration.java | 47 ++++++++++++++ .../common/audit/FhirBridgeEventType.java | 26 +++++--- .../condition/CreateConditionProvider.java | 43 ------------ .../condition/FindConditionAuditStrategy.java | 2 +- ...ava => ProvideConditionAuditStrategy.java} | 9 ++- .../condition/ProvideConditionProvider.java | 65 +++++++++++++++++++ ....java => ProvideConditionTransaction.java} | 18 ++--- .../fhir/consent/CreateConsentProvider.java | 42 ------------ ....java => ProvideConsentAuditStrategy.java} | 9 ++- .../fhir/consent/ProvideConsentProvider.java | 65 +++++++++++++++++++ ...on.java => ProvideConsentTransaction.java} | 18 ++--- .../CreateMedicationStatementProvider.java | 42 ------------ .../FindMedicationStatementAuditStrategy.java | 2 +- ...videMedicationStatementAuditStrategy.java} | 9 ++- .../ProvideMedicationStatementProvider.java | 65 +++++++++++++++++++ ...rovideMedicationStatementTransaction.java} | 18 ++--- .../ProvideObservationAuditStrategy.java | 35 ++++++++++ .../ProvideObservationProvider.java | 2 +- .../ProvideObservationTransaction.java | 6 +- .../fhir/patient/CreatePatientProvider.java | 43 ------------ ....java => ProvidePatientAuditStrategy.java} | 9 ++- .../fhir/patient/ProvidePatientProvider.java | 65 +++++++++++++++++++ ...on.java => ProvidePatientTransaction.java} | 18 ++--- .../apache/camel/component/condition-create | 1 - .../apache/camel/component/condition-provide | 1 + .../org/apache/camel/component/consent-create | 1 - .../apache/camel/component/consent-provide | 1 + ...nt-create => medication-statement-provide} | 2 +- .../org/apache/camel/component/patient-create | 1 - .../apache/camel/component/patient-provide | 1 + 39 files changed, 532 insertions(+), 336 deletions(-) rename src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/condition/{CreateConditionComponent.java => ProvideConditionComponent.java} (66%) rename src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/consent/{CreateConsentComponent.java => ProvideConsentComponent.java} (67%) rename src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/medicationstatement/{CreateMedicationStatementComponent.java => ProvideMedicationStatementComponent.java} (63%) rename src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/patient/{CreatePatientComponent.java => ProvidePatientComponent.java} (67%) create mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/config/CamelProcessorConfiguration.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/condition/CreateConditionProvider.java rename src/main/java/org/ehrbase/fhirbridge/fhir/condition/{CreateConditionAuditStrategy.java => ProvideConditionAuditStrategy.java} (78%) create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionProvider.java rename src/main/java/org/ehrbase/fhirbridge/fhir/condition/{CreateConditionTransaction.java => ProvideConditionTransaction.java} (68%) delete mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/consent/CreateConsentProvider.java rename src/main/java/org/ehrbase/fhirbridge/fhir/consent/{CreateConsentAuditStrategy.java => ProvideConsentAuditStrategy.java} (78%) create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentProvider.java rename src/main/java/org/ehrbase/fhirbridge/fhir/consent/{CreateConsentTransaction.java => ProvideConsentTransaction.java} (69%) delete mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/CreateMedicationStatementProvider.java rename src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/{CreateMedicationStatementAuditStrategy.java => ProvideMedicationStatementAuditStrategy.java} (76%) create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/ProvideMedicationStatementProvider.java rename src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/{CreateMedicationStatementTransaction.java => ProvideMedicationStatementTransaction.java} (66%) create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationAuditStrategy.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/patient/CreatePatientProvider.java rename src/main/java/org/ehrbase/fhirbridge/fhir/patient/{CreatePatientAuditStrategy.java => ProvidePatientAuditStrategy.java} (78%) create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientProvider.java rename src/main/java/org/ehrbase/fhirbridge/fhir/patient/{CreatePatientTransaction.java => ProvidePatientTransaction.java} (69%) delete mode 100644 src/main/resources/META-INF/services/org/apache/camel/component/condition-create create mode 100644 src/main/resources/META-INF/services/org/apache/camel/component/condition-provide delete mode 100644 src/main/resources/META-INF/services/org/apache/camel/component/consent-create create mode 100644 src/main/resources/META-INF/services/org/apache/camel/component/consent-provide rename src/main/resources/META-INF/services/org/apache/camel/component/{medication-statement-create => medication-statement-provide} (60%) delete mode 100644 src/main/resources/META-INF/services/org/apache/camel/component/patient-create create mode 100644 src/main/resources/META-INF/services/org/apache/camel/component/patient-provide diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/condition/CreateConditionComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/condition/ProvideConditionComponent.java similarity index 66% rename from src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/condition/CreateConditionComponent.java rename to src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/condition/ProvideConditionComponent.java index a8f8f5b21..c7ca53df7 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/condition/CreateConditionComponent.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/condition/ProvideConditionComponent.java @@ -16,19 +16,19 @@ package org.ehrbase.fhirbridge.camel.component.fhir.condition; -import org.ehrbase.fhirbridge.fhir.condition.CreateConditionTransaction; +import org.ehrbase.fhirbridge.fhir.condition.ProvideConditionTransaction; import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; /** - * Camel {@link org.apache.camel.Component Component} that handles 'Create Condition' transaction. + * {@link org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirComponent FhirComponent} for 'Provide Condition' transaction. * - * @since 1.0.0 + * @since 1.2.0 */ -@SuppressWarnings({"java:S110"}) -public class CreateConditionComponent extends CustomFhirComponent<GenericFhirAuditDataset> { +@SuppressWarnings("java:S110") +public class ProvideConditionComponent extends CustomFhirComponent<GenericFhirAuditDataset> { - public CreateConditionComponent() { - super(new CreateConditionTransaction()); + public ProvideConditionComponent() { + super(new ProvideConditionTransaction()); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/consent/CreateConsentComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/consent/ProvideConsentComponent.java similarity index 67% rename from src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/consent/CreateConsentComponent.java rename to src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/consent/ProvideConsentComponent.java index cdb8b9fe3..add649232 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/consent/CreateConsentComponent.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/consent/ProvideConsentComponent.java @@ -16,19 +16,19 @@ package org.ehrbase.fhirbridge.camel.component.fhir.consent; -import org.ehrbase.fhirbridge.fhir.consent.CreateConsentTransaction; +import org.ehrbase.fhirbridge.fhir.consent.ProvideConsentTransaction; import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; /** - * Camel {@link org.apache.camel.Component Component} that handles 'Create Consent' transaction. + * {@link org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirComponent FhirComponent} for 'Provide Consent' transaction. * - * @since 1.0.0 + * @since 1.2.0 */ -@SuppressWarnings({"java:S110"}) -public class CreateConsentComponent extends CustomFhirComponent<GenericFhirAuditDataset> { +@SuppressWarnings("java:S110") +public class ProvideConsentComponent extends CustomFhirComponent<GenericFhirAuditDataset> { - public CreateConsentComponent() { - super(new CreateConsentTransaction()); + public ProvideConsentComponent() { + super(new ProvideConsentTransaction()); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/medicationstatement/CreateMedicationStatementComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/medicationstatement/ProvideMedicationStatementComponent.java similarity index 63% rename from src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/medicationstatement/CreateMedicationStatementComponent.java rename to src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/medicationstatement/ProvideMedicationStatementComponent.java index dab71f426..8ff12be1e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/medicationstatement/CreateMedicationStatementComponent.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/medicationstatement/ProvideMedicationStatementComponent.java @@ -16,19 +16,20 @@ package org.ehrbase.fhirbridge.camel.component.fhir.medicationstatement; -import org.ehrbase.fhirbridge.fhir.medicationstatement.CreateMedicationStatementTransaction; +import org.ehrbase.fhirbridge.fhir.medicationstatement.ProvideMedicationStatementTransaction; import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; /** - * Camel {@link org.apache.camel.Component Component} that handles 'Create Medication Statement' transaction. + * {@link org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirComponent FhirComponent} for + * 'Provide Medication Statement' transaction. * - * @since 1.0.0 + * @since 1.2.0 */ -@SuppressWarnings({"java:S110"}) -public class CreateMedicationStatementComponent extends CustomFhirComponent<GenericFhirAuditDataset> { +@SuppressWarnings("java:S110") +public class ProvideMedicationStatementComponent extends CustomFhirComponent<GenericFhirAuditDataset> { - public CreateMedicationStatementComponent() { - super(new CreateMedicationStatementTransaction()); + public ProvideMedicationStatementComponent() { + super(new ProvideMedicationStatementTransaction()); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/patient/CreatePatientComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/patient/ProvidePatientComponent.java similarity index 67% rename from src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/patient/CreatePatientComponent.java rename to src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/patient/ProvidePatientComponent.java index f312743f7..3afe365da 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/patient/CreatePatientComponent.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/patient/ProvidePatientComponent.java @@ -16,20 +16,20 @@ package org.ehrbase.fhirbridge.camel.component.fhir.patient; -import org.ehrbase.fhirbridge.fhir.patient.CreatePatientTransaction; +import org.ehrbase.fhirbridge.fhir.patient.ProvidePatientTransaction; import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; - /** - * Camel {@link org.apache.camel.Component Component} that handles 'Create Patient' transaction. + * {@link org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirComponent FhirComponent} for + * 'Provide Patient' transaction. * - * @since 1.0.0 + * @since 1.2.0 */ -@SuppressWarnings({"java:S110"}) -public class CreatePatientComponent extends CustomFhirComponent<GenericFhirAuditDataset> { +@SuppressWarnings("java:S110") +public class ProvidePatientComponent extends CustomFhirComponent<GenericFhirAuditDataset> { - public CreatePatientComponent() { - super(new CreatePatientTransaction()); + public ProvidePatientComponent() { + super(new ProvidePatientTransaction()); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java new file mode 100644 index 000000000..fb067ed92 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java @@ -0,0 +1,36 @@ +package org.ehrbase.fhirbridge.camel.route; + +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import org.apache.camel.builder.RouteBuilder; +import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; +import org.ehrbase.client.openehrclient.VersionUid; +import org.ehrbase.fhirbridge.camel.CamelConstants; +import org.ehrbase.fhirbridge.ehr.converter.ConversionException; +import org.springframework.stereotype.Component; + +@Component +public class CommonRoutes extends RouteBuilder { + + @Override + public void configure() throws Exception { + // @formatter:off + from("direct:internal-provide-resource") + .routeId("internal-provide-resource") + .process("ehrIdLookupProcessor") + .doTry() + .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") + .doCatch(ConversionException.class) + .throwException(UnprocessableEntityException.class, "${exception.message}") + .end() + .choice() + .when(header(CamelConstants.COMPOSITION_VERSION_UID).isNotNull()) + .process(exchange -> { + var composition = exchange.getIn().getMandatoryBody(CompositionEntity.class); + composition.setVersionUid(new VersionUid(exchange.getIn().getHeader(CamelConstants.COMPOSITION_VERSION_UID, String.class))); + }) + .end() + .to("ehr-composition:producer?operation=mergeCompositionEntity") + .process("provideResourceResponseProcessor"); + // @formatter:on + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java index e2f192f9d..7b3b01bab 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java @@ -16,14 +16,11 @@ package org.ehrbase.fhirbridge.camel.route; -import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.CamelConstants; -import org.hl7.fhir.r4.model.Condition; import org.springframework.stereotype.Component; /** - * Implementation of {@link RouteBuilder} that provides route definitions for transactions - * linked to {@link Condition} resource. + * Implementation of {@link org.apache.camel.builder.RouteBuilder RouteBuilder} that defines routes for transactions + * related to {@link org.hl7.fhir.r4.model.Condition Condition} resource. * * @since 1.0.0 */ @@ -35,20 +32,16 @@ public void configure() throws Exception { // @formatter:off super.configure(); - // 'Create Condition' route definition - from("condition-create:consumer?fhirContext=#fhirContext") - .onCompletion() - .process("auditCreateResourceProcessor") - .end() + // Route: Provide Condition + from("condition-provide:consumer?fhirContext=#fhirContext") + .routeId("provide-condition-route") .process("fhirProfileValidator") - .setHeader(CamelConstants.METHOD_OUTCOME, method("conditionDao", "create(${body}, ${headers.FhirRequestDetails})")) - .process("ehrIdLookupProcessor") - .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") - .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") - .process("resourceResponseProcessor"); + .process("provideConditionPersistenceProcessor") + .to("direct:internal-provide-resource"); - // 'Find Condition' route definition + // Route: Find Condition from("condition-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") + .routeId("find-condition-route") .choice() .when(isSearchOperation()) .to("bean:conditionDao?method=search(${body}, ${headers.FhirRequestDetails})") diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java index 796315c9f..1903a1176 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java @@ -16,13 +16,11 @@ package org.ehrbase.fhirbridge.camel.route; -import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.CamelConstants; import org.springframework.stereotype.Component; /** - * Implementation of {@link RouteBuilder} that provides route definitions for transactions - * linked to {@link org.hl7.fhir.r4.model.Consent Consent} resource. + * Implementation of {@link org.apache.camel.builder.RouteBuilder RouteBuilder} that defines routes for transactions + * related to {@link org.hl7.fhir.r4.model.Consent Consent} resource. * * @since 1.0.0 */ @@ -32,22 +30,22 @@ public class ConsentRoutes extends AbstractRouteBuilder { @Override public void configure() throws Exception { // @formatter:off - super.configure(); + errorHandler( + defaultErrorHandler() + .logStackTrace(false)); +// onException(Exception.class) +// .process("defaultExceptionHandler"); - // 'Create Consent' route definition - from("consent-create:consumer?fhirContext=#fhirContext") - .onCompletion() - .process("auditCreateResourceProcessor") - .end() + // Route: Provide Consent + from("consent-provide:consumer?fhirContext=#fhirContext") + .routeId("provide-consent-route") .process("fhirProfileValidator") - .setHeader(CamelConstants.METHOD_OUTCOME, method("consentDao", "create(${body}, ${headers.FhirRequestDetails})")) - .process("ehrIdLookupProcessor") - .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") - .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") - .process("resourceResponseProcessor"); + .process("provideConsentPersistenceProcessor") + .to("direct:internal-provide-resource"); - // 'Find Consent' route definition + // Route: Find Consent from("consent-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") + .routeId("find-consent-route") .choice() .when(isSearchOperation()) .to("bean:consentDao?method=search(${body}, ${headers.FhirRequestDetails})") diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java index c59392818..8c1d23eb0 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java @@ -16,15 +16,13 @@ package org.ehrbase.fhirbridge.camel.route; -import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.CamelConstants; import org.springframework.stereotype.Component; /** - * Implementation of {@link RouteBuilder} that provides route definitions for transactions - * linked to {@link org.hl7.fhir.r4.model.MedicationStatement MedicationStatement} resource. + * Implementation of {@link org.apache.camel.builder.RouteBuilder RouteBuilder} that defines routes for transactions + * related to {@link org.hl7.fhir.r4.model.MedicationStatement MedicationStatement} resource. * - * @since 1.0.0 + * @since 1.1.0 */ @Component public class MedicationStatementRoutes extends AbstractRouteBuilder { @@ -34,20 +32,16 @@ public void configure() throws Exception { // @formatter:off super.configure(); - // 'Create Medication Statement' route definition - from("medication-statement-create:consumer?fhirContext=#fhirContext") - .onCompletion() - .process("auditCreateResourceProcessor") - .end() + // Route: Provide Medication Statement + from("medication-statement-provide:consumer?fhirContext=#fhirContext") + .routeId("provide-medication-statement-route") .process("fhirProfileValidator") - .setHeader(CamelConstants.METHOD_OUTCOME, method("medicationStatementDao", "create(${body}, ${headers.FhirRequestDetails})")) - .process("ehrIdLookupProcessor") - .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") - .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") - .process("resourceResponseProcessor"); + .process("provideMedicationStatementPersistenceProcessor") + .to("direct:internal-provide-resource"); - // 'Find Medication Statement' route definition + // Route: Find Medication Statement from("medication-statement-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") + .routeId("find-medication-statement-route") .choice() .when(isSearchOperation()) .to("bean:medicationStatementDao?method=search(${body}, ${headers.FhirRequestDetails})") diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java index 1e1265823..9720d55fc 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java @@ -16,14 +16,11 @@ package org.ehrbase.fhirbridge.camel.route; -import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.CamelConstants; -import org.hl7.fhir.r4.model.Patient; import org.springframework.stereotype.Component; /** - * Implementation of {@link RouteBuilder} that provides route definitions for transactions - * linked to {@link Patient} resource. + * Implementation of {@link org.apache.camel.builder.RouteBuilder RouteBuilder} that defines routes for transactions + * related to {@link org.hl7.fhir.r4.model.Patient Patient} resource. * * @since 1.0.0 */ @@ -33,21 +30,15 @@ public class PatientRoutes extends AbstractRouteBuilder { @Override public void configure() throws Exception { // @formatter:off - super.configure(); - // 'Create Patient' route definition - from("patient-create:consumer?fhirContext=#fhirContext") - .onCompletion() - .process("auditCreateResourceProcessor") - .end() + // Route: Provide Patient + from("patient-provide:consumer?fhirContext=#fhirContext") + .routeId("provide-patient-route") .process("fhirProfileValidator") - .setHeader(CamelConstants.METHOD_OUTCOME, method("patientDao", "create(${body}, ${headers.FhirRequestDetails})")) - .process("ehrIdLookupProcessor") - .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") - .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") - .setBody(header(CamelConstants.METHOD_OUTCOME)); + .process("providePatientPersistenceProcessor") + .to("direct:internal-provide-resource"); - // 'Find Patient' route definition + // Route: Find Patient from("patient-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") .choice() .when(isSearchOperation()) @@ -55,7 +46,6 @@ public void configure() throws Exception { .process("bundleProviderResponseProcessor") .otherwise() .to("bean:patientDao?method=read(${body}, ${headers.FhirRequestDetails})"); - // @formatter:on } } diff --git a/src/main/java/org/ehrbase/fhirbridge/config/CamelProcessorConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/CamelProcessorConfiguration.java new file mode 100644 index 000000000..2300777cb --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/config/CamelProcessorConfiguration.java @@ -0,0 +1,47 @@ +package org.ehrbase.fhirbridge.config; + +import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; +import org.ehrbase.fhirbridge.camel.processor.ProvideResourcePersistenceProcessor; +import org.ehrbase.fhirbridge.core.repository.ResourceMapRepository; +import org.hl7.fhir.r4.model.Condition; +import org.hl7.fhir.r4.model.Consent; +import org.hl7.fhir.r4.model.MedicationStatement; +import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.r4.model.Patient; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class CamelProcessorConfiguration { + + private final ResourceMapRepository resourceMapRepository; + + public CamelProcessorConfiguration(ResourceMapRepository resourceMapRepository) { + this.resourceMapRepository = resourceMapRepository; + } + + @Bean + public ProvideResourcePersistenceProcessor<Condition> provideConditionPersistenceProcessor(IFhirResourceDao<Condition> conditionDao) { + return new ProvideResourcePersistenceProcessor<>(conditionDao, Condition.class, resourceMapRepository); + } + + @Bean + public ProvideResourcePersistenceProcessor<Consent> provideConsentPersistenceProcessor(IFhirResourceDao<Consent> consentDao) { + return new ProvideResourcePersistenceProcessor<>(consentDao, Consent.class, resourceMapRepository); + } + + @Bean + public ProvideResourcePersistenceProcessor<Observation> provideObservationPersistenceProcessor(IFhirResourceDao<Observation> observationDao) { + return new ProvideResourcePersistenceProcessor<>(observationDao, Observation.class, resourceMapRepository); + } + + @Bean + public ProvideResourcePersistenceProcessor<MedicationStatement> provideMedicationStatementPersistenceProcessor(IFhirResourceDao<MedicationStatement> medicationStatementDao) { + return new ProvideResourcePersistenceProcessor<>(medicationStatementDao, MedicationStatement.class, resourceMapRepository); + } + + @Bean + public ProvideResourcePersistenceProcessor<Patient> providePatientPersistenceProcessor(IFhirResourceDao<Patient> patientDao) { + return new ProvideResourcePersistenceProcessor<>(patientDao, Patient.class, resourceMapRepository); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java b/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java index 46eb096c0..aed090f98 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java @@ -6,23 +6,31 @@ @SuppressWarnings("java:S115") public enum FhirBridgeEventType implements EventType, EnumeratedCodedValue<EventType> { - FindAuditEvent("audit-event-find", "Find Audit Event"), + // Condition - CreateCondition("condition-create", "Create Condition"), + PROVIDE_CONDITION("condition-provide", "Provide Condition"), - FindCondition("condition-find", "Find Condition"), + FIND_CONDITION("condition-find", "Find Condition"), - CreateConsent("consent-create", "Create Consent"), + // Consent - FindConsent("consent-find", "Find Consent"), + PROVIDE_CONSENT("consent-provide", "Provide Consent"), - CreateDiagnosticReport("diagnostic-report-create", "Create Diagnostic Report"), + FIND_CONSENT("consent-find", "Find Consent"), - FindDiagnosticReport("diagnostic-report-find", "Find Diagnostic Report"), + // MedicationStatement + + PROVIDE_MEDICATION_STATEMENT("medication-statement-provide", "Provide Medication Statement"), + + FIND_MEDICATION_STATEMENT("medication-statement-find", "Find Medication Statement"), - CreateMedicationStatement("medication-statement-create", "Create Medication Statement"), + // Review - FindMedicationStatement("medication-statement-find", "Find Medication Statement"), + FindAuditEvent("audit-event-find", "Find Audit Event"), + + CreateDiagnosticReport("diagnostic-report-create", "Create Diagnostic Report"), + + FindDiagnosticReport("diagnostic-report-find", "Find Diagnostic Report"), CreateObservation("observation-create", "Create Observation"), diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/condition/CreateConditionProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/condition/CreateConditionProvider.java deleted file mode 100644 index c63211d22..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/condition/CreateConditionProvider.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.fhir.condition; - -import ca.uhn.fhir.rest.annotation.Create; -import ca.uhn.fhir.rest.annotation.ResourceParam; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.api.server.RequestDetails; -import org.hl7.fhir.r4.model.Condition; -import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * Implementation of {@link org.openehealth.ipf.commons.ihe.fhir.FhirProvider FhirProvider} that provides REST support - * for 'Create Condition' transaction. - * - * @since 1.0.0 - */ -public class CreateConditionProvider extends AbstractPlainProvider { - - @Create - @SuppressWarnings("unused") - public MethodOutcome createCondition(@ResourceParam Condition condition, RequestDetails requestDetails, - HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) { - return requestAction(condition, null, httpServletRequest, httpServletResponse, requestDetails); - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/condition/FindConditionAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/condition/FindConditionAuditStrategy.java index ef83b0008..9892e1dbb 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/condition/FindConditionAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/condition/FindConditionAuditStrategy.java @@ -38,7 +38,7 @@ public FindConditionAuditStrategy() { @Override public AuditMessage[] makeAuditMessage(AuditContext auditContext, FhirQueryAuditDataset auditDataset) { - return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FindCondition) + return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FIND_CONDITION) .addPatients(auditDataset.getPatientIds()) .getMessages(); } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/condition/CreateConditionAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionAuditStrategy.java similarity index 78% rename from src/main/java/org/ehrbase/fhirbridge/fhir/condition/CreateConditionAuditStrategy.java rename to src/main/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionAuditStrategy.java index 49cd8455a..d254335b9 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/condition/CreateConditionAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionAuditStrategy.java @@ -23,14 +23,13 @@ import java.util.Optional; /** - * Implementation of {@link org.openehealth.ipf.commons.ihe.core.atna.AuditStrategy AuditStrategy} - * for 'Create Condition' transaction. + * Custom implementation of {@link GenericFhirAuditStrategy} for 'Provide Condition' transaction. * - * @since 1.0.0 + * @since 1.2.0 */ -public class CreateConditionAuditStrategy extends GenericFhirAuditStrategy<Condition> { +public class ProvideConditionAuditStrategy extends GenericFhirAuditStrategy<Condition> { - public CreateConditionAuditStrategy() { + public ProvideConditionAuditStrategy() { super(true, OperationOutcomeOperations.INSTANCE, condition -> Optional.of(condition.getSubject())); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionProvider.java new file mode 100644 index 000000000..cca1616f7 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionProvider.java @@ -0,0 +1,65 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.condition; + +import ca.uhn.fhir.rest.annotation.ConditionalUrlParam; +import ca.uhn.fhir.rest.annotation.Create; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.annotation.ResourceParam; +import ca.uhn.fhir.rest.annotation.Update; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import org.hl7.fhir.r4.model.Condition; +import org.hl7.fhir.r4.model.IdType; +import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Implementation of {@link AbstractPlainProvider} that handles 'Provide Condition' transaction + * using {@link Create} and {@link Update} operations. + * + * @since 1.2.0 + */ +@SuppressWarnings("unused") +public class ProvideConditionProvider extends AbstractPlainProvider { + + private static final Logger LOG = LoggerFactory.getLogger(ProvideConditionProvider.class); + + @Create + public MethodOutcome create(@ResourceParam Condition condition, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide Condition' transaction using 'create' operation..."); + return requestAction(condition, null, request, response, requestDetails); + } + + @Update + public MethodOutcome update(@ResourceParam Condition condition, + @IdParam IdType id, + @ConditionalUrlParam String conditionalUrl, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide Condition' transaction using 'update' operation..."); + return requestAction(condition, null, request, response, requestDetails); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/condition/CreateConditionTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionTransaction.java similarity index 68% rename from src/main/java/org/ehrbase/fhirbridge/fhir/condition/CreateConditionTransaction.java rename to src/main/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionTransaction.java index 4b1ebe590..9ca743e77 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/condition/CreateConditionTransaction.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionTransaction.java @@ -22,20 +22,22 @@ import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; /** - * Configuration for 'Create Condition' transaction. + * 'Provide Condition' {@link org.openehealth.ipf.commons.ihe.core.TransactionConfiguration TransactionConfiguration}. + * <p> + * Note: Server-side only * - * @since 1.0.0 + * @since 1.2.0 */ -public class CreateConditionTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { +public class ProvideConditionTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { - public CreateConditionTransaction() { - super("condition-create", - "Create Condition", + public ProvideConditionTransaction() { + super("condition-provide", + "Provide Condition Transaction", false, null, - new CreateConditionAuditStrategy(), + new ProvideConditionAuditStrategy(), FhirVersionEnum.R4, - new CreateConditionProvider(), + new ProvideConditionProvider(), null, FhirTransactionValidator.NO_VALIDATION); } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/consent/CreateConsentProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/consent/CreateConsentProvider.java deleted file mode 100644 index 7e265655a..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/consent/CreateConsentProvider.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.fhir.consent; - -import ca.uhn.fhir.rest.annotation.Create; -import ca.uhn.fhir.rest.annotation.ResourceParam; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.api.server.RequestDetails; -import org.hl7.fhir.r4.model.Consent; -import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * Implementation of {@link org.openehealth.ipf.commons.ihe.fhir.FhirProvider FhirProvider} that provides REST support - * for 'Create Consent' transaction. - * - * @since 1.0.0 - */ -public class CreateConsentProvider extends AbstractPlainProvider { - - @Create - public MethodOutcome createConsent(@ResourceParam Consent consent, RequestDetails requestDetails, - HttpServletRequest request, HttpServletResponse response) { - return requestAction(consent, null, request, response, requestDetails); - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/consent/CreateConsentAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentAuditStrategy.java similarity index 78% rename from src/main/java/org/ehrbase/fhirbridge/fhir/consent/CreateConsentAuditStrategy.java rename to src/main/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentAuditStrategy.java index 79eaeb734..19774b467 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/consent/CreateConsentAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentAuditStrategy.java @@ -23,14 +23,13 @@ import java.util.Optional; /** - * Implementation of {@link org.openehealth.ipf.commons.ihe.core.atna.AuditStrategy AuditStrategy} - * for 'Create Consent' transaction. + * Custom implementation of {@link GenericFhirAuditStrategy} for 'Provide Consent' transaction. * - * @since 1.0.0 + * @since 1.2.0 */ -public class CreateConsentAuditStrategy extends GenericFhirAuditStrategy<Consent> { +public class ProvideConsentAuditStrategy extends GenericFhirAuditStrategy<Consent> { - public CreateConsentAuditStrategy() { + public ProvideConsentAuditStrategy() { super(true, OperationOutcomeOperations.INSTANCE, consent -> Optional.of(consent.getPatient())); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentProvider.java new file mode 100644 index 000000000..caf964a85 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentProvider.java @@ -0,0 +1,65 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.consent; + +import ca.uhn.fhir.rest.annotation.ConditionalUrlParam; +import ca.uhn.fhir.rest.annotation.Create; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.annotation.ResourceParam; +import ca.uhn.fhir.rest.annotation.Update; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import org.hl7.fhir.r4.model.Consent; +import org.hl7.fhir.r4.model.IdType; +import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Implementation of {@link AbstractPlainProvider} that handles 'Provide Consent' transaction + * using {@link Create} and {@link Update} operations. + * + * @since 1.2.0 + */ +@SuppressWarnings("unused") +public class ProvideConsentProvider extends AbstractPlainProvider { + + private static final Logger LOG = LoggerFactory.getLogger(ProvideConsentProvider.class); + + @Create + public MethodOutcome create(@ResourceParam Consent consent, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide Consent' transaction using 'create' operation..."); + return requestAction(consent, null, request, response, requestDetails); + } + + @Update + public MethodOutcome update(@ResourceParam Consent consent, + @IdParam IdType id, + @ConditionalUrlParam String conditionalUrl, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide Consent' transaction using 'update' operation..."); + return requestAction(consent, null, request, response, requestDetails); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/consent/CreateConsentTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentTransaction.java similarity index 69% rename from src/main/java/org/ehrbase/fhirbridge/fhir/consent/CreateConsentTransaction.java rename to src/main/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentTransaction.java index 4b3284998..93f0d9f3e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/consent/CreateConsentTransaction.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentTransaction.java @@ -22,20 +22,22 @@ import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; /** - * Configuration for 'Create Consent' transaction. + * 'Provide Consent' {@link org.openehealth.ipf.commons.ihe.core.TransactionConfiguration TransactionConfiguration}. + * <p> + * Note: Server-side only * - * @since 1.0.0 + * @since 1.2.0 */ -public class CreateConsentTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { +public class ProvideConsentTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { - public CreateConsentTransaction() { - super("consent-create", - "Create Consent", + public ProvideConsentTransaction() { + super("consent-provide", + "Provide Consent Transaction", false, null, - new CreateConsentAuditStrategy(), + new ProvideConsentAuditStrategy(), FhirVersionEnum.R4, - new CreateConsentProvider(), + new ProvideConsentProvider(), null, FhirTransactionValidator.NO_VALIDATION); } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/CreateMedicationStatementProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/CreateMedicationStatementProvider.java deleted file mode 100644 index 04c9c4fe5..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/CreateMedicationStatementProvider.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.fhir.medicationstatement; - -import ca.uhn.fhir.rest.annotation.Create; -import ca.uhn.fhir.rest.annotation.ResourceParam; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.api.server.RequestDetails; -import org.hl7.fhir.r4.model.MedicationStatement; -import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * Implementation of {@link org.openehealth.ipf.commons.ihe.fhir.FhirProvider FhirProvider} that provides REST support - * for 'Create Medication Statement' transaction. - * - * @since 1.0.0 - */ -public class CreateMedicationStatementProvider extends AbstractPlainProvider { - - @Create - public MethodOutcome createMedicationStatement(@ResourceParam MedicationStatement observation, RequestDetails requestDetails, - HttpServletRequest request, HttpServletResponse response) { - return requestAction(observation, null, request, response, requestDetails); - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/FindMedicationStatementAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/FindMedicationStatementAuditStrategy.java index 8b3136164..93818ecf1 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/FindMedicationStatementAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/FindMedicationStatementAuditStrategy.java @@ -38,7 +38,7 @@ public FindMedicationStatementAuditStrategy() { @Override public AuditMessage[] makeAuditMessage(AuditContext auditContext, FhirQueryAuditDataset auditDataset) { - return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FindMedicationStatement) + return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FIND_MEDICATION_STATEMENT) .addPatients(auditDataset.getPatientIds()) .getMessages(); } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/CreateMedicationStatementAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/ProvideMedicationStatementAuditStrategy.java similarity index 76% rename from src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/CreateMedicationStatementAuditStrategy.java rename to src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/ProvideMedicationStatementAuditStrategy.java index 82b66e9ab..ff19f0970 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/CreateMedicationStatementAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/ProvideMedicationStatementAuditStrategy.java @@ -23,14 +23,13 @@ import java.util.Optional; /** - * Implementation of {@link org.openehealth.ipf.commons.ihe.core.atna.AuditStrategy AuditStrategy} - * for 'Create Medication Statement' transaction. + * Custom implementation of {@link GenericFhirAuditStrategy} for 'Provide Medication Statement' transaction. * - * @since 1.0.0 + * @since 1.2.0 */ -public class CreateMedicationStatementAuditStrategy extends GenericFhirAuditStrategy<MedicationStatement> { +public class ProvideMedicationStatementAuditStrategy extends GenericFhirAuditStrategy<MedicationStatement> { - public CreateMedicationStatementAuditStrategy() { + public ProvideMedicationStatementAuditStrategy() { super(true, OperationOutcomeOperations.INSTANCE, medicationStatement -> Optional.of(medicationStatement.getSubject())); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/ProvideMedicationStatementProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/ProvideMedicationStatementProvider.java new file mode 100644 index 000000000..52f594d51 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/ProvideMedicationStatementProvider.java @@ -0,0 +1,65 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.medicationstatement; + +import ca.uhn.fhir.rest.annotation.ConditionalUrlParam; +import ca.uhn.fhir.rest.annotation.Create; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.annotation.ResourceParam; +import ca.uhn.fhir.rest.annotation.Update; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.MedicationStatement; +import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Implementation of {@link AbstractPlainProvider} that handles 'Provide Medication Statement' transaction + * using {@link Create} and {@link Update} operations. + * + * @since 1.2.0 + */ +@SuppressWarnings("unused") +public class ProvideMedicationStatementProvider extends AbstractPlainProvider { + + private static final Logger LOG = LoggerFactory.getLogger(ProvideMedicationStatementProvider.class); + + @Create + public MethodOutcome create(@ResourceParam MedicationStatement medicationStatement, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide Medication Statement' transaction using 'create' operation..."); + return requestAction(medicationStatement, null, request, response, requestDetails); + } + + @Update + public MethodOutcome update(@ResourceParam MedicationStatement medicationStatement, + @IdParam IdType id, + @ConditionalUrlParam String conditionalUrl, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide Medication Statement' transaction using 'update' operation..."); + return requestAction(medicationStatement, null, request, response, requestDetails); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/CreateMedicationStatementTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/ProvideMedicationStatementTransaction.java similarity index 66% rename from src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/CreateMedicationStatementTransaction.java rename to src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/ProvideMedicationStatementTransaction.java index 87f67e7d2..4e9fa8a53 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/CreateMedicationStatementTransaction.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/ProvideMedicationStatementTransaction.java @@ -22,20 +22,22 @@ import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; /** - * Configuration for 'Create Medication Statement' transaction. + * 'Provide Medication Statement' {@link org.openehealth.ipf.commons.ihe.core.TransactionConfiguration TransactionConfiguration}. + * <p> + * Note: Server-side only * - * @since 1.0.0 + * @since 1.2.0 */ -public class CreateMedicationStatementTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { +public class ProvideMedicationStatementTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { - public CreateMedicationStatementTransaction() { - super("medication-statement-create", - "Create Medication Statement", + public ProvideMedicationStatementTransaction() { + super("medication-statement-provide", + "Provide Medication Statement Transaction", false, null, - new CreateMedicationStatementAuditStrategy(), + new ProvideMedicationStatementAuditStrategy(), FhirVersionEnum.R4, - new CreateMedicationStatementProvider(), + new ProvideMedicationStatementProvider(), null, FhirTransactionValidator.NO_VALIDATION); } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationAuditStrategy.java new file mode 100644 index 000000000..c90ae33b6 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationAuditStrategy.java @@ -0,0 +1,35 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.observation; + +import org.hl7.fhir.r4.model.Observation; +import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditStrategy; +import org.openehealth.ipf.commons.ihe.fhir.support.OperationOutcomeOperations; + +import java.util.Optional; + +/** + * Custom implementation of {@link GenericFhirAuditStrategy} for 'Provide Observation' transaction. + * + * @since 1.2.0 + */ +public class ProvideObservationAuditStrategy extends GenericFhirAuditStrategy<Observation> { + + public ProvideObservationAuditStrategy() { + super(true, OperationOutcomeOperations.INSTANCE, observation -> Optional.of(observation.getSubject())); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationProvider.java index ad7efd812..c669f861a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationProvider.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationProvider.java @@ -33,7 +33,7 @@ import javax.servlet.http.HttpServletResponse; /** - * Implementation of {@link AbstractPlainProvider} that supports 'Provide Observation' transaction + * Implementation of {@link AbstractPlainProvider} that handles 'Provide Observation' transaction * using {@link Create} and {@link Update} operations. * * @since 1.2.0 diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationTransaction.java index ef694c725..0816173bc 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationTransaction.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationTransaction.java @@ -22,9 +22,9 @@ import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; /** - * Configuration for 'Provide Observation' transaction. + * 'Provide Observation' {@link org.openehealth.ipf.commons.ihe.core.TransactionConfiguration TransactionConfiguration}. * <p> - * Note: Server-side only. + * Note: Server-side only * * @since 1.2.0 */ @@ -35,7 +35,7 @@ public ProvideObservationTransaction() { "Provide Observation", false, null, - new CreateObservationAuditStrategy(), + new ProvideObservationAuditStrategy(), FhirVersionEnum.R4, new ProvideObservationProvider(), null, diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/patient/CreatePatientProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/patient/CreatePatientProvider.java deleted file mode 100644 index 1c2cbc841..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/patient/CreatePatientProvider.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.fhir.patient; - -import ca.uhn.fhir.rest.annotation.Create; -import ca.uhn.fhir.rest.annotation.ResourceParam; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.api.server.RequestDetails; -import org.hl7.fhir.r4.model.Patient; -import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * Implementation of {@link org.openehealth.ipf.commons.ihe.fhir.FhirProvider FhirProvider} that provides REST support - * for 'Create Patient' transaction. - * - * @since 1.0.0 - */ -public class CreatePatientProvider extends AbstractPlainProvider { - - @Create - @SuppressWarnings("unused") - public MethodOutcome createPatient(@ResourceParam Patient patient, RequestDetails requestDetails, - HttpServletRequest request, HttpServletResponse response) { - return requestAction(patient, null, request, response, requestDetails); - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/patient/CreatePatientAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientAuditStrategy.java similarity index 78% rename from src/main/java/org/ehrbase/fhirbridge/fhir/patient/CreatePatientAuditStrategy.java rename to src/main/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientAuditStrategy.java index 221e2f49c..c3b73e577 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/patient/CreatePatientAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientAuditStrategy.java @@ -23,14 +23,13 @@ import java.util.Optional; /** - * Implementation of {@link org.openehealth.ipf.commons.ihe.core.atna.AuditStrategy AuditStrategy} - * for 'Create Patient' transaction. + * Custom implementation of {@link GenericFhirAuditStrategy} for 'Provide Patient' transaction. * - * @since 1.0.0 + * @since 1.2.0 */ -public class CreatePatientAuditStrategy extends GenericFhirAuditStrategy<Patient> { +public class ProvidePatientAuditStrategy extends GenericFhirAuditStrategy<Patient> { - public CreatePatientAuditStrategy() { + public ProvidePatientAuditStrategy() { super(true, OperationOutcomeOperations.INSTANCE, patient -> Optional.empty()); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientProvider.java new file mode 100644 index 000000000..c485e5f10 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientProvider.java @@ -0,0 +1,65 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.patient; + +import ca.uhn.fhir.rest.annotation.ConditionalUrlParam; +import ca.uhn.fhir.rest.annotation.Create; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.annotation.ResourceParam; +import ca.uhn.fhir.rest.annotation.Update; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.Patient; +import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Implementation of {@link AbstractPlainProvider} that handles 'Provide Patient' transaction + * using {@link Create} and {@link Update} operations. + * + * @since 1.2.0 + */ +@SuppressWarnings("unused") +public class ProvidePatientProvider extends AbstractPlainProvider { + + private static final Logger LOG = LoggerFactory.getLogger(ProvidePatientProvider.class); + + @Create + public MethodOutcome create(@ResourceParam Patient patient, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide Patient' transaction using 'create' operation..."); + return requestAction(patient, null, request, response, requestDetails); + } + + @Update + public MethodOutcome update(@ResourceParam Patient patient, + @IdParam IdType id, + @ConditionalUrlParam String conditionalUrl, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide Patient' transaction using 'update' operation..."); + return requestAction(patient, null, request, response, requestDetails); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/patient/CreatePatientTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientTransaction.java similarity index 69% rename from src/main/java/org/ehrbase/fhirbridge/fhir/patient/CreatePatientTransaction.java rename to src/main/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientTransaction.java index ede3f74f0..74e411697 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/patient/CreatePatientTransaction.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientTransaction.java @@ -22,20 +22,22 @@ import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; /** - * Configuration for 'Create Patient' transaction. + * 'Provide Patient' {@link org.openehealth.ipf.commons.ihe.core.TransactionConfiguration TransactionConfiguration}. + * <p> + * Note: Server-side only * - * @since 1.0.0 + * @since 1.2.0 */ -public class CreatePatientTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { +public class ProvidePatientTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { - public CreatePatientTransaction() { - super("patient-create", - "Create Patient", + public ProvidePatientTransaction() { + super("patient-provide", + "Provide Patient Transaction", false, null, - new CreatePatientAuditStrategy(), + new ProvidePatientAuditStrategy(), FhirVersionEnum.R4, - new CreatePatientProvider(), + new ProvidePatientProvider(), null, FhirTransactionValidator.NO_VALIDATION); } diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/condition-create b/src/main/resources/META-INF/services/org/apache/camel/component/condition-create deleted file mode 100644 index e173840e2..000000000 --- a/src/main/resources/META-INF/services/org/apache/camel/component/condition-create +++ /dev/null @@ -1 +0,0 @@ -class=org.ehrbase.fhirbridge.camel.component.fhir.condition.CreateConditionComponent \ No newline at end of file diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/condition-provide b/src/main/resources/META-INF/services/org/apache/camel/component/condition-provide new file mode 100644 index 000000000..5a6978533 --- /dev/null +++ b/src/main/resources/META-INF/services/org/apache/camel/component/condition-provide @@ -0,0 +1 @@ +class=org.ehrbase.fhirbridge.camel.component.fhir.condition.ProvideConditionComponent \ No newline at end of file diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/consent-create b/src/main/resources/META-INF/services/org/apache/camel/component/consent-create deleted file mode 100644 index e30b88d30..000000000 --- a/src/main/resources/META-INF/services/org/apache/camel/component/consent-create +++ /dev/null @@ -1 +0,0 @@ -class=org.ehrbase.fhirbridge.camel.component.fhir.consent.CreateConsentComponent diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/consent-provide b/src/main/resources/META-INF/services/org/apache/camel/component/consent-provide new file mode 100644 index 000000000..e204c1902 --- /dev/null +++ b/src/main/resources/META-INF/services/org/apache/camel/component/consent-provide @@ -0,0 +1 @@ +class=org.ehrbase.fhirbridge.camel.component.fhir.consent.ProvideConsentComponent \ No newline at end of file diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/medication-statement-create b/src/main/resources/META-INF/services/org/apache/camel/component/medication-statement-provide similarity index 60% rename from src/main/resources/META-INF/services/org/apache/camel/component/medication-statement-create rename to src/main/resources/META-INF/services/org/apache/camel/component/medication-statement-provide index 4799fb7a9..26d11c6bf 100644 --- a/src/main/resources/META-INF/services/org/apache/camel/component/medication-statement-create +++ b/src/main/resources/META-INF/services/org/apache/camel/component/medication-statement-provide @@ -1 +1 @@ -class=org.ehrbase.fhirbridge.camel.component.fhir.medicationstatement.CreateMedicationStatementComponent \ No newline at end of file +class=org.ehrbase.fhirbridge.camel.component.fhir.medicationstatement.ProvideMedicationStatementComponent \ No newline at end of file diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/patient-create b/src/main/resources/META-INF/services/org/apache/camel/component/patient-create deleted file mode 100644 index 7e25ddf46..000000000 --- a/src/main/resources/META-INF/services/org/apache/camel/component/patient-create +++ /dev/null @@ -1 +0,0 @@ -class=org.ehrbase.fhirbridge.camel.component.fhir.patient.CreatePatientComponent \ No newline at end of file diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/patient-provide b/src/main/resources/META-INF/services/org/apache/camel/component/patient-provide new file mode 100644 index 000000000..343231fa8 --- /dev/null +++ b/src/main/resources/META-INF/services/org/apache/camel/component/patient-provide @@ -0,0 +1 @@ +class=org.ehrbase.fhirbridge.camel.component.fhir.patient.ProvidePatientComponent \ No newline at end of file From fca583f434a07e1d7da484c5e2721641c007afa1 Mon Sep 17 00:00:00 2001 From: Pablo Pazos <pablo.pazos@cabolabs.com> Date: Wed, 19 May 2021 01:52:24 -0300 Subject: [PATCH 068/141] fixes for #212 still need to fix some other robot tests, WIP --- .../fhirbridge/fhir/common/Profile.java | 2 +- src/main/resources/profiles/HeartRate.xml | 9552 ++++++++--------- .../create-heart-rate-loinc-datetime.json | 2 +- .../create-heart-rate-loinc-period.json | 2 +- .../create-heart-rate-loinc-period_2.json | 2 +- .../create-heart-rate-snomed-datetime.json | 2 +- .../create-heart-rate-snomed-period.json | 2 +- .../create-heart-rate-snomed-period_2.json | 2 +- .../Observation/create-heart-rate.json | 2 +- .../observation-example-heart-rate-robot.json | 2 +- .../OBSERVATION/04_create_heart_rate.robot | 262 +- 11 files changed, 4611 insertions(+), 5221 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java index 69d3aaad7..69378f3c2 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java @@ -76,7 +76,7 @@ public enum Profile { FIO2(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/inhaled-oxygen-concentration"), - HEART_RATE(Observation.class, "http://hl7.org/fhir/StructureDefinition/heartrate"), + HEART_RATE(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate"), KNOWN_EXPOSURE(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/known-exposure"), diff --git a/src/main/resources/profiles/HeartRate.xml b/src/main/resources/profiles/HeartRate.xml index 4842c56dc..db2fd258f 100644 --- a/src/main/resources/profiles/HeartRate.xml +++ b/src/main/resources/profiles/HeartRate.xml @@ -1,5082 +1,4472 @@ -<StructureDefinition xmlns="http://hl7.org/fhir"> - <url value="https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate" /> - <name value="HeartRate" /> - <status value="draft" /> - <description value="Heart rate" /> - <fhirVersion value="4.0.1" /> - <mapping> - <identity value="workflow" /> - <uri value="http://hl7.org/fhir/workflow" /> - <name value="Workflow Pattern" /> - </mapping> - <mapping> - <identity value="sct-concept" /> - <uri value="http://snomed.info/conceptdomain" /> - <name value="SNOMED CT Concept Domain Binding" /> - </mapping> - <mapping> - <identity value="v2" /> - <uri value="http://hl7.org/v2" /> - <name value="HL7 v2 Mapping" /> - </mapping> - <mapping> - <identity value="rim" /> - <uri value="http://hl7.org/v3" /> - <name value="RIM Mapping" /> - </mapping> - <mapping> - <identity value="w5" /> - <uri value="http://hl7.org/fhir/fivews" /> - <name value="FiveWs Pattern Mapping" /> - </mapping> - <mapping> - <identity value="sct-attr" /> - <uri value="http://snomed.org/attributebinding" /> - <name value="SNOMED CT Attribute Binding" /> - </mapping> - <kind value="resource" /> - <abstract value="false" /> - <type value="Observation" /> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/heartrate" /> - <derivation value="constraint" /> - <snapshot> - <element id="Observation"> - <path value="Observation" /> - <short value="FHIR Heart Rate Profile" /> - <definition value="This profile defines how to represent heart rate observations in FHIR using a standard LOINC code and UCUM units of measure." /> - <comment value="Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc. Other resources are used to provide context for observations such as laboratory reports, etc." /> - <alias value="Vital Signs" /> - <alias value="Measurement" /> - <alias value="Results" /> - <alias value="Tests" /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Observation" /> - <min value="0" /> - <max value="*" /> - </base> - <constraint> - <key value="dom-2" /> - <severity value="error" /> - <human value="If the resource is contained in another resource, it SHALL NOT contain nested Resources" /> - <expression value="contained.contained.empty()" /> - <xpath value="not(parent::f:contained and f:contained)" /> - <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> - </constraint> - <constraint> - <key value="dom-4" /> - <severity value="error" /> - <human value="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated" /> - <expression value="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()" /> - <xpath value="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))" /> - <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> - </constraint> - <constraint> - <key value="dom-3" /> - <severity value="error" /> - <human value="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 value="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 value="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 value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> - </constraint> - <constraint> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice"> - <valueBoolean value="true" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation"> - <valueMarkdown value="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." /> - </extension> - <key value="dom-6" /> - <severity value="warning" /> - <human value="A resource should have narrative for robust management" /> - <expression value="text.`div`.exists()" /> - <xpath value="exists(f:text/h:div)" /> - <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> - </constraint> - <constraint> - <key value="dom-5" /> - <severity value="error" /> - <human value="If a resource is contained in another resource, it SHALL NOT have a security label" /> - <expression value="contained.meta.security.empty()" /> - <xpath value="not(exists(f:contained/*/f:meta/f:security))" /> - <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> - </constraint> - <constraint> - <key value="obs-7" /> - <severity value="error" /> - <human value="If Observation.code is the same as an Observation.component.code then the value element associated with the code SHALL NOT be present" /> - <expression value="value.empty() or component.code.where(coding.intersect(%resource.code.coding).exists()).empty()" /> - <xpath value="not(f:*[starts-with(local-name(.), 'value')] and (for $coding in f:code/f:coding return f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value] [f:system/@value=$coding/f:system/@value]))" /> - <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> - </constraint> - <constraint> - <key value="obs-6" /> - <severity value="error" /> - <human value="dataAbsentReason SHALL only be present if Observation.value[x] is not present" /> - <expression value="dataAbsentReason.empty() or value.empty()" /> - <xpath value="not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))" /> - <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> - </constraint> - <constraint> - <key value="vs-2" /> - <severity value="error" /> - <human value="If there is no component or hasMember element then either a value[x] or a data absent reason must be present." /> - <expression value="(component.empty() and hasMember.empty()) implies (dataAbsentReason.exists() or value.exists())" /> - <xpath value="f:component or f:memberOF or f:*[starts-with(local-name(.), 'value')] or f:dataAbsentReason" /> - <source value="http://hl7.org/fhir/StructureDefinition/vitalsigns" /> - </constraint> - <mapping> - <identity value="rim" /> - <map value="Entity. Role, or Act" /> - </mapping> - <mapping> - <identity value="workflow" /> - <map value="Event" /> - </mapping> - <mapping> - <identity value="sct-concept" /> - <map value="< 363787002 |Observable entity|" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="Observation[classCode=OBS, moodCode=EVN]" /> - </mapping> - </element> - <element id="Observation.id"> - <path value="Observation.id" /> - <short value="Logical id of this artifact" /> - <definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." /> - <comment value="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 value="0" /> - <max value="1" /> - <base> - <path value="Resource.id" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUrl value="string" /> - </extension> - <code value="http://hl7.org/fhirpath/System.String" /> - </type> - <isSummary value="true" /> - </element> - <element id="Observation.meta"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.meta" /> - <short value="Metadata about the resource" /> - <definition value="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 value="0" /> - <max value="1" /> - <base> - <path value="Resource.meta" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="Meta" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="N/A" /> - </mapping> - </element> - <element id="Observation.implicitRules"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.implicitRules" /> - <short value="A set of rules under which this content was created" /> - <definition value="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 value="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 value="0" /> - <max value="1" /> - <base> - <path value="Resource.implicitRules" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="uri" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isModifier value="true" /> - <isModifierReason value="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 value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - </element> - <element id="Observation.language"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.language" /> - <short value="Language of the resource content" /> - <definition value="The base language in which the resource is written." /> - <comment value="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 value="0" /> - <max value="1" /> - <base> - <path value="Resource.language" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="code" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"> - <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="Language" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> - <valueBoolean value="true" /> - </extension> - <strength value="preferred" /> - <description value="A human language." /> - <valueSet value="http://hl7.org/fhir/ValueSet/languages" /> - </binding> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - </element> - <element id="Observation.text"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.text" /> - <short value="Text summary of the resource, for human interpretation" /> - <definition value="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 value="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 value="narrative" /> - <alias value="html" /> - <alias value="xhtml" /> - <alias value="display" /> - <min value="0" /> - <max value="1" /> - <base> - <path value="DomainResource.text" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="Narrative" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="N/A" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="Act.text?" /> - </mapping> - </element> - <element id="Observation.contained"> - <path value="Observation.contained" /> - <short value="Contained, inline Resources" /> - <definition value="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 value="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 value="inline resources" /> - <alias value="anonymous resources" /> - <alias value="contained resources" /> - <min value="0" /> - <max value="*" /> - <base> - <path value="DomainResource.contained" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Resource" /> - </type> - <mapping> - <identity value="rim" /> - <map value="Entity. Role, or Act" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="N/A" /> - </mapping> - </element> - <element id="Observation.extension"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.extension" /> - <slicing> - <discriminator> - <type value="value" /> - <path value="url" /> - </discriminator> - <description value="Extensions are always sliced by (at least) url" /> - <rules value="open" /> - </slicing> - <short value="Additional content defined by implementations" /> - <definition value="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 value="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 value="extensions" /> - <alias value="user content" /> - <min value="0" /> - <max value="*" /> - <base> - <path value="DomainResource.extension" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Extension" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ext-1" /> - <severity value="error" /> - <human value="Must have either extensions or value[x], not both" /> - <expression value="extension.exists() != value.exists()" /> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> - <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> - </constraint> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="N/A" /> - </mapping> - </element> - <element id="Observation.modifierExtension"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.modifierExtension" /> - <slicing> - <discriminator> - <type value="value" /> - <path value="url" /> - </discriminator> - <description value="Extensions are always sliced by (at least) url" /> - <rules value="open" /> - </slicing> - <short value="Extensions that cannot be ignored" /> - <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> - <comment value="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 value="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 value="extensions" /> - <alias value="user content" /> - <min value="0" /> - <max value="*" /> - <base> - <path value="DomainResource.modifierExtension" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Extension" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ext-1" /> - <severity value="error" /> - <human value="Must have either extensions or value[x], not both" /> - <expression value="extension.exists() != value.exists()" /> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> - <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> - </constraint> - <isModifier value="true" /> - <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="N/A" /> - </mapping> - </element> - <element id="Observation.identifier"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.identifier" /> - <short value="Business Identifier for observation" /> - <definition value="A unique identifier assigned to this observation." /> - <requirements value="Allows observations to be distinguished and referenced." /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Observation.identifier" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Identifier" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="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]" /> - </mapping> - <mapping> - <identity value="servd" /> - <map value="Identifier" /> - </mapping> - <mapping> - <identity value="workflow" /> - <map value="Event.identifier" /> - </mapping> - <mapping> - <identity value="w5" /> - <map value="FiveWs.identifier" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX.21 For OBX segments from systems without OBX-21 support a combination of ORC/OBR and OBX must be negotiated between trading partners to uniquely identify the OBX segment. Depending on how V2 has been implemented each of these may be an option: 1) OBR-3 + OBX-3 + OBX-4 or 2) OBR-3 + OBR-4 + OBX-3 + OBX-4 or 2) some other way to uniquely ID the OBR/ORC + OBX-3 + OBX-4." /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="id" /> - </mapping> - </element> - <element id="Observation.basedOn"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.basedOn" /> - <short value="Fulfills plan, proposal or order" /> - <definition value="A plan, proposal or order that is fulfilled in whole or in part by this event. For example, a MedicationRequest may require a patient to have laboratory test performed before it is dispensed." /> - <comment value="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." /> - <requirements value="Allows tracing of authorization for the event and tracking whether proposals/recommendations were acted upon." /> - <alias value="Fulfills" /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Observation.basedOn" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Reference" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/CarePlan" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/DeviceRequest" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationRequest" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/NutritionOrder" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ServiceRequest" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ref-1" /> - <severity value="error" /> - <human value="SHALL have a contained resource if a local reference is provided" /> - <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> - <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> - </mapping> - <mapping> - <identity value="workflow" /> - <map value="Event.basedOn" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="ORC" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value=".inboundRelationship[typeCode=COMP].source[moodCode=EVN]" /> - </mapping> - </element> - <element id="Observation.partOf"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.partOf" /> - <short value="Part of referenced event" /> - <definition value="A larger event of which this particular Observation is a component or step. For example, an observation as part of a procedure." /> - <comment value="To link an Observation to an Encounter use `encounter`. See the [Notes](observation.html#obsgrouping) below for guidance on referencing another Observation." /> - <alias value="Container" /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Observation.partOf" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Reference" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationDispense" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationStatement" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Procedure" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Immunization" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImagingStudy" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ref-1" /> - <severity value="error" /> - <human value="SHALL have a contained resource if a local reference is provided" /> - <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> - <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> - </mapping> - <mapping> - <identity value="workflow" /> - <map value="Event.partOf" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="Varies by domain" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value=".outboundRelationship[typeCode=FLFS].target" /> - </mapping> - </element> - <element id="Observation.status"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint"> - <valueString value="default: final" /> - </extension> - <path value="Observation.status" /> - <short value="registered | preliminary | final | amended +" /> - <definition value="The status of the result value." /> - <comment value="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." /> - <requirements value="Need to track the status of individual results. Some results are finalized before the whole report is finalized." /> - <min value="1" /> - <max value="1" /> - <base> - <path value="Observation.status" /> - <min value="1" /> - <max value="1" /> - </base> - <type> - <code value="code" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <mustSupport value="true" /> - <isModifier value="true" /> - <isModifierReason value="This element is labeled 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 value="true" /> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="Status" /> - </extension> - <strength value="required" /> - <description value="Codes providing the status of an observation." /> - <valueSet value="http://hl7.org/fhir/ValueSet/observation-status|4.0.1" /> - </binding> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="workflow" /> - <map value="Event.status" /> - </mapping> - <mapping> - <identity value="w5" /> - <map value="FiveWs.status" /> - </mapping> - <mapping> - <identity value="sct-concept" /> - <map value="< 445584004 |Report by finality status|" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX-11" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="status Amended & Final are differentiated by whether it is the subject of a ControlAct event with a type of "revise"" /> - </mapping> - </element> - <element id="Observation.category"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.category" /> - <slicing> - <discriminator> - <type value="value" /> - <path value="coding.code" /> - </discriminator> - <discriminator> - <type value="value" /> - <path value="coding.system" /> - </discriminator> - <ordered value="false" /> - <rules value="open" /> - </slicing> - <short value="Classification of type of observation" /> - <definition value="A code that classifies the general type of observation being made." /> - <comment value="In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once. The level of granularity is defined by the category concepts in the value set." /> - <requirements value="Used for filtering what observations are retrieved and displayed." /> - <min value="1" /> - <max value="*" /> - <base> - <path value="Observation.category" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="CodeableConcept" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <mustSupport value="true" /> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ObservationCategory" /> - </extension> - <strength value="preferred" /> - <description value="Codes for high level observation categories." /> - <valueSet value="http://hl7.org/fhir/ValueSet/observation-category" /> - </binding> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="CE/CNE/CWE" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CD" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> - </mapping> - <mapping> - <identity value="w5" /> - <map value="FiveWs.class" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value=".outboundRelationship[typeCode="COMP].target[classCode="LIST", moodCode="EVN"].code" /> - </mapping> - </element> - <element id="Observation.category:VSCat"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.category" /> - <sliceName value="VSCat" /> - <short value="Classification of type of observation" /> - <definition value="A code that classifies the general type of observation being made." /> - <comment value="In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once. The level of granularity is defined by the category concepts in the value set." /> - <requirements value="Used for filtering what observations are retrieved and displayed." /> - <min value="1" /> - <max value="1" /> - <base> - <path value="Observation.category" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="CodeableConcept" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <mustSupport value="true" /> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ObservationCategory" /> - </extension> - <strength value="preferred" /> - <description value="Codes for high level observation categories." /> - <valueSet value="http://hl7.org/fhir/ValueSet/observation-category" /> - </binding> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="CE/CNE/CWE" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CD" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> - </mapping> - <mapping> - <identity value="w5" /> - <map value="FiveWs.class" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value=".outboundRelationship[typeCode="COMP].target[classCode="LIST", moodCode="EVN"].code" /> - </mapping> - </element> - <element id="Observation.category:VSCat.id"> - <path value="Observation.category.id" /> - <representation value="xmlAttr" /> - <short value="Unique id for inter-element referencing" /> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Element.id" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUrl value="string" /> - </extension> - <code value="http://hl7.org/fhirpath/System.String" /> - </type> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - </element> - <element id="Observation.category:VSCat.extension"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.category.extension" /> - <slicing> - <discriminator> - <type value="value" /> - <path value="url" /> - </discriminator> - <description value="Extensions are always sliced by (at least) url" /> - <rules value="open" /> - </slicing> - <short value="Additional content defined by implementations" /> - <definition value="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 value="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 value="extensions" /> - <alias value="user content" /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Element.extension" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Extension" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ext-1" /> - <severity value="error" /> - <human value="Must have either extensions or value[x], not both" /> - <expression value="extension.exists() != value.exists()" /> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> - <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> - </constraint> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="N/A" /> - </mapping> - </element> - <element id="Observation.category:VSCat.coding"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.category.coding" /> - <short value="Code defined by a terminology system" /> - <definition value="A reference to a code defined by a terminology system." /> - <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> - <min value="1" /> - <max value="*" /> - <base> - <path value="CodeableConcept.coding" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Coding" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <mustSupport value="true" /> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CV" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="C*E.1-8, C*E.10-22" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="union(., ./translation)" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> - </mapping> - </element> - <element id="Observation.category:VSCat.coding.id"> - <path value="Observation.category.coding.id" /> - <representation value="xmlAttr" /> - <short value="Unique id for inter-element referencing" /> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Element.id" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUrl value="string" /> - </extension> - <code value="http://hl7.org/fhirpath/System.String" /> - </type> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - </element> - <element id="Observation.category:VSCat.coding.extension"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.category.coding.extension" /> - <slicing> - <discriminator> - <type value="value" /> - <path value="url" /> - </discriminator> - <description value="Extensions are always sliced by (at least) url" /> - <rules value="open" /> - </slicing> - <short value="Additional content defined by implementations" /> - <definition value="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 value="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 value="extensions" /> - <alias value="user content" /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Element.extension" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Extension" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ext-1" /> - <severity value="error" /> - <human value="Must have either extensions or value[x], not both" /> - <expression value="extension.exists() != value.exists()" /> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> - <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> - </constraint> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="N/A" /> - </mapping> - </element> - <element id="Observation.category:VSCat.coding.system"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.category.coding.system" /> - <short value="Identity of the terminology system" /> - <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> - <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> - <min value="1" /> - <max value="1" /> - <base> - <path value="Coding.system" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="uri" /> - </type> - <fixedUri value="http://terminology.hl7.org/CodeSystem/observation-category" /> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <mustSupport value="true" /> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="C*E.3" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="./codeSystem" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> - </mapping> - </element> - <element id="Observation.category:VSCat.coding.version"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.category.coding.version" /> - <short value="Version of the system - if relevant" /> - <definition value="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 value="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 value="0" /> - <max value="1" /> - <base> - <path value="Coding.version" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="string" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="C*E.7" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="./codeSystemVersion" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> - </mapping> - </element> - <element id="Observation.category:VSCat.coding.code"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.category.coding.code" /> - <short value="Symbol in syntax defined by the system" /> - <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> - <requirements value="Need to refer to a particular code in the system." /> - <min value="1" /> - <max value="1" /> - <base> - <path value="Coding.code" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="code" /> - </type> - <fixedCode value="vital-signs" /> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <mustSupport value="true" /> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="C*E.1" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="./code" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> - </mapping> - </element> - <element id="Observation.category:VSCat.coding.display"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> - <valueBoolean value="true" /> - </extension> - <path value="Observation.category.coding.display" /> - <short value="Representation defined by the system" /> - <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> - <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> - <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Coding.display" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="string" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="C*E.2 - but note this is not well followed" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CV.displayName" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> - </mapping> - </element> - <element id="Observation.category:VSCat.coding.userSelected"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.category.coding.userSelected" /> - <short value="If this coding was chosen directly by the user" /> - <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> - <comment value="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 value="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 value="0" /> - <max value="1" /> - <base> - <path value="Coding.userSelected" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="boolean" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="Sometimes implied by being first" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CD.codingRationale" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="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 ]" /> - </mapping> - </element> - <element id="Observation.category:VSCat.text"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> - <valueBoolean value="true" /> - </extension> - <path value="Observation.category.text" /> - <short value="Plain text representation of the concept" /> - <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> - <requirements value="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 value="0" /> - <max value="1" /> - <base> - <path value="CodeableConcept.text" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="string" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="C*E.9. But note many systems use C*E.2 for this" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="./originalText[mediaType/code="text/plain"]/data" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> - </mapping> - </element> - <element id="Observation.code"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.code" /> - <short value="Heart Rate" /> - <definition value="Heart Rate." /> - <comment value="additional codes that translate or map to this code are allowed. For example a more granular LOINC code or code that is used locally in a system." /> - <requirements value="5. SHALL contain exactly one [1..1] code, where the @code SHOULD be selected from ValueSet HITSP Vital Sign Result Type 2.16.840.1.113883.3.88.12.80.62 DYNAMIC (CONF:7301)." /> - <alias value="Name" /> - <alias value="Test" /> - <min value="1" /> - <max value="1" /> - <base> - <path value="Observation.code" /> - <min value="1" /> - <max value="1" /> - </base> - <type> - <code value="CodeableConcept" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <mustSupport value="true" /> - <isSummary value="true" /> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="VitalSigns" /> - </extension> - <strength value="extensible" /> - <description value="This identifies the vital sign result type." /> - <valueSet value="http://hl7.org/fhir/ValueSet/observation-vitalsignresult" /> - </binding> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="CE/CNE/CWE" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CD" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> - </mapping> - <mapping> - <identity value="workflow" /> - <map value="Event.code" /> - </mapping> - <mapping> - <identity value="w5" /> - <map value="FiveWs.what[x]" /> - </mapping> - <mapping> - <identity value="sct-concept" /> - <map value="< 363787002 |Observable entity| OR < 386053000 |Evaluation procedure|" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX-3" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="code" /> - </mapping> - <mapping> - <identity value="sct-attr" /> - <map value="116680003 |Is a|" /> - </mapping> - </element> - <element id="Observation.code.id"> - <path value="Observation.code.id" /> - <representation value="xmlAttr" /> - <short value="Unique id for inter-element referencing" /> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Element.id" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUrl value="string" /> - </extension> - <code value="http://hl7.org/fhirpath/System.String" /> - </type> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - </element> - <element id="Observation.code.extension"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.code.extension" /> - <slicing> - <discriminator> - <type value="value" /> - <path value="url" /> - </discriminator> - <description value="Extensions are always sliced by (at least) url" /> - <rules value="open" /> - </slicing> - <short value="Additional content defined by implementations" /> - <definition value="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 value="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 value="extensions" /> - <alias value="user content" /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Element.extension" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Extension" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ext-1" /> - <severity value="error" /> - <human value="Must have either extensions or value[x], not both" /> - <expression value="extension.exists() != value.exists()" /> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> - <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> - </constraint> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="N/A" /> - </mapping> - </element> - <element id="Observation.code.coding"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.code.coding" /> - <slicing> - <discriminator> - <type value="value" /> - <path value="code" /> - </discriminator> - <discriminator> - <type value="value" /> - <path value="system" /> - </discriminator> - <ordered value="false" /> - <rules value="open" /> - </slicing> - <short value="Code defined by a terminology system" /> - <definition value="A reference to a code defined by a terminology system." /> - <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> - <min value="0" /> - <max value="*" /> - <base> - <path value="CodeableConcept.coding" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Coding" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CV" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="C*E.1-8, C*E.10-22" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="union(., ./translation)" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> - </mapping> - </element> - <element id="Observation.code.coding:HeartRateCode"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.code.coding" /> - <sliceName value="HeartRateCode" /> - <short value="Code defined by a terminology system" /> - <definition value="A reference to a code defined by a terminology system." /> - <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> - <min value="1" /> - <max value="1" /> - <base> - <path value="CodeableConcept.coding" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Coding" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CV" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="C*E.1-8, C*E.10-22" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="union(., ./translation)" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> - </mapping> - </element> - <element id="Observation.code.coding:HeartRateCode.id"> - <path value="Observation.code.coding.id" /> - <representation value="xmlAttr" /> - <short value="Unique id for inter-element referencing" /> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Element.id" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUrl value="string" /> - </extension> - <code value="http://hl7.org/fhirpath/System.String" /> - </type> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - </element> - <element id="Observation.code.coding:HeartRateCode.extension"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.code.coding.extension" /> - <slicing> - <discriminator> - <type value="value" /> - <path value="url" /> - </discriminator> - <description value="Extensions are always sliced by (at least) url" /> - <rules value="open" /> - </slicing> - <short value="Additional content defined by implementations" /> - <definition value="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 value="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 value="extensions" /> - <alias value="user content" /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Element.extension" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Extension" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ext-1" /> - <severity value="error" /> - <human value="Must have either extensions or value[x], not both" /> - <expression value="extension.exists() != value.exists()" /> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> - <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> - </constraint> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="N/A" /> - </mapping> - </element> - <element id="Observation.code.coding:HeartRateCode.system"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.code.coding.system" /> - <short value="Identity of the terminology system" /> - <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> - <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> - <min value="1" /> - <max value="1" /> - <base> - <path value="Coding.system" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="uri" /> - </type> - <fixedUri value="http://loinc.org" /> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="C*E.3" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="./codeSystem" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> - </mapping> - </element> - <element id="Observation.code.coding:HeartRateCode.version"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.code.coding.version" /> - <short value="Version of the system - if relevant" /> - <definition value="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 value="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 value="0" /> - <max value="1" /> - <base> - <path value="Coding.version" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="string" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="C*E.7" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="./codeSystemVersion" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> - </mapping> - </element> - <element id="Observation.code.coding:HeartRateCode.code"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.code.coding.code" /> - <short value="Symbol in syntax defined by the system" /> - <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> - <requirements value="Need to refer to a particular code in the system." /> - <min value="1" /> - <max value="1" /> - <base> - <path value="Coding.code" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="code" /> - </type> - <fixedCode value="8867-4" /> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="C*E.1" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="./code" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> - </mapping> - </element> - <element id="Observation.code.coding:HeartRateCode.display"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> - <valueBoolean value="true" /> - </extension> - <path value="Observation.code.coding.display" /> - <short value="Representation defined by the system" /> - <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> - <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> - <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Coding.display" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="string" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="C*E.2 - but note this is not well followed" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CV.displayName" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> - </mapping> - </element> - <element id="Observation.code.coding:HeartRateCode.userSelected"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.code.coding.userSelected" /> - <short value="If this coding was chosen directly by the user" /> - <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> - <comment value="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 value="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 value="0" /> - <max value="1" /> - <base> - <path value="Coding.userSelected" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="boolean" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="Sometimes implied by being first" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CD.codingRationale" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="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 ]" /> - </mapping> - </element> - <element id="Observation.code.coding:HeartRateCodeSnomed"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.code.coding" /> - <sliceName value="HeartRateCodeSnomed" /> - <short value="Code defined by a terminology system" /> - <definition value="A reference to a code defined by a terminology system." /> - <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="CodeableConcept.coding" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Coding" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CV" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="C*E.1-8, C*E.10-22" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="union(., ./translation)" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> - </mapping> - </element> - <element id="Observation.code.coding:HeartRateCodeSnomed.id"> - <path value="Observation.code.coding.id" /> - <representation value="xmlAttr" /> - <short value="Unique id for inter-element referencing" /> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Element.id" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUrl value="string" /> - </extension> - <code value="http://hl7.org/fhirpath/System.String" /> - </type> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - </element> - <element id="Observation.code.coding:HeartRateCodeSnomed.extension"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.code.coding.extension" /> - <slicing> - <discriminator> - <type value="value" /> - <path value="url" /> - </discriminator> - <description value="Extensions are always sliced by (at least) url" /> - <rules value="open" /> - </slicing> - <short value="Additional content defined by implementations" /> - <definition value="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 value="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 value="extensions" /> - <alias value="user content" /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Element.extension" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Extension" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ext-1" /> - <severity value="error" /> - <human value="Must have either extensions or value[x], not both" /> - <expression value="extension.exists() != value.exists()" /> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> - <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> - </constraint> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="N/A" /> - </mapping> - </element> - <element id="Observation.code.coding:HeartRateCodeSnomed.system"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.code.coding.system" /> - <short value="Identity of the terminology system" /> - <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> - <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> - <min value="1" /> - <max value="1" /> - <base> - <path value="Coding.system" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="uri" /> - </type> - <fixedUri value="http://snomed.info/sct" /> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="C*E.3" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="./codeSystem" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> - </mapping> - </element> - <element id="Observation.code.coding:HeartRateCodeSnomed.version"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.code.coding.version" /> - <short value="Version of the system - if relevant" /> - <definition value="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 value="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 value="0" /> - <max value="1" /> - <base> - <path value="Coding.version" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="string" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="C*E.7" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="./codeSystemVersion" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> - </mapping> - </element> - <element id="Observation.code.coding:HeartRateCodeSnomed.code"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.code.coding.code" /> - <short value="Symbol in syntax defined by the system" /> - <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> - <requirements value="Need to refer to a particular code in the system." /> - <min value="1" /> - <max value="1" /> - <base> - <path value="Coding.code" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="code" /> - </type> - <fixedCode value="364075005" /> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="C*E.1" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="./code" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> - </mapping> - </element> - <element id="Observation.code.coding:HeartRateCodeSnomed.display"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> - <valueBoolean value="true" /> - </extension> - <path value="Observation.code.coding.display" /> - <short value="Representation defined by the system" /> - <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> - <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> - <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Coding.display" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="string" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="C*E.2 - but note this is not well followed" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CV.displayName" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> - </mapping> - </element> - <element id="Observation.code.coding:HeartRateCodeSnomed.userSelected"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.code.coding.userSelected" /> - <short value="If this coding was chosen directly by the user" /> - <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> - <comment value="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 value="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 value="0" /> - <max value="1" /> - <base> - <path value="Coding.userSelected" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="boolean" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="Sometimes implied by being first" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CD.codingRationale" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="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 ]" /> - </mapping> - </element> - <element id="Observation.code.text"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> - <valueBoolean value="true" /> - </extension> - <path value="Observation.code.text" /> - <short value="Plain text representation of the concept" /> - <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> - <requirements value="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 value="0" /> - <max value="1" /> - <base> - <path value="CodeableConcept.text" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="string" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="C*E.9. But note many systems use C*E.2 for this" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="./originalText[mediaType/code="text/plain"]/data" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> - </mapping> - </element> - <element id="Observation.subject"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.subject" /> - <short value="Who and/or what the observation is about" /> - <definition value="The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation." /> - <comment value="One would expect this element to be a cardinality of 1..1. The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated." /> - <requirements value="Observations have no value if you don't know who or what they're about." /> - <min value="1" /> - <max value="1" /> - <base> - <path value="Observation.subject" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="Reference" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ref-1" /> - <severity value="error" /> - <human value="SHALL have a contained resource if a local reference is provided" /> - <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> - <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> - </constraint> - <mustSupport value="true" /> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> - </mapping> - <mapping> - <identity value="workflow" /> - <map value="Event.subject" /> - </mapping> - <mapping> - <identity value="w5" /> - <map value="FiveWs.subject[x]" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="PID-3" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="participation[typeCode=RTGT]" /> - </mapping> - <mapping> - <identity value="w5" /> - <map value="FiveWs.subject" /> - </mapping> - </element> - <element id="Observation.focus"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="trial-use" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.focus" /> - <short value="What the observation is about, when it is not about the subject of record" /> - <definition value="The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record. The focus of an observation could also be an existing condition, an intervention, the subject's diet, another observation of the subject, or a body structure such as tumor or implanted device. An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus." /> - <comment value="Typically, an observation is made about the subject - a patient, or group of patients, location, or device - and the distinction between the subject and what is directly measured for an observation is specified in the observation code itself ( e.g., "Blood Glucose") and does not need to be represented separately using this element. Use `specimen` if a reference to a specimen is required. If a code is required instead of a resource use either `bodysite` for bodysites or the standard extension [focusCode](extension-observation-focuscode.html)." /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Observation.focus" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Reference" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ref-1" /> - <severity value="error" /> - <human value="SHALL have a contained resource if a local reference is provided" /> - <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> - <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> - </mapping> - <mapping> - <identity value="w5" /> - <map value="FiveWs.subject[x]" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX-3" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="participation[typeCode=SBJ]" /> - </mapping> - <mapping> - <identity value="w5" /> - <map value="FiveWs.subject" /> - </mapping> - </element> - <element id="Observation.encounter"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.encounter" /> - <short value="Healthcare event during which this observation is made" /> - <definition value="The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made." /> - <comment value="This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter (e.g. pre-admission laboratory tests)." /> - <requirements value="For some observations it may be important to know the link between an observation and a particular encounter." /> - <alias value="Context" /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Observation.encounter" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="Reference" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Encounter" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ref-1" /> - <severity value="error" /> - <human value="SHALL have a contained resource if a local reference is provided" /> - <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> - <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> - </mapping> - <mapping> - <identity value="workflow" /> - <map value="Event.context" /> - </mapping> - <mapping> - <identity value="w5" /> - <map value="FiveWs.context" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="PV1" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN]" /> - </mapping> - </element> - <element id="Observation.effective[x]"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.effective[x]" /> - <short value="Often just a dateTime for Vital Signs" /> - <definition value="Often just a dateTime for Vital Signs." /> - <comment value="At least a date should be present unless this observation is a historical report. For recording imprecise or "fuzzy" times (For example, a blood glucose measurement taken "after breakfast") use the [Timing](datatypes.html#timing) datatype which allow the measurement to be tied to regular life events." /> - <requirements value="Knowing when an observation was deemed true is important to its relevance as well as determining trends." /> - <alias value="Occurrence" /> - <min value="1" /> - <max value="1" /> - <base> - <path value="Observation.effective[x]" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="dateTime" /> - </type> - <type> - <code value="Period" /> - </type> - <condition value="ele-1" /> - <condition value="vs-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="vs-1" /> - <severity value="error" /> - <human value="if Observation.effective[x] is dateTime and has a value then that value shall be precise to the day" /> - <expression value="($this as dateTime).toString().length() >= 8" /> - <xpath value="f:effectiveDateTime[matches(@value, '^\d{4}-\d{2}-\d{2}')]" /> - <source value="http://hl7.org/fhir/StructureDefinition/vitalsigns" /> - </constraint> - <mustSupport value="true" /> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="workflow" /> - <map value="Event.occurrence[x]" /> - </mapping> - <mapping> - <identity value="w5" /> - <map value="FiveWs.done[x]" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX-14, and/or OBX-19 after v2.4 (depends on who observation made)" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="effectiveTime" /> - </mapping> - </element> - <element id="Observation.issued"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.issued" /> - <short value="Date/Time this version was made available" /> - <definition value="The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified." /> - <comment value="For Observations that don’t require review and verification, it may be the same as the [`lastUpdated` ](resource-definitions.html#Meta.lastUpdated) time of the resource itself. For Observations that do require review and verification for certain updates, it might not be the same as the `lastUpdated` time of the resource itself due to a non-clinically significant update that doesn’t require the new version to be reviewed and verified again." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Observation.issued" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="instant" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="w5" /> - <map value="FiveWs.recorded" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBR.22 (or MSH.7), or perhaps OBX-19 (depends on who observation made)" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="participation[typeCode=AUT].time" /> - </mapping> - </element> - <element id="Observation.performer"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.performer" /> - <short value="Who is responsible for the observation" /> - <definition value="Who was responsible for asserting the observed value as "true"." /> - <comment value="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." /> - <requirements value="May give a degree of confidence in the observation and also indicates where follow-up questions should be directed." /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Observation.performer" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Reference" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/CareTeam" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ref-1" /> - <severity value="error" /> - <human value="SHALL have a contained resource if a local reference is provided" /> - <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> - <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> - </mapping> - <mapping> - <identity value="workflow" /> - <map value="Event.performer.actor" /> - </mapping> - <mapping> - <identity value="w5" /> - <map value="FiveWs.actor" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX.15 / (Practitioner) OBX-16, PRT-5:PRT-4='RO' / (Device) OBX-18 , PRT-10:PRT-4='EQUIP' / (Organization) OBX-23, PRT-8:PRT-4='PO'" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="participation[typeCode=PRF]" /> - </mapping> - </element> - <element id="Observation.value[x]"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.value[x]" /> - <slicing> - <discriminator> - <type value="type" /> - <path value="$this" /> - </discriminator> - </slicing> - <short value="Vital Signs value are recorded using the Quantity data type. For supporting observations such as Cuff size could use other datatypes such as CodeableConcept." /> - <definition value="Vital Signs value are recorded using the Quantity data type. For supporting observations such as Cuff size could use other datatypes such as CodeableConcept." /> - <comment value="An observation may have; 1) a single value here, 2) both a value and a set of related or component values, or 3) only a set of related or component values. If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value. For additional guidance, see the [Notes section](observation.html#notes) below." /> - <requirements value="9. SHALL contain exactly one [1..1] value with @xsi:type="PQ" (CONF:7305)." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Observation.value[x]" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="Quantity" /> - </type> - <type> - <code value="CodeableConcept" /> - </type> - <type> - <code value="string" /> - </type> - <type> - <code value="boolean" /> - </type> - <type> - <code value="integer" /> - </type> - <type> - <code value="Range" /> - </type> - <type> - <code value="Ratio" /> - </type> - <type> - <code value="SampledData" /> - </type> - <type> - <code value="time" /> - </type> - <type> - <code value="dateTime" /> - </type> - <type> - <code value="Period" /> - </type> - <condition value="ele-1" /> - <condition value="obs-7" /> - <condition value="vs-2" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="qty-3" /> - <severity value="error" /> - <human value="If a code for the unit is present, the system SHALL also be present" /> - <expression value="code.empty() or system.exists()" /> - <xpath value="not(exists(f:code)) or exists(f:system)" /> - <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> - </constraint> - <mustSupport value="true" /> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="SN (see also Range) or CQ" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> - </mapping> - <mapping> - <identity value="sct-concept" /> - <map value="< 441742003 |Evaluation finding|" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX.2, OBX.5, OBX.6" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="value" /> - </mapping> - <mapping> - <identity value="sct-attr" /> - <map value="363714003 |Interprets|" /> - </mapping> - </element> - <element id="Observation.value[x]:valueQuantity"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.value[x]" /> - <sliceName value="valueQuantity" /> - <short value="Vital Signs value are recorded using the Quantity data type. For supporting observations such as Cuff size could use other datatypes such as CodeableConcept." /> - <definition value="Vital Signs value are recorded using the Quantity data type. For supporting observations such as Cuff size could use other datatypes such as CodeableConcept." /> - <comment value="An observation may have; 1) a single value here, 2) both a value and a set of related or component values, or 3) only a set of related or component values. If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value. For additional guidance, see the [Notes section](observation.html#notes) below." /> - <requirements value="9. SHALL contain exactly one [1..1] value with @xsi:type="PQ" (CONF:7305)." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Observation.value[x]" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="Quantity" /> - </type> - <condition value="ele-1" /> - <condition value="obs-7" /> - <condition value="vs-2" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="qty-3" /> - <severity value="error" /> - <human value="If a code for the unit is present, the system SHALL also be present" /> - <expression value="code.empty() or system.exists()" /> - <xpath value="not(exists(f:code)) or exists(f:system)" /> - <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> - </constraint> - <mustSupport value="true" /> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="SN (see also Range) or CQ" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> - </mapping> - <mapping> - <identity value="sct-concept" /> - <map value="< 441742003 |Evaluation finding|" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX.2, OBX.5, OBX.6" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="value" /> - </mapping> - <mapping> - <identity value="sct-attr" /> - <map value="363714003 |Interprets|" /> - </mapping> - </element> - <element id="Observation.value[x]:valueQuantity.id"> - <path value="Observation.value[x].id" /> - <representation value="xmlAttr" /> - <short value="Unique id for inter-element referencing" /> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Element.id" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUrl value="string" /> - </extension> - <code value="http://hl7.org/fhirpath/System.String" /> - </type> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - </element> - <element id="Observation.value[x]:valueQuantity.extension"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.value[x].extension" /> - <slicing> - <discriminator> - <type value="value" /> - <path value="url" /> - </discriminator> - <description value="Extensions are always sliced by (at least) url" /> - <rules value="open" /> - </slicing> - <short value="Additional content defined by implementations" /> - <definition value="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 value="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 value="extensions" /> - <alias value="user content" /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Element.extension" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Extension" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ext-1" /> - <severity value="error" /> - <human value="Must have either extensions or value[x], not both" /> - <expression value="extension.exists() != value.exists()" /> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> - <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> - </constraint> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="N/A" /> - </mapping> - </element> - <element id="Observation.value[x]:valueQuantity.value"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.value[x].value" /> - <short value="Numerical value (with implicit precision)" /> - <definition value="The value of the measured amount. The value includes an implicit precision in the presentation of the value." /> - <comment value="The implicit precision in the value should always be honored. Monetary values have their own rules for handling precision (refer to standard accounting text books)." /> - <requirements value="Precision is handled implicitly in almost all cases of measurement." /> - <min value="1" /> - <max value="1" /> - <base> - <path value="Quantity.value" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="decimal" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <mustSupport value="true" /> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="SN.2 / CQ - N/A" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value" /> - </mapping> - </element> - <element id="Observation.value[x]:valueQuantity.comparator"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.value[x].comparator" /> - <short value="< | <= | >= | > - how to understand the value" /> - <definition value="How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value." /> - <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> - <requirements value="Need a framework for handling measures where the value is <5ug/L or >400mg/L due to the limitations of measuring methodology." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Quantity.comparator" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="code" /> - </type> - <meaningWhenMissing value="If there is no comparator, then there is no modification of the value" /> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <isModifier value="true" /> - <isModifierReason value="This is labeled as "Is Modifier" because the comparator modifies the interpretation of the value significantly. If there is no comparator, then there is no modification of the value" /> - <isSummary value="true" /> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="QuantityComparator" /> - </extension> - <strength value="required" /> - <description value="How the Quantity should be understood and represented." /> - <valueSet value="http://hl7.org/fhir/ValueSet/quantity-comparator|4.0.1" /> - </binding> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="SN.1 / CQ.1" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="IVL properties" /> - </mapping> - </element> - <element id="Observation.value[x]:valueQuantity.unit"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> - <valueBoolean value="true" /> - </extension> - <path value="Observation.value[x].unit" /> - <short value="Unit representation" /> - <definition value="A human-readable form of the unit." /> - <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> - <requirements value="There are many representations for units of measure and in many contexts, particular representations are fixed and required. I.e. mcg for micrograms." /> - <min value="1" /> - <max value="1" /> - <base> - <path value="Quantity.unit" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="string" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <mustSupport value="true" /> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="(see OBX.6 etc.) / CQ.2" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="PQ.unit" /> - </mapping> - </element> - <element id="Observation.value[x]:valueQuantity.system"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.value[x].system" /> - <short value="System that defines coded unit form" /> - <definition value="The identification of the system that provides the coded form of the unit." /> - <comment value="see http://en.wikipedia.org/wiki/Uniform_resource_identifier" /> - <requirements value="Need to know the system that defines the coded form of the unit." /> - <min value="1" /> - <max value="1" /> - <base> - <path value="Quantity.system" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="uri" /> - </type> - <fixedUri value="http://unitsofmeasure.org" /> - <condition value="ele-1" /> - <condition value="qty-3" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <mustSupport value="true" /> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="(see OBX.6 etc.) / CQ.2" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CO.codeSystem, PQ.translation.codeSystem" /> - </mapping> - </element> - <element id="Observation.value[x]:valueQuantity.code"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.value[x].code" /> - <short value="Coded responses from the common UCUM units for vital signs value set." /> - <definition value="Coded responses from the common UCUM units for vital signs value set." /> - <comment value="The preferred system is UCUM, but SNOMED CT can also be used (for customary units) or ISO 4217 for currency. The context of use may additionally require a code from a particular system." /> - <requirements value="Need a computable form of the unit that is fixed across all forms. UCUM provides this for quantities, but SNOMED CT provides many units of interest." /> - <min value="1" /> - <max value="1" /> - <base> - <path value="Quantity.code" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="code" /> - </type> - <fixedCode value="/min" /> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <mustSupport value="true" /> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="(see OBX.6 etc.) / CQ.2" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="PQ.code, MO.currency, PQ.translation.code" /> - </mapping> - </element> - <element id="Observation.dataAbsentReason"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.dataAbsentReason" /> - <short value="Why the result is missing" /> - <definition value="Provides a reason why the expected value in the element Observation.value[x] is missing." /> - <comment value="Null or exceptional values can be represented two ways in FHIR Observations. One way is to simply include them in the value set and represent the exceptions in the value. For example, measurement values for a serology test could be "detected", "not detected", "inconclusive", or "specimen unsatisfactory". The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values. For example, the dataAbsentReason code "error" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0. Because of these options, use-case agreements are required to interpret general observations for null or exceptional values." /> - <requirements value="For many results it is necessary to handle exceptional values in measurements." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Observation.dataAbsentReason" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="CodeableConcept" /> - </type> - <condition value="ele-1" /> - <condition value="obs-6" /> - <condition value="vs-2" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <mustSupport value="true" /> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ObservationValueAbsentReason" /> - </extension> - <strength value="extensible" /> - <description value="Codes specifying why the result (`Observation.value[x]`) is missing." /> - <valueSet value="http://hl7.org/fhir/ValueSet/data-absent-reason" /> - </binding> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="CE/CNE/CWE" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CD" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="N/A" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="value.nullFlavor" /> - </mapping> - </element> - <element id="Observation.interpretation"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.interpretation" /> - <short value="High, low, normal, etc." /> - <definition value="A categorical assessment of an observation value. For example, high, low, normal." /> - <comment value="Historically used for laboratory results (known as 'abnormal flag' ), its use extends to other use cases where coded interpretations are relevant. Often reported as one or more simple compact codes this element is often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result." /> - <requirements value="For some results, particularly numeric results, an interpretation is necessary to fully understand the significance of a result." /> - <alias value="Abnormal Flag" /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Observation.interpretation" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="CodeableConcept" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ObservationInterpretation" /> - </extension> - <strength value="extensible" /> - <description value="Codes identifying interpretations of observations." /> - <valueSet value="http://hl7.org/fhir/ValueSet/observation-interpretation" /> - </binding> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="CE/CNE/CWE" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CD" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> - </mapping> - <mapping> - <identity value="sct-concept" /> - <map value="< 260245000 |Findings values|" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX-8" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="interpretationCode" /> - </mapping> - <mapping> - <identity value="sct-attr" /> - <map value="363713009 |Has interpretation|" /> - </mapping> - </element> - <element id="Observation.note"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.note" /> - <short value="Comments about the observation" /> - <definition value="Comments about the observation or the results." /> - <comment value="May include general statements about the observation, or statements about significant, unexpected or unreliable results values, or information about its source when relevant to its interpretation." /> - <requirements value="Need to be able to provide free text additional information." /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Observation.note" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Annotation" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="N/A" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="Act" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="NTE.3 (partner NTE to OBX, or sometimes another (child?) OBX)" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="subjectOf.observationEvent[code="annotation"].value" /> - </mapping> - </element> - <element id="Observation.bodySite"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.bodySite" /> - <short value="Observed body part" /> - <definition value="Indicates the site on the subject's body where the observation was made (i.e. the target site)." /> - <comment value="Only used if not implicit in code found in Observation.code. In many systems, this may be represented as a related observation instead of an inline component. If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ bodySite](extension-bodysite.html)." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Observation.bodySite" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="CodeableConcept" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="BodySite" /> - </extension> - <strength value="example" /> - <description value="Codes describing anatomical locations. May include laterality." /> - <valueSet value="http://hl7.org/fhir/ValueSet/body-site" /> - </binding> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="CE/CNE/CWE" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CD" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> - </mapping> - <mapping> - <identity value="sct-concept" /> - <map value="< 123037004 |Body structure|" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX-20" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="targetSiteCode" /> - </mapping> - <mapping> - <identity value="sct-attr" /> - <map value="718497002 |Inherent location|" /> - </mapping> - </element> - <element id="Observation.method"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.method" /> - <short value="How it was done" /> - <definition value="Indicates the mechanism used to perform the observation." /> - <comment value="Only used if not implicit in code for Observation.code." /> - <requirements value="In some cases, method can impact results and is thus used for determining whether results can be compared or determining significance of results." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Observation.method" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="CodeableConcept" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ObservationMethod" /> - </extension> - <strength value="example" /> - <description value="Methods for simple observations." /> - <valueSet value="http://hl7.org/fhir/ValueSet/observation-methods" /> - </binding> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="CE/CNE/CWE" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CD" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX-17" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="methodCode" /> - </mapping> - </element> - <element id="Observation.specimen"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.specimen" /> - <short value="Specimen used for this observation" /> - <definition value="The specimen that was used when this observation was made." /> - <comment value="Should only be used if not implicit in code found in `Observation.code`. Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report)." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Observation.specimen" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="Reference" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Specimen" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ref-1" /> - <severity value="error" /> - <human value="SHALL have a contained resource if a local reference is provided" /> - <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> - <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> - </constraint> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> - </mapping> - <mapping> - <identity value="sct-concept" /> - <map value="< 123038009 |Specimen|" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="SPM segment" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="participation[typeCode=SPC].specimen" /> - </mapping> - <mapping> - <identity value="sct-attr" /> - <map value="704319004 |Inherent in|" /> - </mapping> - </element> - <element id="Observation.device"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.device" /> - <short value="(Measurement) Device" /> - <definition value="The device used to generate the observation data." /> - <comment value="Note that this is not meant to represent a device involved in the transmission of the result, e.g., a gateway. Such devices may be documented using the Provenance resource where relevant." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Observation.device" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="Reference" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/DeviceMetric" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ref-1" /> - <severity value="error" /> - <human value="SHALL have a contained resource if a local reference is provided" /> - <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> - <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> - </constraint> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> - </mapping> - <mapping> - <identity value="sct-concept" /> - <map value="< 49062001 |Device|" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX-17 / PRT -10" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="participation[typeCode=DEV]" /> - </mapping> - <mapping> - <identity value="sct-attr" /> - <map value="424226004 |Using device|" /> - </mapping> - </element> - <element id="Observation.referenceRange"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.referenceRange" /> - <short value="Provides guide for interpretation" /> - <definition value="Guidance on how to interpret the value by comparison to a normal or recommended range. Multiple reference ranges are interpreted as an "OR". In other words, to represent two distinct target populations, two `referenceRange` elements would be used." /> - <comment value="Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this might not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties." /> - <requirements value="Knowing what values are considered "normal" can help evaluate the significance of a particular result. Need to be able to provide multiple reference ranges for different contexts." /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Observation.referenceRange" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="BackboneElement" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="obs-3" /> - <severity value="error" /> - <human value="Must have at least a low or a high or text" /> - <expression value="low.exists() or high.exists() or text.exists()" /> - <xpath value="(exists(f:low) or exists(f:high)or exists(f:text))" /> - <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> - </constraint> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX.7" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="outboundRelationship[typeCode=REFV]/target[classCode=OBS, moodCode=EVN]" /> - </mapping> - </element> - <element id="Observation.referenceRange.id"> - <path value="Observation.referenceRange.id" /> - <representation value="xmlAttr" /> - <short value="Unique id for inter-element referencing" /> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Element.id" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUrl value="string" /> - </extension> - <code value="http://hl7.org/fhirpath/System.String" /> - </type> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - </element> - <element id="Observation.referenceRange.extension"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.referenceRange.extension" /> - <slicing> - <discriminator> - <type value="value" /> - <path value="url" /> - </discriminator> - <description value="Extensions are always sliced by (at least) url" /> - <rules value="open" /> - </slicing> - <short value="Additional content defined by implementations" /> - <definition value="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 value="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 value="extensions" /> - <alias value="user content" /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Element.extension" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Extension" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ext-1" /> - <severity value="error" /> - <human value="Must have either extensions or value[x], not both" /> - <expression value="extension.exists() != value.exists()" /> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> - <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> - </constraint> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="N/A" /> - </mapping> - </element> - <element id="Observation.referenceRange.modifierExtension"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.referenceRange.modifierExtension" /> - <short value="Extensions that cannot be ignored even if unrecognized" /> - <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> - <comment value="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 value="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 value="extensions" /> - <alias value="user content" /> - <alias value="modifiers" /> - <min value="0" /> - <max value="*" /> - <base> - <path value="BackboneElement.modifierExtension" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Extension" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ext-1" /> - <severity value="error" /> - <human value="Must have either extensions or value[x], not both" /> - <expression value="extension.exists() != value.exists()" /> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> - <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> - </constraint> - <isModifier value="true" /> - <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="N/A" /> - </mapping> - </element> - <element id="Observation.referenceRange.low"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.referenceRange.low" /> - <short value="Low Range, if relevant" /> - <definition value="The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3)." /> - <comment value="The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Observation.referenceRange.low" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="Quantity" /> - <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity" /> - </type> - <condition value="ele-1" /> - <condition value="obs-3" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="qty-3" /> - <severity value="error" /> - <human value="If a code for the unit is present, the system SHALL also be present" /> - <expression value="code.empty() or system.exists()" /> - <xpath value="not(exists(f:code)) or exists(f:system)" /> - <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> - </constraint> - <constraint> - <key value="sqty-1" /> - <severity value="error" /> - <human value="The comparator is not used on a SimpleQuantity" /> - <expression value="comparator.empty()" /> - <xpath value="not(exists(f:comparator))" /> - <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> - </constraint> - <isModifier value="false" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="SN (see also Range) or CQ" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX-7" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="value:IVL_PQ.low" /> - </mapping> - </element> - <element id="Observation.referenceRange.high"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.referenceRange.high" /> - <short value="High Range, if relevant" /> - <definition value="The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3)." /> - <comment value="The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Observation.referenceRange.high" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="Quantity" /> - <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity" /> - </type> - <condition value="ele-1" /> - <condition value="obs-3" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="qty-3" /> - <severity value="error" /> - <human value="If a code for the unit is present, the system SHALL also be present" /> - <expression value="code.empty() or system.exists()" /> - <xpath value="not(exists(f:code)) or exists(f:system)" /> - <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> - </constraint> - <constraint> - <key value="sqty-1" /> - <severity value="error" /> - <human value="The comparator is not used on a SimpleQuantity" /> - <expression value="comparator.empty()" /> - <xpath value="not(exists(f:comparator))" /> - <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> - </constraint> - <isModifier value="false" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="SN (see also Range) or CQ" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX-7" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="value:IVL_PQ.high" /> - </mapping> - </element> - <element id="Observation.referenceRange.type"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.referenceRange.type" /> - <short value="Reference range qualifier" /> - <definition value="Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range." /> - <comment value="This SHOULD be populated if there is more than one range. If this element is not present then the normal range is assumed." /> - <requirements value="Need to be able to say what kind of reference range this is - normal, recommended, therapeutic, etc., - for proper interpretation." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Observation.referenceRange.type" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="CodeableConcept" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ObservationRangeMeaning" /> - </extension> - <strength value="preferred" /> - <description value="Code for the meaning of a reference range." /> - <valueSet value="http://hl7.org/fhir/ValueSet/referencerange-meaning" /> - </binding> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="CE/CNE/CWE" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CD" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> - </mapping> - <mapping> - <identity value="sct-concept" /> - <map value="< 260245000 |Findings values| OR < 365860008 |General clinical state finding| OR < 250171008 |Clinical history or observation findings| OR < 415229000 |Racial group| OR < 365400002 |Finding of puberty stage| OR < 443938003 |Procedure carried out on subject|" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX-10" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="interpretationCode" /> - </mapping> - </element> - <element id="Observation.referenceRange.appliesTo"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.referenceRange.appliesTo" /> - <short value="Reference range population" /> - <definition value="Codes to indicate the target population this reference range applies to. For example, a reference range may be based on the normal population or a particular sex or race. Multiple `appliesTo` are interpreted as an "AND" of the target populations. For example, to represent a target population of African American females, both a code of female and a code for African American would be used." /> - <comment value="This SHOULD be populated if there is more than one range. If this element is not present then the normal population is assumed." /> - <requirements value="Need to be able to identify the target population for proper interpretation." /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Observation.referenceRange.appliesTo" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="CodeableConcept" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ObservationRangeType" /> - </extension> - <strength value="example" /> - <description value="Codes identifying the population the reference range applies to." /> - <valueSet value="http://hl7.org/fhir/ValueSet/referencerange-appliesto" /> - </binding> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="CE/CNE/CWE" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CD" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> - </mapping> - <mapping> - <identity value="sct-concept" /> - <map value="< 260245000 |Findings values| OR < 365860008 |General clinical state finding| OR < 250171008 |Clinical history or observation findings| OR < 415229000 |Racial group| OR < 365400002 |Finding of puberty stage| OR < 443938003 |Procedure carried out on subject|" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX-10" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="interpretationCode" /> - </mapping> - </element> - <element id="Observation.referenceRange.age"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.referenceRange.age" /> - <short value="Applicable age range, if relevant" /> - <definition value="The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so." /> - <comment value="The stated low and high value are assumed to have arbitrarily high precision when it comes to determining which values are in the range. I.e. 1.99 is not in the range 2 -> 3." /> - <requirements value="Some analytes vary greatly over age." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Observation.referenceRange.age" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="Range" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="rng-2" /> - <severity value="error" /> - <human value="If present, low SHALL have a lower value than high" /> - <expression value="low.empty() or high.empty() or (low <= high)" /> - <xpath value="not(exists(f:low/f:value/@value)) or not(exists(f:high/f:value/@value)) or (number(f:low/f:value/@value) <= number(f:high/f:value/@value))" /> - <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> - </constraint> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="NR and also possibly SN (but see also quantity)" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="IVL<QTY[not(type="TS")]> [lowClosed="true" and highClosed="true"]or URG<QTY[not(type="TS")]>" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="outboundRelationship[typeCode=PRCN].targetObservationCriterion[code="age"].value" /> - </mapping> - </element> - <element id="Observation.referenceRange.text"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.referenceRange.text" /> - <short value="Text based reference range in an observation" /> - <definition value="Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of "Negative" or a list or table of "normals"." /> - <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Observation.referenceRange.text" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="string" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX-7" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="value:ST" /> - </mapping> - </element> - <element id="Observation.hasMember"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.hasMember" /> - <short value="Used when reporting vital signs panel components" /> - <definition value="Used when reporting vital signs panel components." /> - <comment value="When using this element, an observation will typically have either a value or a set of related resources, although both may be present in some cases. For a discussion on the ways Observations can assembled in groups together, see [Notes](observation.html#obsgrouping) below. Note that a system may calculate results from [QuestionnaireResponse](questionnaireresponse.html) into a final score and represent the score as an Observation." /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Observation.hasMember" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Reference" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MolecularSequence" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/vitalsigns" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ref-1" /> - <severity value="error" /> - <human value="SHALL have a contained resource if a local reference is provided" /> - <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> - <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="Relationships established by OBX-4 usage" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="outBoundRelationship" /> - </mapping> - </element> - <element id="Observation.derivedFrom"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.derivedFrom" /> - <short value="Related measurements the observation is made from" /> - <definition value="The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image." /> - <comment value="All the reference choices that are listed in this element can represent clinical observations and other measurements that may be the source for a derived value. The most common reference will be another Observation. For a discussion on the ways Observations can assembled in groups together, see [Notes](observation.html#obsgrouping) below." /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Observation.derivedFrom" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Reference" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/DocumentReference" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImagingStudy" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/Media" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/MolecularSequence" /> - <targetProfile value="http://hl7.org/fhir/StructureDefinition/vitalsigns" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ref-1" /> - <severity value="error" /> - <human value="SHALL have a contained resource if a local reference is provided" /> - <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> - <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> - </constraint> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="Relationships established by OBX-4 usage" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value=".targetObservation" /> - </mapping> - </element> - <element id="Observation.component"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.component" /> - <short value="Used when reporting systolic and diastolic blood pressure." /> - <definition value="Used when reporting systolic and diastolic blood pressure." /> - <comment value="For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below." /> - <requirements value="Component observations share the same attributes in the Observation resource as the primary observation and are always treated a part of a single observation (they are not separable). However, the reference range for the primary observation value is not inherited by the component values and is required when appropriate for each component observation." /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Observation.component" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="BackboneElement" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="vs-3" /> - <severity value="error" /> - <human value="If there is no a value a data absent reason must be present" /> - <expression value="value.exists() or dataAbsentReason.exists()" /> - <xpath value="f:*[starts-with(local-name(.), 'value')] or f:dataAbsentReason" /> - <source value="http://hl7.org/fhir/StructureDefinition/vitalsigns" /> - </constraint> - <mustSupport value="true" /> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="containment by OBX-4?" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="outBoundRelationship[typeCode=COMP]" /> - </mapping> - </element> - <element id="Observation.component.id"> - <path value="Observation.component.id" /> - <representation value="xmlAttr" /> - <short value="Unique id for inter-element referencing" /> - <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Element.id" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> - <valueUrl value="string" /> - </extension> - <code value="http://hl7.org/fhirpath/System.String" /> - </type> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - </element> - <element id="Observation.component.extension"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.component.extension" /> - <slicing> - <discriminator> - <type value="value" /> - <path value="url" /> - </discriminator> - <description value="Extensions are always sliced by (at least) url" /> - <rules value="open" /> - </slicing> - <short value="Additional content defined by implementations" /> - <definition value="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 value="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 value="extensions" /> - <alias value="user content" /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Element.extension" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Extension" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ext-1" /> - <severity value="error" /> - <human value="Must have either extensions or value[x], not both" /> - <expression value="extension.exists() != value.exists()" /> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> - <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> - </constraint> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="N/A" /> - </mapping> - </element> - <element id="Observation.component.modifierExtension"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.component.modifierExtension" /> - <short value="Extensions that cannot be ignored even if unrecognized" /> - <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> - <comment value="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 value="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 value="extensions" /> - <alias value="user content" /> - <alias value="modifiers" /> - <min value="0" /> - <max value="*" /> - <base> - <path value="BackboneElement.modifierExtension" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="Extension" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="ext-1" /> - <severity value="error" /> - <human value="Must have either extensions or value[x], not both" /> - <expression value="extension.exists() != value.exists()" /> - <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> - <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> - </constraint> - <isModifier value="true" /> - <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> - <isSummary value="true" /> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="N/A" /> - </mapping> - </element> - <element id="Observation.component.code"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.component.code" /> - <short value="Type of component observation (code / type)" /> - <definition value="Describes what was observed. Sometimes this is called the observation "code"." /> - <comment value="*All* code-value and component.code-component.value pairs need to be taken into account to correctly understand the meaning of the observation." /> - <requirements value="Knowing what kind of observation is being made is essential to understanding the observation." /> - <min value="1" /> - <max value="1" /> - <base> - <path value="Observation.component.code" /> - <min value="1" /> - <max value="1" /> - </base> - <type> - <code value="CodeableConcept" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <mustSupport value="true" /> - <isSummary value="true" /> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="VitalSigns" /> - </extension> - <strength value="extensible" /> - <description value="This identifies the vital sign result type." /> - <valueSet value="http://hl7.org/fhir/ValueSet/observation-vitalsignresult" /> - </binding> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="CE/CNE/CWE" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CD" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> - </mapping> - <mapping> - <identity value="w5" /> - <map value="FiveWs.what[x]" /> - </mapping> - <mapping> - <identity value="sct-concept" /> - <map value="< 363787002 |Observable entity| OR < 386053000 |Evaluation procedure|" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX-3" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="code" /> - </mapping> - </element> - <element id="Observation.component.value[x]"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.component.value[x]" /> - <short value="Vital Sign Value recorded with UCUM" /> - <definition value="Vital Sign Value recorded with UCUM." /> - <comment value="Used when observation has a set of component observations. An observation may have both a value (e.g. an Apgar score) and component observations (the observations from which the Apgar score was derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value. For additional guidance, see the [Notes section](observation.html#notes) below." /> - <requirements value="9. SHALL contain exactly one [1..1] value with @xsi:type="PQ" (CONF:7305)." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Observation.component.value[x]" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="Quantity" /> - </type> - <type> - <code value="CodeableConcept" /> - </type> - <type> - <code value="string" /> - </type> - <type> - <code value="boolean" /> - </type> - <type> - <code value="integer" /> - </type> - <type> - <code value="Range" /> - </type> - <type> - <code value="Ratio" /> - </type> - <type> - <code value="SampledData" /> - </type> - <type> - <code value="time" /> - </type> - <type> - <code value="dateTime" /> - </type> - <type> - <code value="Period" /> - </type> - <condition value="ele-1" /> - <condition value="vs-3" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <constraint> - <key value="qty-3" /> - <severity value="error" /> - <human value="If a code for the unit is present, the system SHALL also be present" /> - <expression value="code.empty() or system.exists()" /> - <xpath value="not(exists(f:code)) or exists(f:system)" /> - <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> - </constraint> - <mustSupport value="true" /> - <isSummary value="true" /> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="VitalSignsUnits" /> - </extension> - <strength value="required" /> - <description value="Common UCUM units for recording Vital Signs." /> - <valueSet value="http://hl7.org/fhir/ValueSet/ucum-vitals-common|4.0.1" /> - </binding> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="SN (see also Range) or CQ" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> - </mapping> - <mapping> - <identity value="sct-concept" /> - <map value="363714003 |Interprets| < 441742003 |Evaluation finding|" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX.2, OBX.5, OBX.6" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="value" /> - </mapping> - <mapping> - <identity value="sct-attr" /> - <map value="363714003 |Interprets|" /> - </mapping> - </element> - <element id="Observation.component.dataAbsentReason"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.component.dataAbsentReason" /> - <short value="Why the component result is missing" /> - <definition value="Provides a reason why the expected value in the element Observation.component.value[x] is missing." /> - <comment value=""Null" or exceptional values can be represented two ways in FHIR Observations. One way is to simply include them in the value set and represent the exceptions in the value. For example, measurement values for a serology test could be "detected", "not detected", "inconclusive", or "test not done". The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values. For example, the dataAbsentReason code "error" could be used when the measurement was not completed. Because of these options, use-case agreements are required to interpret general observations for exceptional values." /> - <requirements value="For many results it is necessary to handle exceptional values in measurements." /> - <min value="0" /> - <max value="1" /> - <base> - <path value="Observation.component.dataAbsentReason" /> - <min value="0" /> - <max value="1" /> - </base> - <type> - <code value="CodeableConcept" /> - </type> - <condition value="ele-1" /> - <condition value="obs-6" /> - <condition value="vs-3" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <mustSupport value="true" /> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ObservationValueAbsentReason" /> - </extension> - <strength value="extensible" /> - <description value="Codes specifying why the result (`Observation.value[x]`) is missing." /> - <valueSet value="http://hl7.org/fhir/ValueSet/data-absent-reason" /> - </binding> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="CE/CNE/CWE" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CD" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="N/A" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="value.nullFlavor" /> - </mapping> - </element> - <element id="Observation.component.interpretation"> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> - <valueCode value="normative" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> - <valueCode value="4.0.0" /> - </extension> - <path value="Observation.component.interpretation" /> - <short value="High, low, normal, etc." /> - <definition value="A categorical assessment of an observation value. For example, high, low, normal." /> - <comment value="Historically used for laboratory results (known as 'abnormal flag' ), its use extends to other use cases where coded interpretations are relevant. Often reported as one or more simple compact codes this element is often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result." /> - <requirements value="For some results, particularly numeric results, an interpretation is necessary to fully understand the significance of a result." /> - <alias value="Abnormal Flag" /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Observation.component.interpretation" /> - <min value="0" /> - <max value="*" /> - </base> - <type> - <code value="CodeableConcept" /> - </type> - <condition value="ele-1" /> - <constraint> - <key value="ele-1" /> - <severity value="error" /> - <human value="All FHIR elements must have a @value or children" /> - <expression value="hasValue() or (children().count() > id.count())" /> - <xpath value="@value|f:*|h:div" /> - <source value="http://hl7.org/fhir/StructureDefinition/Element" /> - </constraint> - <binding> - <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> - <valueString value="ObservationInterpretation" /> - </extension> - <strength value="extensible" /> - <description value="Codes identifying interpretations of observations." /> - <valueSet value="http://hl7.org/fhir/ValueSet/observation-interpretation" /> - </binding> - <mapping> - <identity value="rim" /> - <map value="n/a" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="CE/CNE/CWE" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="CD" /> - </mapping> - <mapping> - <identity value="orim" /> - <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> - </mapping> - <mapping> - <identity value="sct-concept" /> - <map value="< 260245000 |Findings values|" /> - </mapping> - <mapping> - <identity value="v2" /> - <map value="OBX-8" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="interpretationCode" /> - </mapping> - <mapping> - <identity value="sct-attr" /> - <map value="363713009 |Has interpretation|" /> - </mapping> - </element> - <element id="Observation.component.referenceRange"> - <path value="Observation.component.referenceRange" /> - <short value="Provides guide for interpretation of component result" /> - <definition value="Guidance on how to interpret the value by comparison to a normal or recommended range." /> - <comment value="Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this might not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties." /> - <requirements value="Knowing what values are considered "normal" can help evaluate the significance of a particular result. Need to be able to provide multiple reference ranges for different contexts." /> - <min value="0" /> - <max value="*" /> - <base> - <path value="Observation.component.referenceRange" /> - <min value="0" /> - <max value="*" /> - </base> - <contentReference value="#Observation.referenceRange" /> - <mapping> - <identity value="v2" /> - <map value="OBX.7" /> - </mapping> - <mapping> - <identity value="rim" /> - <map value="outboundRelationship[typeCode=REFV]/target[classCode=OBS, moodCode=EVN]" /> - </mapping> - </element> - </snapshot> - <differential> - <element id="Observation.code.coding:HeartRateCodeSnomed"> - <path value="Observation.code.coding" /> - <sliceName value="HeartRateCodeSnomed" /> - <max value="1" /> - </element> - <element id="Observation.code.coding:HeartRateCodeSnomed.system"> - <path value="Observation.code.coding.system" /> - <min value="1" /> - <fixedUri value="http://snomed.info/sct" /> - </element> - <element id="Observation.code.coding:HeartRateCodeSnomed.code"> - <path value="Observation.code.coding.code" /> - <min value="1" /> - <fixedCode value="364075005" /> - </element> - </differential> +<StructureDefinition xmlns="http://hl7.org/fhir"> + <id value="gecco-observation-heart-rate" /> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-category"> + <valueString value="Clinical.Diagnostics" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category"> + <valueCode value="patient" /> + </extension> + <url value="https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate" /> + <version value="1.0.4" /> + <name value="HeartRate" /> + <title value="Heart Rate" /> + <status value="active" /> + <experimental value="false" /> + <date value="2021-05-17" /> + <publisher value="Charité" /> + <contact> + <telecom> + <system value="url" /> + <value value="https://www.bihealth.org/en/research/core-facilities/interoperability/" /> + </telecom> + </contact> + <description value="Heart rate of a patient" /> + <fhirVersion value="4.0.1" /> + <mapping> + <identity value="workflow" /> + <uri value="http://hl7.org/fhir/workflow" /> + <name value="Workflow Pattern" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <uri value="http://snomed.info/conceptdomain" /> + <name value="SNOMED CT Concept Domain Binding" /> + </mapping> + <mapping> + <identity value="v2" /> + <uri value="http://hl7.org/v2" /> + <name value="HL7 v2 Mapping" /> + </mapping> + <mapping> + <identity value="rim" /> + <uri value="http://hl7.org/v3" /> + <name value="RIM Mapping" /> + </mapping> + <mapping> + <identity value="w5" /> + <uri value="http://hl7.org/fhir/fivews" /> + <name value="FiveWs Pattern Mapping" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <uri value="http://snomed.org/attributebinding" /> + <name value="SNOMED CT Attribute Binding" /> + </mapping> + <kind value="resource" /> + <abstract value="false" /> + <type value="Observation" /> + <baseDefinition value="https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/vital-signs-base" /> + <derivation value="constraint" /> + <snapshot> + <element id="Observation"> + <path value="Observation" /> + <short value="Measurements and simple assertions" /> + <definition value="Measurements and simple assertions made about a patient, device or other subject." /> + <comment value="Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc. Other resources are used to provide context for observations such as laboratory reports, etc." /> + <alias value="Vital Signs" /> + <alias value="Measurement" /> + <alias value="Results" /> + <alias value="Tests" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation" /> + <min value="0" /> + <max value="*" /> + </base> + <constraint> + <key value="dom-2" /> + <severity value="error" /> + <human value="If the resource is contained in another resource, it SHALL NOT contain nested Resources" /> + <expression value="contained.contained.empty()" /> + <xpath value="not(parent::f:contained and f:contained)" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="dom-4" /> + <severity value="error" /> + <human value="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated" /> + <expression value="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()" /> + <xpath value="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="dom-3" /> + <severity value="error" /> + <human value="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 value="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 value="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 value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice"> + <valueBoolean value="true" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation"> + <valueMarkdown value="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." /> + </extension> + <key value="dom-6" /> + <severity value="warning" /> + <human value="A resource should have narrative for robust management" /> + <expression value="text.`div`.exists()" /> + <xpath value="exists(f:text/h:div)" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="dom-5" /> + <severity value="error" /> + <human value="If a resource is contained in another resource, it SHALL NOT have a security label" /> + <expression value="contained.meta.security.empty()" /> + <xpath value="not(exists(f:contained/*/f:meta/f:security))" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <constraint> + <key value="obs-7" /> + <severity value="error" /> + <human value="If Observation.code is the same as an Observation.component.code then the value element associated with the code SHALL NOT be present" /> + <expression value="value.empty() or component.code.where(coding.intersect(%resource.code.coding).exists()).empty()" /> + <xpath value="not(f:*[starts-with(local-name(.), 'value')] and (for $coding in f:code/f:coding return f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value] [f:system/@value=$coding/f:system/@value]))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <constraint> + <key value="obs-6" /> + <severity value="error" /> + <human value="dataAbsentReason SHALL only be present if Observation.value[x] is not present" /> + <expression value="dataAbsentReason.empty() or value.empty()" /> + <xpath value="not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <constraint> + <key value="vs-2" /> + <severity value="error" /> + <human value="If there is no component or hasMember element then either a value[x] or a data absent reason must be present." /> + <expression value="(component.empty() and hasMember.empty()) implies (dataAbsentReason.exists() or value.exists())" /> + <xpath value="f:component or f:memberOF or f:*[starts-with(local-name(.), 'value')] or f:dataAbsentReason" /> + <source value="https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/vital-signs-base" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="Entity. Role, or Act" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 363787002 |Observable entity|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Observation[classCode=OBS, moodCode=EVN]" /> + </mapping> + </element> + <element id="Observation.id"> + <path value="Observation.id" /> + <short value="Logical id of this artifact" /> + <definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <isSummary value="true" /> + </element> + <element id="Observation.meta"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.meta" /> + <short value="Metadata about the resource" /> + <definition value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.meta" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Meta" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.implicitRules"> + <path value="Observation.implicitRules" /> + <short value="A set of rules under which this content was created" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.implicitRules" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="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 value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.language"> + <path value="Observation.language" /> + <short value="Language of the resource content" /> + <definition value="The base language in which the resource is written." /> + <comment value="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 value="0" /> + <max value="1" /> + <base> + <path value="Resource.language" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet"> + <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="Language" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding"> + <valueBoolean value="true" /> + </extension> + <strength value="preferred" /> + <description value="A human language." /> + <valueSet value="http://hl7.org/fhir/ValueSet/languages" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.text" /> + <short value="Text summary of the resource, for human interpretation" /> + <definition value="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 value="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 value="narrative" /> + <alias value="html" /> + <alias value="xhtml" /> + <alias value="display" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="DomainResource.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Narrative" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Act.text?" /> + </mapping> + </element> + <element id="Observation.contained"> + <path value="Observation.contained" /> + <short value="Contained, inline Resources" /> + <definition value="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 value="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 value="inline resources" /> + <alias value="anonymous resources" /> + <alias value="contained resources" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.contained" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Resource" /> + </type> + <mapping> + <identity value="rim" /> + <map value="Entity. Role, or Act" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.modifierExtension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Extensions that cannot be ignored" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.identifier"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.identifier" /> + <short value="Business Identifier for observation" /> + <definition value="A unique identifier assigned to this observation." /> + <requirements value="Allows observations to be distinguished and referenced." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.identifier" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Identifier" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="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]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="Identifier" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.identifier" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.identifier" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.21 For OBX segments from systems without OBX-21 support a combination of ORC/OBR and OBX must be negotiated between trading partners to uniquely identify the OBX segment. Depending on how V2 has been implemented each of these may be an option: 1) OBR-3 + OBX-3 + OBX-4 or 2) OBR-3 + OBR-4 + OBX-3 + OBX-4 or 2) some other way to uniquely ID the OBR/ORC + OBX-3 + OBX-4." /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="id" /> + </mapping> + </element> + <element id="Observation.basedOn"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.basedOn" /> + <short value="Fulfills plan, proposal or order" /> + <definition value="A plan, proposal or order that is fulfilled in whole or in part by this event. For example, a MedicationRequest may require a patient to have laboratory test performed before it is dispensed." /> + <comment value="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." /> + <requirements value="Allows tracing of authorization for the event and tracking whether proposals/recommendations were acted upon." /> + <alias value="Fulfills" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.basedOn" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/CarePlan" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/DeviceRequest" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationRequest" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/NutritionOrder" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/ServiceRequest" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.basedOn" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="ORC" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".inboundRelationship[typeCode=COMP].source[moodCode=EVN]" /> + </mapping> + </element> + <element id="Observation.partOf"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.partOf" /> + <short value="Part of referenced event" /> + <definition value="A larger event of which this particular Observation is a component or step. For example, an observation as part of a procedure." /> + <comment value="To link an Observation to an Encounter use `encounter`. See the [Notes](observation.html#obsgrouping) below for guidance on referencing another Observation." /> + <alias value="Container" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.partOf" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationDispense" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationStatement" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Procedure" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Immunization" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImagingStudy" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.partOf" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Varies by domain" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".outboundRelationship[typeCode=FLFS].target" /> + </mapping> + </element> + <element id="Observation.status"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint"> + <valueString value="default: final" /> + </extension> + <path value="Observation.status" /> + <short value="registered | preliminary | final | amended +" /> + <definition value="The status of the result value." /> + <comment value="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." /> + <requirements value="Need to track the status of individual results. Some results are finalized before the whole report is finalized." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Observation.status" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isModifier value="true" /> + <isModifierReason value="This element is labeled 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 value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationStatus" /> + </extension> + <strength value="required" /> + <description value="Codes providing the status of an observation." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-status|4.0.1" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.status" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.status" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 445584004 |Report by finality status|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-11" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="status Amended & Final are differentiated by whether it is the subject of a ControlAct event with a type of "revise"" /> + </mapping> + </element> + <element id="Observation.category"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.category" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Classification of type of observation" /> + <definition value="A code that classifies the general type of observation being made." /> + <comment value="In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once. The level of granularity is defined by the category concepts in the value set." /> + <requirements value="Used for filtering what observations are retrieved and displayed." /> + <min value="1" /> + <max value="*" /> + <base> + <path value="Observation.category" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationCategory" /> + </extension> + <strength value="preferred" /> + <description value="Codes for high level observation categories." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-category" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.class" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".outboundRelationship[typeCode="COMP].target[classCode="LIST", moodCode="EVN"].code" /> + </mapping> + </element> + <element id="Observation.category:vs-cat"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.category" /> + <sliceName value="vs-cat" /> + <short value="Classification of type of observation" /> + <definition value="A code that classifies the general type of observation being made." /> + <comment value="In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once. The level of granularity is defined by the category concepts in the value set." /> + <requirements value="Used for filtering what observations are retrieved and displayed." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Observation.category" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <patternCodeableConcept> + <coding> + <system value="http://terminology.hl7.org/CodeSystem/observation-category" /> + <code value="vital-signs" /> + </coding> + </patternCodeableConcept> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationCategory" /> + </extension> + <strength value="preferred" /> + <description value="Codes for high level observation categories." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-category" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.class" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".outboundRelationship[typeCode="COMP].target[classCode="LIST", moodCode="EVN"].code" /> + </mapping> + </element> + <element id="Observation.code"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.code" /> + <short value="Heart Rate" /> + <definition value="Heart Rate" /> + <comment value="Additional codes that translate or map to this code are allowed. For example a more granular LOINC code or code that is used locally in a system." /> + <requirements value="Knowing what kind of observation is being made is essential to understanding the observation." /> + <alias value="Name" /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Observation.code" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationCode" /> + </extension> + <strength value="example" /> + <description value="Codes identifying names of simple observations." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-codes" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.code" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.what[x]" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 363787002 |Observable entity| OR < 386053000 |Evaluation procedure|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="code" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="116680003 |Is a|" /> + </mapping> + </element> + <element id="Observation.code.id"> + <path value="Observation.code.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.code.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.code.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.code.coding"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.code.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Observation.code.coding:loinc"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.code.coding" /> + <sliceName value="loinc" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="1" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="http://loinc.org" /> + <code value="8867-4" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Observation.code.coding:loinc.id"> + <path value="Observation.code.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.code.coding:loinc.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.code.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.code.coding:loinc.system"> + <path value="Observation.code.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Observation.code.coding:loinc.version"> + <path value="Observation.code.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Observation.code.coding:loinc.code"> + <path value="Observation.code.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Observation.code.coding:loinc.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Observation.code.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Observation.code.coding:loinc.userSelected"> + <path value="Observation.code.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Observation.code.coding:snomed"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.code.coding" /> + <sliceName value="snomed" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comment value="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 value="Allows for alternative encodings within a code system, and translations to other code systems." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <patternCoding> + <system value="http://snomed.info/sct" /> + <code value="364075005" /> + </patternCoding> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element id="Observation.code.coding:snomed.id"> + <path value="Observation.code.coding.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.code.coding:snomed.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.code.coding.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.code.coding:snomed.system"> + <path value="Observation.code.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comment value="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 value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element id="Observation.code.coding:snomed.version"> + <path value="Observation.code.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element id="Observation.code.coding:snomed.code"> + <path value="Observation.code.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="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 value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element id="Observation.code.coding:snomed.display"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Observation.code.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element id="Observation.code.coding:snomed.userSelected"> + <path value="Observation.code.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)." /> + <comment value="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 value="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 value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="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 ]" /> + </mapping> + </element> + <element id="Observation.code.text"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Observation.code.text" /> + <short value="Plain text representation of the concept" /> + <definition value="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 value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="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 value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element id="Observation.subject"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.subject" /> + <short value="Who and/or what the observation is about" /> + <definition value="The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation." /> + <comment value="One would expect this element to be a cardinality of 1..1. The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated." /> + <requirements value="Observations have no value if you don't know who or what they're about." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Observation.subject" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.subject" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.subject[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="participation[typeCode=RTGT]" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.subject" /> + </mapping> + </element> + <element id="Observation.focus"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="trial-use" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.focus" /> + <short value="What the observation is about, when it is not about the subject of record" /> + <definition value="The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record. The focus of an observation could also be an existing condition, an intervention, the subject's diet, another observation of the subject, or a body structure such as tumor or implanted device. An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus." /> + <comment value="Typically, an observation is made about the subject - a patient, or group of patients, location, or device - and the distinction between the subject and what is directly measured for an observation is specified in the observation code itself ( e.g., "Blood Glucose") and does not need to be represented separately using this element. Use `specimen` if a reference to a specimen is required. If a code is required instead of a resource use either `bodysite` for bodysites or the standard extension [focusCode](extension-observation-focuscode.html)." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.focus" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.subject[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="participation[typeCode=SBJ]" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.subject" /> + </mapping> + </element> + <element id="Observation.encounter"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.encounter" /> + <short value="Healthcare event during which this observation is made" /> + <definition value="The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made." /> + <comment value="This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter (e.g. pre-admission laboratory tests)." /> + <requirements value="For some observations it may be important to know the link between an observation and a particular encounter." /> + <alias value="Context" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.encounter" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Encounter" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.context" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.context" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PV1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN]" /> + </mapping> + </element> + <element id="Observation.effective[x]"> + <path value="Observation.effective[x]" /> + <slicing> + <discriminator> + <type value="type" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <short value="Often just a dateTime for vital signs" /> + <definition value="Often just a dateTime for vital signs." /> + <comment value="At least a date should be present unless this observation is a historical report. For recording imprecise or "fuzzy" times (For example, a blood glucose measurement taken "after breakfast") use the [Timing](datatypes.html#timing) datatype which allow the measurement to be tied to regular life events." /> + <requirements value="Knowing when an observation was deemed true is important to its relevance as well as determining trends." /> + <alias value="Occurrence" /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Observation.effective[x]" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.occurrence[x]" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.done[x]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-14, and/or OBX-19 after v2.4 (depends on who observation made)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="effectiveTime" /> + </mapping> + </element> + <element id="Observation.issued"> + <path value="Observation.issued" /> + <short value="Date/Time this version was made available" /> + <definition value="The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified." /> + <comment value="For Observations that don’t require review and verification, it may be the same as the [`lastUpdated` ](resource-definitions.html#Meta.lastUpdated) time of the resource itself. For Observations that do require review and verification for certain updates, it might not be the same as the `lastUpdated` time of the resource itself due to a non-clinically significant update that doesn’t require the new version to be reviewed and verified again." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.issued" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="instant" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.recorded" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBR.22 (or MSH.7), or perhaps OBX-19 (depends on who observation made)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="participation[typeCode=AUT].time" /> + </mapping> + </element> + <element id="Observation.performer"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.performer" /> + <short value="Who is responsible for the observation" /> + <definition value="Who was responsible for asserting the observed value as "true"." /> + <comment value="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." /> + <requirements value="May give a degree of confidence in the observation and also indicates where follow-up questions should be directed." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.performer" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/CareTeam" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="workflow" /> + <map value="Event.performer.actor" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.actor" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.15 / (Practitioner) OBX-16, PRT-5:PRT-4='RO' / (Device) OBX-18 , PRT-10:PRT-4='EQUIP' / (Organization) OBX-23, PRT-8:PRT-4='PO'" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="participation[typeCode=PRF]" /> + </mapping> + </element> + <element id="Observation.value[x]"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.value[x]" /> + <slicing> + <discriminator> + <type value="type" /> + <path value="$this" /> + </discriminator> + <ordered value="false" /> + <rules value="open" /> + </slicing> + <short value="Vital Signs value are recorded using the Quantity data type. For supporting observations such as Cuff size could use other datatypes such as CodeableConcept." /> + <definition value="Vital Signs value are recorded using the Quantity data type. For supporting observations such as Cuff size could use other datatypes such as CodeableConcept." /> + <comment value="An observation may have; 1) a single value here, 2) both a value and a set of related or component values, or 3) only a set of related or component values. If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value. For additional guidance, see the [Notes section](observation.html#notes) below." /> + <requirements value="9. SHALL contain exactly one [1..1] value with @xsi:type="PQ" (CONF:7305)." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.value[x]" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Quantity" /> + </type> + <condition value="ele-1" /> + <condition value="obs-7" /> + <condition value="vs-2" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 441742003 |Evaluation finding|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.2, OBX.5, OBX.6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="363714003 |Interprets|" /> + </mapping> + </element> + <element id="Observation.value[x]:valueQuantity"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.value[x]" /> + <sliceName value="valueQuantity" /> + <short value="Vital Signs value are recorded using the Quantity data type. For supporting observations such as Cuff size could use other datatypes such as CodeableConcept." /> + <definition value="Vital Signs value are recorded using the Quantity data type. For supporting observations such as Cuff size could use other datatypes such as CodeableConcept." /> + <comment value="An observation may have; 1) a single value here, 2) both a value and a set of related or component values, or 3) only a set of related or component values. If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value. For additional guidance, see the [Notes section](observation.html#notes) below." /> + <requirements value="9. SHALL contain exactly one [1..1] value with @xsi:type="PQ" (CONF:7305)." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.value[x]" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Quantity" /> + </type> + <condition value="ele-1" /> + <condition value="obs-7" /> + <condition value="vs-2" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 441742003 |Evaluation finding|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.2, OBX.5, OBX.6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="363714003 |Interprets|" /> + </mapping> + </element> + <element id="Observation.value[x]:valueQuantity.id"> + <path value="Observation.value[x].id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.value[x]:valueQuantity.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.value[x].extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.value[x]:valueQuantity.value"> + <path value="Observation.value[x].value" /> + <short value="Numerical value (with implicit precision)" /> + <definition value="The value of the measured amount. The value includes an implicit precision in the presentation of the value." /> + <comment value="The implicit precision in the value should always be honored. Monetary values have their own rules for handling precision (refer to standard accounting text books)." /> + <requirements value="Precision is handled implicitly in almost all cases of measurement." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Quantity.value" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="decimal" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN.2 / CQ - N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value" /> + </mapping> + </element> + <element id="Observation.value[x]:valueQuantity.comparator"> + <path value="Observation.value[x].comparator" /> + <short value="< | <= | >= | > - how to understand the value" /> + <definition value="How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="Need a framework for handling measures where the value is <5ug/L or >400mg/L due to the limitations of measuring methodology." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Quantity.comparator" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <meaningWhenMissing value="If there is no comparator, then there is no modification of the value" /> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="This is labeled as "Is Modifier" because the comparator modifies the interpretation of the value significantly. If there is no comparator, then there is no modification of the value" /> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="QuantityComparator" /> + </extension> + <strength value="required" /> + <description value="How the Quantity should be understood and represented." /> + <valueSet value="http://hl7.org/fhir/ValueSet/quantity-comparator|4.0.1" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN.1 / CQ.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL properties" /> + </mapping> + </element> + <element id="Observation.value[x]:valueQuantity.unit"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable"> + <valueBoolean value="true" /> + </extension> + <path value="Observation.value[x].unit" /> + <short value="Unit representation" /> + <definition value="A human-readable form of the unit." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <requirements value="There are many representations for units of measure and in many contexts, particular representations are fixed and required. I.e. mcg for micrograms." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Quantity.unit" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="(see OBX.6 etc.) / CQ.2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ.unit" /> + </mapping> + </element> + <element id="Observation.value[x]:valueQuantity.system"> + <path value="Observation.value[x].system" /> + <short value="System that defines coded unit form" /> + <definition value="The identification of the system that provides the coded form of the unit." /> + <comment value="see http://en.wikipedia.org/wiki/Uniform_resource_identifier" /> + <requirements value="Need to know the system that defines the coded form of the unit." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Quantity.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <patternUri value="http://unitsofmeasure.org" /> + <condition value="ele-1" /> + <condition value="qty-3" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="(see OBX.6 etc.) / CQ.2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CO.codeSystem, PQ.translation.codeSystem" /> + </mapping> + </element> + <element id="Observation.value[x]:valueQuantity.code"> + <path value="Observation.value[x].code" /> + <short value="Coded form of the unit" /> + <definition value="A computer processable form of the unit in some unit representation system." /> + <comment value="The preferred system is UCUM, but SNOMED CT can also be used (for customary units) or ISO 4217 for currency. The context of use may additionally require a code from a particular system." /> + <requirements value="Need a computable form of the unit that is fixed across all forms. UCUM provides this for quantities, but SNOMED CT provides many units of interest." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Quantity.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <patternCode value="/min" /> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="(see OBX.6 etc.) / CQ.2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ.code, MO.currency, PQ.translation.code" /> + </mapping> + </element> + <element id="Observation.dataAbsentReason"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.dataAbsentReason" /> + <short value="Why the result is missing" /> + <definition value="Provides a reason why the expected value in the element Observation.value[x] is missing." /> + <comment value="Null or exceptional values can be represented two ways in FHIR Observations. One way is to simply include them in the value set and represent the exceptions in the value. For example, measurement values for a serology test could be "detected", "not detected", "inconclusive", or "specimen unsatisfactory". The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values. For example, the dataAbsentReason code "error" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0. Because of these options, use-case agreements are required to interpret general observations for null or exceptional values." /> + <requirements value="For many results it is necessary to handle exceptional values in measurements." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.dataAbsentReason" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <condition value="obs-6" /> + <condition value="vs-2" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mustSupport value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationValueAbsentReason" /> + </extension> + <strength value="extensible" /> + <description value="Codes specifying why the result (`Observation.value[x]`) is missing." /> + <valueSet value="http://hl7.org/fhir/ValueSet/data-absent-reason" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value.nullFlavor" /> + </mapping> + </element> + <element id="Observation.interpretation"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.interpretation" /> + <short value="High, low, normal, etc." /> + <definition value="A categorical assessment of an observation value. For example, high, low, normal." /> + <comment value="Historically used for laboratory results (known as 'abnormal flag' ), its use extends to other use cases where coded interpretations are relevant. Often reported as one or more simple compact codes this element is often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result." /> + <requirements value="For some results, particularly numeric results, an interpretation is necessary to fully understand the significance of a result." /> + <alias value="Abnormal Flag" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.interpretation" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationInterpretation" /> + </extension> + <strength value="extensible" /> + <description value="Codes identifying interpretations of observations." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-interpretation" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 260245000 |Findings values|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-8" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="interpretationCode" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="363713009 |Has interpretation|" /> + </mapping> + </element> + <element id="Observation.note"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.note" /> + <short value="Comments about the observation" /> + <definition value="Comments about the observation or the results." /> + <comment value="May include general statements about the observation, or statements about significant, unexpected or unreliable results values, or information about its source when relevant to its interpretation." /> + <requirements value="Need to be able to provide free text additional information." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.note" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Annotation" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Act" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="NTE.3 (partner NTE to OBX, or sometimes another (child?) OBX)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="subjectOf.observationEvent[code="annotation"].value" /> + </mapping> + </element> + <element id="Observation.bodySite"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.bodySite" /> + <short value="Observed body part" /> + <definition value="Indicates the site on the subject's body where the observation was made (i.e. the target site)." /> + <comment value="Only used if not implicit in code found in Observation.code. In many systems, this may be represented as a related observation instead of an inline component. If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ bodySite](extension-bodysite.html)." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.bodySite" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="BodySite" /> + </extension> + <strength value="example" /> + <description value="Codes describing anatomical locations. May include laterality." /> + <valueSet value="http://hl7.org/fhir/ValueSet/body-site" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 123037004 |Body structure|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-20" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="targetSiteCode" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="718497002 |Inherent location|" /> + </mapping> + </element> + <element id="Observation.method"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.method" /> + <short value="How it was done" /> + <definition value="Indicates the mechanism used to perform the observation." /> + <comment value="Only used if not implicit in code for Observation.code." /> + <requirements value="In some cases, method can impact results and is thus used for determining whether results can be compared or determining significance of results." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.method" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationMethod" /> + </extension> + <strength value="example" /> + <description value="Methods for simple observations." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-methods" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-17" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="methodCode" /> + </mapping> + </element> + <element id="Observation.specimen"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.specimen" /> + <short value="Specimen used for this observation" /> + <definition value="The specimen that was used when this observation was made." /> + <comment value="Should only be used if not implicit in code found in `Observation.code`. Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report)." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.specimen" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Specimen" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 123038009 |Specimen|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SPM segment" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="participation[typeCode=SPC].specimen" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="704319004 |Inherent in|" /> + </mapping> + </element> + <element id="Observation.device"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.device" /> + <short value="(Measurement) Device" /> + <definition value="The device used to generate the observation data." /> + <comment value="Note that this is not meant to represent a device involved in the transmission of the result, e.g., a gateway. Such devices may be documented using the Provenance resource where relevant." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.device" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/DeviceMetric" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 49062001 |Device|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-17 / PRT -10" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="participation[typeCode=DEV]" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="424226004 |Using device|" /> + </mapping> + </element> + <element id="Observation.referenceRange"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange" /> + <short value="Provides guide for interpretation" /> + <definition value="Guidance on how to interpret the value by comparison to a normal or recommended range. Multiple reference ranges are interpreted as an "OR". In other words, to represent two distinct target populations, two `referenceRange` elements would be used." /> + <comment value="Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this might not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties." /> + <requirements value="Knowing what values are considered "normal" can help evaluate the significance of a particular result. Need to be able to provide multiple reference ranges for different contexts." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.referenceRange" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="obs-3" /> + <severity value="error" /> + <human value="Must have at least a low or a high or text" /> + <expression value="low.exists() or high.exists() or text.exists()" /> + <xpath value="(exists(f:low) or exists(f:high)or exists(f:text))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="outboundRelationship[typeCode=REFV]/target[classCode=OBS, moodCode=EVN]" /> + </mapping> + </element> + <element id="Observation.referenceRange.id"> + <path value="Observation.referenceRange.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.referenceRange.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.referenceRange.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.referenceRange.low"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange.low" /> + <short value="Low Range, if relevant" /> + <definition value="The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3)." /> + <comment value="The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.referenceRange.low" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Quantity" /> + <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity" /> + </type> + <condition value="ele-1" /> + <condition value="obs-3" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <constraint> + <key value="sqty-1" /> + <severity value="error" /> + <human value="The comparator is not used on a SimpleQuantity" /> + <expression value="comparator.empty()" /> + <xpath value="not(exists(f:comparator))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isModifier value="false" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value:IVL_PQ.low" /> + </mapping> + </element> + <element id="Observation.referenceRange.high"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange.high" /> + <short value="High Range, if relevant" /> + <definition value="The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3)." /> + <comment value="The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.referenceRange.high" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Quantity" /> + <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity" /> + </type> + <condition value="ele-1" /> + <condition value="obs-3" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <constraint> + <key value="sqty-1" /> + <severity value="error" /> + <human value="The comparator is not used on a SimpleQuantity" /> + <expression value="comparator.empty()" /> + <xpath value="not(exists(f:comparator))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isModifier value="false" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value:IVL_PQ.high" /> + </mapping> + </element> + <element id="Observation.referenceRange.type"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange.type" /> + <short value="Reference range qualifier" /> + <definition value="Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range." /> + <comment value="This SHOULD be populated if there is more than one range. If this element is not present then the normal range is assumed." /> + <requirements value="Need to be able to say what kind of reference range this is - normal, recommended, therapeutic, etc., - for proper interpretation." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.referenceRange.type" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationRangeMeaning" /> + </extension> + <strength value="preferred" /> + <description value="Code for the meaning of a reference range." /> + <valueSet value="http://hl7.org/fhir/ValueSet/referencerange-meaning" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 260245000 |Findings values| OR < 365860008 |General clinical state finding| OR < 250171008 |Clinical history or observation findings| OR < 415229000 |Racial group| OR < 365400002 |Finding of puberty stage| OR < 443938003 |Procedure carried out on subject|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-10" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="interpretationCode" /> + </mapping> + </element> + <element id="Observation.referenceRange.appliesTo"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange.appliesTo" /> + <short value="Reference range population" /> + <definition value="Codes to indicate the target population this reference range applies to. For example, a reference range may be based on the normal population or a particular sex or race. Multiple `appliesTo` are interpreted as an "AND" of the target populations. For example, to represent a target population of African American females, both a code of female and a code for African American would be used." /> + <comment value="This SHOULD be populated if there is more than one range. If this element is not present then the normal population is assumed." /> + <requirements value="Need to be able to identify the target population for proper interpretation." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.referenceRange.appliesTo" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationRangeType" /> + </extension> + <strength value="example" /> + <description value="Codes identifying the population the reference range applies to." /> + <valueSet value="http://hl7.org/fhir/ValueSet/referencerange-appliesto" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 260245000 |Findings values| OR < 365860008 |General clinical state finding| OR < 250171008 |Clinical history or observation findings| OR < 415229000 |Racial group| OR < 365400002 |Finding of puberty stage| OR < 443938003 |Procedure carried out on subject|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-10" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="interpretationCode" /> + </mapping> + </element> + <element id="Observation.referenceRange.age"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.referenceRange.age" /> + <short value="Applicable age range, if relevant" /> + <definition value="The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so." /> + <comment value="The stated low and high value are assumed to have arbitrarily high precision when it comes to determining which values are in the range. I.e. 1.99 is not in the range 2 -> 3." /> + <requirements value="Some analytes vary greatly over age." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.referenceRange.age" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Range" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="rng-2" /> + <severity value="error" /> + <human value="If present, low SHALL have a lower value than high" /> + <expression value="low.empty() or high.empty() or (low <= high)" /> + <xpath value="not(exists(f:low/f:value/@value)) or not(exists(f:high/f:value/@value)) or (number(f:low/f:value/@value) <= number(f:high/f:value/@value))" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="NR and also possibly SN (but see also quantity)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<QTY[not(type="TS")]> [lowClosed="true" and highClosed="true"]or URG<QTY[not(type="TS")]>" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="outboundRelationship[typeCode=PRCN].targetObservationCriterion[code="age"].value" /> + </mapping> + </element> + <element id="Observation.referenceRange.text"> + <path value="Observation.referenceRange.text" /> + <short value="Text based reference range in an observation" /> + <definition value="Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of "Negative" or a list or table of "normals"." /> + <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.referenceRange.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value:ST" /> + </mapping> + </element> + <element id="Observation.hasMember"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.hasMember" /> + <short value="Used when reporting vital signs panel components" /> + <definition value="Used when reporting vital signs panel components." /> + <comment value="When using this element, an observation will typically have either a value or a set of related resources, although both may be present in some cases. For a discussion on the ways Observations can assembled in groups together, see [Notes](observation.html#obsgrouping) below. Note that a system may calculate results from [QuestionnaireResponse](questionnaireresponse.html) into a final score and represent the score as an Observation." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.hasMember" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/MolecularSequence" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Relationships established by OBX-4 usage" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="outBoundRelationship" /> + </mapping> + </element> + <element id="Observation.derivedFrom"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.derivedFrom" /> + <short value="Related measurements the observation is made from" /> + <definition value="The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image." /> + <comment value="All the reference choices that are listed in this element can represent clinical observations and other measurements that may be the source for a derived value. The most common reference will be another Observation. For a discussion on the ways Observations can assembled in groups together, see [Notes](observation.html#obsgrouping) below." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.derivedFrom" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/DocumentReference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImagingStudy" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Media" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/MolecularSequence" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a contained resource if a local reference is provided" /> + <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" /> + <xpath value="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 value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Relationships established by OBX-4 usage" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".targetObservation" /> + </mapping> + </element> + <element id="Observation.component"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component" /> + <short value="Component results" /> + <definition value="Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations." /> + <comment value="For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below." /> + <requirements value="Component observations share the same attributes in the Observation resource as the primary observation and are always treated a part of a single observation (they are not separable). However, the reference range for the primary observation value is not inherited by the component values and is required when appropriate for each component observation." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.component" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="containment by OBX-4?" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="outBoundRelationship[typeCode=COMP]" /> + </mapping> + </element> + <element id="Observation.component.id"> + <path value="Observation.component.id" /> + <representation value="xmlAttr" /> + <short value="Unique id for inter-element referencing" /> + <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> + <valueUrl value="string" /> + </extension> + <code value="http://hl7.org/fhirpath/System.String" /> + </type> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element id="Observation.component.extension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.extension" /> + <slicing> + <discriminator> + <type value="value" /> + <path value="url" /> + </discriminator> + <description value="Extensions are always sliced by (at least) url" /> + <rules value="open" /> + </slicing> + <short value="Additional content defined by implementations" /> + <definition value="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 value="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 value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.component.modifierExtension"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.modifierExtension" /> + <short value="Extensions that cannot be ignored even if unrecognized" /> + <definition value="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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." /> + <comment value="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 value="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 value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="ext-1" /> + <severity value="error" /> + <human value="Must have either extensions or value[x], not both" /> + <expression value="extension.exists() != value.exists()" /> + <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" /> + <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" /> + </constraint> + <isModifier value="true" /> + <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element id="Observation.component.code"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.code" /> + <short value="Type of component observation (code / type)" /> + <definition value="Describes what was observed. Sometimes this is called the observation "code"." /> + <comment value="*All* code-value and component.code-component.value pairs need to be taken into account to correctly understand the meaning of the observation." /> + <requirements value="Knowing what kind of observation is being made is essential to understanding the observation." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Observation.component.code" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <isSummary value="true" /> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationCode" /> + </extension> + <strength value="example" /> + <description value="Codes identifying names of simple observations." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-codes" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="FiveWs.what[x]" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 363787002 |Observable entity| OR < 386053000 |Evaluation procedure|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="code" /> + </mapping> + </element> + <element id="Observation.component.value[x]"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.value[x]" /> + <short value="Actual component result" /> + <definition value="The information determined as a result of making the observation, if the information has a simple value." /> + <comment value="Used when observation has a set of component observations. An observation may have both a value (e.g. an Apgar score) and component observations (the observations from which the Apgar score was derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value. For additional guidance, see the [Notes section](observation.html#notes) below." /> + <requirements value="An observation exists to have a value, though it might not if it is in error, or if it represents a group of observations." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.component.value[x]" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Quantity" /> + </type> + <type> + <code value="CodeableConcept" /> + </type> + <type> + <code value="string" /> + </type> + <type> + <code value="boolean" /> + </type> + <type> + <code value="integer" /> + </type> + <type> + <code value="Range" /> + </type> + <type> + <code value="Ratio" /> + </type> + <type> + <code value="SampledData" /> + </type> + <type> + <code value="time" /> + </type> + <type> + <code value="dateTime" /> + </type> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <constraint> + <key value="qty-3" /> + <severity value="error" /> + <human value="If a code for the unit is present, the system SHALL also be present" /> + <expression value="code.empty() or system.exists()" /> + <xpath value="not(exists(f:code)) or exists(f:system)" /> + <source value="http://hl7.org/fhir/StructureDefinition/Observation" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="SN (see also Range) or CQ" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="PQ, IVL<PQ>, MO, CO, depending on the values" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="363714003 |Interprets| < 441742003 |Evaluation finding|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX.2, OBX.5, OBX.6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="363714003 |Interprets|" /> + </mapping> + </element> + <element id="Observation.component.dataAbsentReason"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.dataAbsentReason" /> + <short value="Why the component result is missing" /> + <definition value="Provides a reason why the expected value in the element Observation.component.value[x] is missing." /> + <comment value=""Null" or exceptional values can be represented two ways in FHIR Observations. One way is to simply include them in the value set and represent the exceptions in the value. For example, measurement values for a serology test could be "detected", "not detected", "inconclusive", or "test not done". The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values. For example, the dataAbsentReason code "error" could be used when the measurement was not completed. Because of these options, use-case agreements are required to interpret general observations for exceptional values." /> + <requirements value="For many results it is necessary to handle exceptional values in measurements." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Observation.component.dataAbsentReason" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <condition value="obs-6" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationValueAbsentReason" /> + </extension> + <strength value="extensible" /> + <description value="Codes specifying why the result (`Observation.value[x]`) is missing." /> + <valueSet value="http://hl7.org/fhir/ValueSet/data-absent-reason" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="value.nullFlavor" /> + </mapping> + </element> + <element id="Observation.component.interpretation"> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> + <valueCode value="normative" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> + <valueCode value="4.0.0" /> + </extension> + <path value="Observation.component.interpretation" /> + <short value="High, low, normal, etc." /> + <definition value="A categorical assessment of an observation value. For example, high, low, normal." /> + <comment value="Historically used for laboratory results (known as 'abnormal flag' ), its use extends to other use cases where coded interpretations are relevant. Often reported as one or more simple compact codes this element is often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result." /> + <requirements value="For some results, particularly numeric results, an interpretation is necessary to fully understand the significance of a result." /> + <alias value="Abnormal Flag" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.component.interpretation" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <expression value="hasValue() or (children().count() > id.count())" /> + <xpath value="@value|f:*|h:div" /> + <source value="http://hl7.org/fhir/StructureDefinition/Element" /> + </constraint> + <binding> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"> + <valueString value="ObservationInterpretation" /> + </extension> + <strength value="extensible" /> + <description value="Codes identifying interpretations of observations." /> + <valueSet value="http://hl7.org/fhir/ValueSet/observation-interpretation" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="sct-concept" /> + <map value="< 260245000 |Findings values|" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-8" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="interpretationCode" /> + </mapping> + <mapping> + <identity value="sct-attr" /> + <map value="363713009 |Has interpretation|" /> + </mapping> + </element> + <element id="Observation.component.referenceRange"> + <path value="Observation.component.referenceRange" /> + <short value="Provides guide for interpretation of component result" /> + <definition value="Guidance on how to interpret the value by comparison to a normal or recommended range." /> + <comment value="Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this might not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties." /> + <requirements value="Knowing what values are considered "normal" can help evaluate the significance of a particular result. Need to be able to provide multiple reference ranges for different contexts." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Observation.component.referenceRange" /> + <min value="0" /> + <max value="*" /> + </base> + <contentReference value="#Observation.referenceRange" /> + <mapping> + <identity value="v2" /> + <map value="OBX.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="outboundRelationship[typeCode=REFV]/target[classCode=OBS, moodCode=EVN]" /> + </mapping> + </element> + </snapshot> + <differential> + <element id="Observation.code"> + <path value="Observation.code" /> + <short value="Heart Rate" /> + <definition value="Heart Rate" /> + <comment value="Additional codes that translate or map to this code are allowed. For example a more granular LOINC code or code that is used locally in a system." /> + </element> + <element id="Observation.code.coding"> + <path value="Observation.code.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + <min value="1" /> + </element> + <element id="Observation.code.coding:loinc"> + <path value="Observation.code.coding" /> + <sliceName value="loinc" /> + <min value="1" /> + <max value="*" /> + <patternCoding> + <system value="http://loinc.org" /> + <code value="8867-4" /> + </patternCoding> + </element> + <element id="Observation.code.coding:loinc.system"> + <path value="Observation.code.coding.system" /> + <min value="1" /> + </element> + <element id="Observation.code.coding:loinc.code"> + <path value="Observation.code.coding.code" /> + <min value="1" /> + </element> + <element id="Observation.code.coding:snomed"> + <path value="Observation.code.coding" /> + <sliceName value="snomed" /> + <min value="0" /> + <max value="*" /> + <patternCoding> + <system value="http://snomed.info/sct" /> + <code value="364075005" /> + </patternCoding> + </element> + <element id="Observation.code.coding:snomed.system"> + <path value="Observation.code.coding.system" /> + <min value="1" /> + </element> + <element id="Observation.code.coding:snomed.code"> + <path value="Observation.code.coding.code" /> + <min value="1" /> + </element> + <element id="Observation.value[x]"> + <path value="Observation.value[x]" /> + <slicing> + <discriminator> + <type value="type" /> + <path value="$this" /> + </discriminator> + <ordered value="false" /> + <rules value="open" /> + </slicing> + <type> + <code value="Quantity" /> + </type> + <mustSupport value="true" /> + </element> + <element id="Observation.valueQuantity"> + <path value="Observation.valueQuantity" /> + <min value="0" /> + <max value="1" /> + </element> + <element id="Observation.valueQuantity.value"> + <path value="Observation.valueQuantity.value" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Observation.valueQuantity.unit"> + <path value="Observation.valueQuantity.unit" /> + <min value="1" /> + <mustSupport value="true" /> + </element> + <element id="Observation.valueQuantity.system"> + <path value="Observation.valueQuantity.system" /> + <min value="1" /> + <patternUri value="http://unitsofmeasure.org" /> + <mustSupport value="true" /> + </element> + <element id="Observation.valueQuantity.code"> + <path value="Observation.valueQuantity.code" /> + <min value="1" /> + <patternCode value="/min" /> + <mustSupport value="true" /> + </element> + <element id="Observation.dataAbsentReason"> + <path value="Observation.dataAbsentReason" /> + <mustSupport value="true" /> + </element> + </differential> </StructureDefinition> \ No newline at end of file diff --git a/src/test/resources/Observation/create-heart-rate-loinc-datetime.json b/src/test/resources/Observation/create-heart-rate-loinc-datetime.json index e52746a95..868d798b3 100755 --- a/src/test/resources/Observation/create-heart-rate-loinc-datetime.json +++ b/src/test/resources/Observation/create-heart-rate-loinc-datetime.json @@ -3,7 +3,7 @@ "id": "heart-rate", "meta": { "profile": [ - "http://hl7.org/fhir/StructureDefinition/heartrate" + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate" ] }, "status": "final", diff --git a/src/test/resources/Observation/create-heart-rate-loinc-period.json b/src/test/resources/Observation/create-heart-rate-loinc-period.json index eaeba3542..a9282d4fb 100755 --- a/src/test/resources/Observation/create-heart-rate-loinc-period.json +++ b/src/test/resources/Observation/create-heart-rate-loinc-period.json @@ -3,7 +3,7 @@ "id": "heart-rate", "meta": { "profile": [ - "http://hl7.org/fhir/StructureDefinition/heartrate" + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate" ] }, "status": "final", diff --git a/src/test/resources/Observation/create-heart-rate-loinc-period_2.json b/src/test/resources/Observation/create-heart-rate-loinc-period_2.json index 57f7052d2..bf1a509f8 100755 --- a/src/test/resources/Observation/create-heart-rate-loinc-period_2.json +++ b/src/test/resources/Observation/create-heart-rate-loinc-period_2.json @@ -3,7 +3,7 @@ "id": "heart-rate", "meta": { "profile": [ - "http://hl7.org/fhir/StructureDefinition/heartrate" + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate" ] }, "status": "final", diff --git a/src/test/resources/Observation/create-heart-rate-snomed-datetime.json b/src/test/resources/Observation/create-heart-rate-snomed-datetime.json index b7083f60a..bd05e64cb 100755 --- a/src/test/resources/Observation/create-heart-rate-snomed-datetime.json +++ b/src/test/resources/Observation/create-heart-rate-snomed-datetime.json @@ -3,7 +3,7 @@ "id": "heart-rate", "meta": { "profile": [ - "http://hl7.org/fhir/StructureDefinition/heartrate" + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate" ] }, "status": "final", diff --git a/src/test/resources/Observation/create-heart-rate-snomed-period.json b/src/test/resources/Observation/create-heart-rate-snomed-period.json index 2c6594ac8..565677a28 100755 --- a/src/test/resources/Observation/create-heart-rate-snomed-period.json +++ b/src/test/resources/Observation/create-heart-rate-snomed-period.json @@ -3,7 +3,7 @@ "id": "heart-rate", "meta": { "profile": [ - "http://hl7.org/fhir/StructureDefinition/heartrate" + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate" ] }, "status": "final", diff --git a/src/test/resources/Observation/create-heart-rate-snomed-period_2.json b/src/test/resources/Observation/create-heart-rate-snomed-period_2.json index 7e566e201..2e51945c7 100755 --- a/src/test/resources/Observation/create-heart-rate-snomed-period_2.json +++ b/src/test/resources/Observation/create-heart-rate-snomed-period_2.json @@ -3,7 +3,7 @@ "id": "heart-rate", "meta": { "profile": [ - "http://hl7.org/fhir/StructureDefinition/heartrate" + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate" ] }, "status": "final", diff --git a/src/test/resources/Observation/create-heart-rate.json b/src/test/resources/Observation/create-heart-rate.json index 38bfa7886..f98298593 100644 --- a/src/test/resources/Observation/create-heart-rate.json +++ b/src/test/resources/Observation/create-heart-rate.json @@ -3,7 +3,7 @@ "id": "heart-rate", "meta": { "profile": [ - "http://hl7.org/fhir/StructureDefinition/heartrate" + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate" ] }, "text": { diff --git a/src/test/resources/Observation/observation-example-heart-rate-robot.json b/src/test/resources/Observation/observation-example-heart-rate-robot.json index e83cba7d9..56834f572 100644 --- a/src/test/resources/Observation/observation-example-heart-rate-robot.json +++ b/src/test/resources/Observation/observation-example-heart-rate-robot.json @@ -3,7 +3,7 @@ "id": "c8079220-594c-42dc-8cea-7a52a6833c2c", "meta": { "profile": [ - "http://hl7.org/fhir/StructureDefinition/heartrate" + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate" ] }, "identifier": [ diff --git a/tests/robot/OBSERVATION/04_create_heart_rate.robot b/tests/robot/OBSERVATION/04_create_heart_rate.robot index 952063101..27d9364f5 100644 --- a/tests/robot/OBSERVATION/04_create_heart_rate.robot +++ b/tests/robot/OBSERVATION/04_create_heart_rate.robot @@ -47,11 +47,11 @@ Force Tags observation_create heart-rate create #| resourceType | ID | meta | status | Identifier | category | code | subject | DateTime | valueQuantity | dataabsentreason | R.-Code | ArrayNumber | diagnostics | #| | | available | profile | | available | coding.system | coding.code | system | value | assigner | reference | available | codingavailable | system | code | available | coding available | 0.system | 0.code | 0.display | 1.system | 1.code | 1.display | text | available | Identifier-value | | available | value | unit | system | code | | | | ENG | DE | - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 201 0 ${EMPTY} ${EMPTY} - Observation test true http://hl7.org/fhir/StructureDefinition/heartrate final true http://google.com test https://google.com missing true abcd1234#!§$ true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 test1234 http://google.com missing test1234 test1234 true valid 1990-12-30 true ${10.12} Dave's http://unitsofmeasure.org /min false 201 0 ${EMPTY} ${EMPTY} - Observation 123456 true http://hl7.org/fhir/StructureDefinition/heartrate final true missing test missing 123te false Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 missing missing 364075005 missing missing true valid 2025-01-01 true ${150.38} test http://unitsofmeasure.org /min false 201 0 ${EMPTY} ${EMPTY} - Observation missing true http://hl7.org/fhir/StructureDefinition/heartrate final false http://terminology.hl7.org/CodeSystem/v2-0203 missing https://www.charite.de/fhir/CodeSystem/observation-identifiers abcd true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${60} test http://unitsofmeasure.org /min false 201 0 ${EMPTY} ${EMPTY} -# Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 false ${88.8} pro Minute http://unitsofmeasure.org /min truevalid 201 0 ${EMPTY} ${EMPTY} + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 201 0 ${EMPTY} ${EMPTY} + Observation test true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://google.com test https://google.com missing true abcd1234#!§$ true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 test1234 http://google.com missing test1234 test1234 true valid 1990-12-30 true ${10.12} Dave's http://unitsofmeasure.org /min false 201 0 ${EMPTY} ${EMPTY} + Observation 123456 true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true missing test missing 123te false Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 missing missing 364075005 missing missing true valid 2025-01-01 true ${150.38} test http://unitsofmeasure.org /min false 201 0 ${EMPTY} ${EMPTY} + Observation missing true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final false http://terminology.hl7.org/CodeSystem/v2-0203 missing https://www.charite.de/fhir/CodeSystem/observation-identifiers abcd true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${60} test http://unitsofmeasure.org /min false 201 0 ${EMPTY} ${EMPTY} +# Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 false ${88.8} pro Minute http://unitsofmeasure.org /min truevalid 201 0 ${EMPTY} ${EMPTY} 002 Create Heart Rate (invalid resourceType) @@ -66,10 +66,10 @@ Force Tags observation_create heart-rate create #| resourceType | ID | meta | status | Identifier | category | code | subject | DateTime | valueQuantity | dataabsentreason | R.-Code | ArrayNumber | diagnostics | #| | | available | profile | | available | coding.system | coding.code | system | value | assigner | reference | available | codingavailable | system | code | available | coding available | 0.system | 0.code | 0.display | 1.system | 1.code | 1.display | text | available | Identifier-value | | available | value | unit | system | code | | | | ENG | DE | - abcd heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 test https://www.charite.de/fhir/CodeSystem/observation-identifiers abcd true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} test http://unitsofmeasure.org /min false 422 0 This does not appear to be a FHIR resource Dies scheint keine FHIR-Ressource zu sein - ${12345} heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 test https://www.charite.de/fhir/CodeSystem/observation-identifiers abcd true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} test http://unitsofmeasure.org /min false 422 0 This does not appear to be a FHIR resource Dies scheint keine FHIR-Ressource zu sein - missing heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 test https://www.charite.de/fhir/CodeSystem/observation-identifiers abcd true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} test http://unitsofmeasure.org /min false 422 0 Unable to find resourceType property ResourceType-Property kann nicht gefunden werden - ${EMPTY} heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 test https://www.charite.de/fhir/CodeSystem/observation-identifiers abcd true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} test http://unitsofmeasure.org /min false 422 0 This does not appear to be a FHIR resource Dies scheint keine FHIR-Ressource zu sein + abcd heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 test https://www.charite.de/fhir/CodeSystem/observation-identifiers abcd true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} test http://unitsofmeasure.org /min false 422 0 This does not appear to be a FHIR resource Dies scheint keine FHIR-Ressource zu sein + ${12345} heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 test https://www.charite.de/fhir/CodeSystem/observation-identifiers abcd true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} test http://unitsofmeasure.org /min false 422 0 This does not appear to be a FHIR resource Dies scheint keine FHIR-Ressource zu sein + missing heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 test https://www.charite.de/fhir/CodeSystem/observation-identifiers abcd true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} test http://unitsofmeasure.org /min false 422 0 Unable to find resourceType property ResourceType-Property kann nicht gefunden werden + ${EMPTY} heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 test https://www.charite.de/fhir/CodeSystem/observation-identifiers abcd true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} test http://unitsofmeasure.org /min false 422 0 This does not appear to be a FHIR resource Dies scheint keine FHIR-Ressource zu sein 003 Create Heart Rate (invalid ID) @@ -84,8 +84,8 @@ Force Tags observation_create heart-rate create #| resourceType | ID | meta | status | Identifier | category | code | subject | DateTime | valueQuantity | dataabsentreason | R.-Code | ArrayNumber | diagnostics | #| | | available | profile | | available | coding.system | coding.code | system | value | assigner | reference | available | codingavailable | system | code | available | coding available | 0.system | 0.code | 0.display | 1.system | 1.code | 1.display | text | available | Identifier-value | | available | value | unit | system | code | | | | ENG | DE | - Observation ${EMPTY} true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 @value cannot be empty @value kann nicht leer sein - Observation ${123456} true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation ${EMPTY} true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 @value cannot be empty @value kann nicht leer sein + Observation ${123456} true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. 004 Create Heart Rate (invalid Meta/Profile) @@ -101,7 +101,7 @@ Force Tags observation_create heart-rate create #| resourceType | ID | meta | status | Identifier | category | code | subject | DateTime | valueQuantity | dataabsentreason | R.-Code | ArrayNumber | diagnostics | #| | | available | profile | | available | coding.system | coding.code | system | value | assigner | reference | available | codingavailable | system | code | available | coding available | 0.system | 0.code | 0.display | 1.system | 1.code | 1.display | text | available | Identifier-value | | available | value | unit | system | code | | | | ENG | DE | # no meta - Observation heart-rate false http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Default profile is not supported for Observation. One of the following profiles is expected: Default profile is not supported for Observation. One of the following profiles is expected: + Observation heart-rate false https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Default profile is not supported for Observation. One of the following profiles is expected: Default profile is not supported for Observation. One of the following profiles is expected: # invalid profile Observation heart-rate true http://google.com final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Profile reference 'http://google.com' could not be resolved, so has not been checked The resource does not contain any supported profile. One of the following profiles is expected: Observation heart-rate true test final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Canonical URLs must be absolute URLs if they are not fragment references Canonical URLs must be absolute URLs if they are not fragment references @@ -122,10 +122,10 @@ Force Tags observation_create heart-rate create #| resourceType | ID | meta | status | Identifier | category | code | subject | DateTime | valueQuantity | dataabsentreason | R.-Code | ArrayNumber | diagnostics | #| | | available | profile | | available | coding.system | coding.code | system | value | assigner | reference | available | codingavailable | system | code | available | coding available | 0.system | 0.code | 0.display | 1.system | 1.code | 1.display | text | available | Identifier-value | | available | value | unit | system | code | | | | ENG | DE | - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate todo true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 400 0 Unknown ObservationStatus code Unknown ObservationStatus code - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate ${123} true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate missing true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Observation.status: minimum required = 1, but only found 0 mindestens erforderlich = Observation.status, aber nur gefunden Observation.status - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate ${EMPTY} true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate todo true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 400 0 Unknown ObservationStatus code Unknown ObservationStatus code + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate ${123} true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate missing true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Observation.status: minimum required = 1, but only found 0 mindestens erforderlich = Observation.status, aber nur gefunden Observation.status + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate ${EMPTY} true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 @value cannot be empty @value kann nicht leer sein 006 Create Heart Rate (invalid Identifier) @@ -141,23 +141,23 @@ Force Tags observation_create heart-rate create #| resourceType | ID | meta | status | Identifier | category | code | subject | DateTime | valueQuantity | dataabsentreason | R.-Code | ArrayNumber | diagnostics | #| | | available | profile | | available | coding.system | coding.code | system | value | assigner | reference | available | codingavailable | system | code | available | coding available | 0.system | 0.code | 0.display | 1.system | 1.code | 1.display | text | available | Identifier-value | | available | value | unit | system | code | | | | ENG | DE | # invalid Identifier Coding System - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true ${EMPTY} Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 @value cannot be empty @value kann nicht leer sein - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true test Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Coding.system must be an absolute reference, not a local reference Coding.system muss eine absolute Referenz sein, nicht eine lokale Referenz - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true ${1234} Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true ${EMPTY} Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Coding.system must be an absolute reference, not a local reference Coding.system muss eine absolute Referenz sein, nicht eine lokale Referenz + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true ${1234} Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. # invalid Identifier Coding Code - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 ${EMPTY} https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 @value cannot be empty @value kann nicht leer sein - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 ${12345} https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 ${EMPTY} https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 ${12345} https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. # invalid Identifier System - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave test 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Identifier.system must be an absolute reference, not a local reference Identifier.system muss eine absolute Referenz sein, nicht eine lokale Referenz - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave ${12345} 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave ${EMPTY} 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave test 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Identifier.system must be an absolute reference, not a local reference Identifier.system muss eine absolute Referenz sein, nicht eine lokale Referenz + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave ${12345} 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave ${EMPTY} 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 @value cannot be empty @value kann nicht leer sein # invalid Identifier Value - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers ${EMPTY} true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 @value cannot be empty @value kann nicht leer sein - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers ${12345} true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers ${EMPTY} true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers ${12345} true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. # invalid Identifier Reference - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true missing true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 A Reference without an actual reference or identifier should have a display Eine Referenz ohne eine tatsächliche Referenz oder einen Identifikator sollte eine Displaywert haben - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true ${12345} true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true ${EMPTY} true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true missing true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 A Reference without an actual reference or identifier should have a display Eine Referenz ohne eine tatsächliche Referenz oder einen Identifikator sollte eine Displaywert haben + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true ${12345} true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true ${EMPTY} true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 @value cannot be empty @value kann nicht leer sein 007 Create Heart Rate (invalid Category) @@ -173,19 +173,19 @@ Force Tags observation_create heart-rate create #| resourceType | ID | meta | status | Identifier | category | code | subject | DateTime | valueQuantity | dataabsentreason | R.-Code | ArrayNumber | diagnostics | #| | | available | profile | | available | coding.system | coding.code | system | value | assigner | reference | available | codingavailable | system | code | available | coding available | 0.system | 0.code | 0.display | 1.system | 1.code | 1.display | text | available | Identifier-value | | available | value | unit | system | code | | | | ENG | DE | # no category - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité false true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Observation.category: minimum required = 1, but only found 0 http://hl7.org/fhir/StructureDefinition/heartrate: mindestens erforderlich = Observation.category, aber nur gefunden Observation.category - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true false http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Object must have some content Objekt muss einen Inhalt haben + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité false true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Observation.category: minimum required = 1, but only found 0 https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.category, aber nur gefunden Observation.category + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true false http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Object must have some content Objekt muss einen Inhalt haben # invalid Category System - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://google.com vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 This element does not match any known slice defined in the profile http://hl7.org/fhir/StructureDefinition/heartrate Dieses Element stimmt mit keinem bekannten Slice defined in the profile http://hl7.org/fhir/StructureDefinition/heartrate überein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true test vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 This element does not match any known slice defined in the profile http://hl7.org/fhir/StructureDefinition/heartrate Dieses Element stimmt mit keinem bekannten Slice defined in the profile http://hl7.org/fhir/StructureDefinition/heartrate überein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true ${123456789} vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true missing vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 2 A code with no system has no defined meaning. A system should be provided A code with no system has no defined meaning. A system should be provided - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true ${EMPTY} vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 3 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://google.com vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 This element does not match any known slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate Dieses Element stimmt mit keinem bekannten Slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate überein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true test vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 This element does not match any known slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate Dieses Element stimmt mit keinem bekannten Slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate überein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true ${123456789} vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true missing vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 2 A code with no system has no defined meaning. A system should be provided A code with no system has no defined meaning. A system should be provided + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true ${EMPTY} vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 3 @value cannot be empty @value kann nicht leer sein # invalid Category Code - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category test true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 This element does not match any known slice defined in the profile http://hl7.org/fhir/StructureDefinition/heartrate Dieses Element stimmt mit keinem bekannten Slice defined in the profile http://hl7.org/fhir/StructureDefinition/heartrate überein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category ${12345} true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category ${EMPTY} true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 2 @value cannot be empty @value kann nicht leer sein - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category missing true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 This element does not match any known slice defined in the profile http://hl7.org/fhir/StructureDefinition/heartrate Dieses Element stimmt mit keinem bekannten Slice defined in the profile http://hl7.org/fhir/StructureDefinition/heartrate überein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category test true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 This element does not match any known slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate Dieses Element stimmt mit keinem bekannten Slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate überein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category ${12345} true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category ${EMPTY} true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 2 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category missing true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 This element does not match any known slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate Dieses Element stimmt mit keinem bekannten Slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate überein. 008 Create Heart Rate (invalid Code) @@ -201,36 +201,36 @@ Force Tags observation_create heart-rate create #| resourceType | ID | meta | status | Identifier | category | code | subject | DateTime | valueQuantity | dataabsentreason | R.-Code | ArrayNumber | diagnostics | #| | | available | profile | | available | coding.system | coding.code | system | value | assigner | reference | available | codingavailable | system | code | available | coding available | 0.system | 0.code | 0.display | 1.system | 1.code | 1.display | text | available | Identifier-value | | available | value | unit | system | code | | | | ENG | DE | # no code - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs false true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Observation.code: minimum required = 1, but only found 0 http://hl7.org/fhir/StructureDefinition/heartrate: mindestens erforderlich = Observation.code, aber nur gefunden Observation.code + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs false true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Observation.code: minimum required = 1, but only found 0 https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.code, aber nur gefunden Observation.code # no coding - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true false http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 inimum required = 1, but only found 0 http://hl7.org/fhir/StructureDefinition/heartrate: mindestens erforderlich = Observation.code.coding, aber nur gefunden Observation.code.coding:HeartRateCode + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true false http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 inimum required = 1, but only found 0 https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.code.coding, aber nur gefunden Observation.code.coding:HeartRateCode # invalid Code Coding 0 System - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://google.com 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 This element does not match any known slice defined in the profile http://hl7.org/fhir/StructureDefinition/heartrate Dieses Element stimmt mit keinem bekannten Slice defined in the profile http://hl7.org/fhir/StructureDefinition/heartrate überein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true test 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Coding.system must be an absolute reference, not a local reference Coding.system muss eine absolute Referenz sein, nicht eine lokale Referenz - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true ${12345} 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true ${EMPTY} 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 @value cannot be empty @value kann nicht leer sein - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true missing 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 A code with no system has no defined meaning. A system should be provided A code with no system has no defined meaning. A system should be provided + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://google.com 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 This element does not match any known slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate Dieses Element stimmt mit keinem bekannten Slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate überein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true test 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Coding.system must be an absolute reference, not a local reference Coding.system muss eine absolute Referenz sein, nicht eine lokale Referenz + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true ${12345} 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true ${EMPTY} 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true missing 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 A code with no system has no defined meaning. A system should be provided A code with no system has no defined meaning. A system should be provided # invalid Code Coding 0 Code - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org test Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 This element does not match any known slice defined in the profile http://hl7.org/fhir/StructureDefinition/heartrate Dieses Element stimmt mit keinem bekannten Slice defined in the profile http://hl7.org/fhir/StructureDefinition/heartrate überein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org ${12345} Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org ${EMPTY} Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 @value cannot be empty @value kann nicht leer sein - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org missing Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 This element does not match any known slice defined in the profile http://hl7.org/fhir/StructureDefinition/heartrate Dieses Element stimmt mit keinem bekannten Slice defined in the profile http://hl7.org/fhir/StructureDefinition/heartrate überein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org test Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 This element does not match any known slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate Dieses Element stimmt mit keinem bekannten Slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate überein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org ${12345} Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org ${EMPTY} Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org missing Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 This element does not match any known slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate Dieses Element stimmt mit keinem bekannten Slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate überein. # invalid Code Coding 0 Display - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 ${12345} http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 ${EMPTY} http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 ${12345} http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 ${EMPTY} http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 @value cannot be empty @value kann nicht leer sein # invalid Code Coding 1 System - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate test abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Coding.system must be an absolute reference, not a local reference Coding.system muss eine absolute Referenz sein, nicht eine lokale Referenz - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate ${12345} abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate ${EMPTY} abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 A code with no system has no defined meaning. A system should be provided A code with no system has no defined meaning. A system should be provided + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate test abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Coding.system must be an absolute reference, not a local reference Coding.system muss eine absolute Referenz sein, nicht eine lokale Referenz + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate ${12345} abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate ${EMPTY} abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 A code with no system has no defined meaning. A system should be provided A code with no system has no defined meaning. A system should be provided # invalid Code Coding 1 Code - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct ${12345} Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct ${EMPTY} Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct ${12345} Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct ${EMPTY} Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 @value cannot be empty @value kann nicht leer sein # invalid Code Coding 0 Display - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd ${12345} Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd ${EMPTY} Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd ${12345} Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd ${EMPTY} Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 @value cannot be empty @value kann nicht leer sein # invalid Code Text - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) ${12345} true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) ${EMPTY} true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) ${12345} true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) ${EMPTY} true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 @value cannot be empty @value kann nicht leer sein 009 Create Heart Rate (invalid Subject) @@ -246,13 +246,13 @@ Force Tags observation_create heart-rate create #| resourceType | ID | meta | status | Identifier | category | code | subject | DateTime | valueQuantity | dataabsentreason | R.-Code | ArrayNumber | diagnostics | #| | | available | profile | | available | coding.system | coding.code | system | value | assigner | reference | available | codingavailable | system | code | available | coding available | 0.system | 0.code | 0.display | 1.system | 1.code | 1.display | text | available | Identifier-value | | available | value | unit | system | code | | | | ENG | DE | # no subject - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate false valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Observation.subject: minimum required = 1, but only found 0 http://hl7.org/fhir/StructureDefinition/heartrate: mindestens erforderlich = Observation.subject, aber nur gefunden Observation.subject + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate false valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Observation.subject: minimum required = 1, but only found 0 https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.subject, aber nur gefunden Observation.subject # invalid reference - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true test 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 EhrId not found for subject 'test' EhrId not found for subject 'test' - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true ${12345} 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true invalid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 EhrId not found for subject EhrId not found for subject - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true ${EMPTY} 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 2 All FHIR elements must have a @value All FHIR elements must have a @value - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true missing 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Subject identifier is required Subject identifier is required + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true test 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 EhrId not found for subject 'test' EhrId not found for subject 'test' + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true ${12345} 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true invalid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 EhrId not found for subject EhrId not found for subject + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true ${EMPTY} 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 2 All FHIR elements must have a @value All FHIR elements must have a @value + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true missing 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Subject identifier is required Subject identifier is required 010 Create Heart Rate (invalid DateTime) @@ -267,13 +267,13 @@ Force Tags observation_create heart-rate create #| resourceType | ID | meta | status | Identifier | category | code | subject | DateTime | valueQuantity | dataabsentreason | R.-Code | ArrayNumber | diagnostics | #| | | available | profile | | available | coding.system | coding.code | system | value | assigner | reference | available | codingavailable | system | code | available | coding available | 0.system | 0.code | 0.display | 1.system | 1.code | 1.display | text | available | Identifier-value | | available | value | unit | system | code | | | | ENG | DE | - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 202-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 is outside the range of reasonable years - check for data entry error liegt außerhalb des Bereichs vernünftiger Jahre - Prüfung auf Dateneingabefehler - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-13-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 Not a valid date/time Kein gültiges Datum/Uhrzeit - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-32 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 Not a valid date/time Kein gültiges Datum/Uhrzeit - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid test true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 is dateTime and has a value then that value shall be precise to the day is dateTime and has a value then that value shall be precise to the day - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid ${12345} true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 2 is dateTime and has a value then that value shall be precise to the day is dateTime and has a value then that value shall be precise to the day - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid ${EMPTY} true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 3 @value cannot be empty @value kann nicht leer sein - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid missing true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 minimum required = 1, but only found 0 http://hl7.org/fhir/StructureDefinition/heartrate: mindestens erforderlich = Observation.effective + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 202-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 is outside the range of reasonable years - check for data entry error liegt außerhalb des Bereichs vernünftiger Jahre - Prüfung auf Dateneingabefehler + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-13-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 Not a valid date/time Kein gültiges Datum/Uhrzeit + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-32 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 Not a valid date/time Kein gültiges Datum/Uhrzeit + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid test true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 The value 'test' is outside the range of reasonable years - check for data entry error The value 'test' is outside the range of reasonable years - check for data entry error + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid ${12345} true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 2 The value '12345' is outside the range of reasonable years - check for data entry error The value '12345' is outside the range of reasonable years - check for data entry error + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid ${EMPTY} true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 2 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid missing true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 minimum required = 1, but only found 0 https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.effective 011 Create Heart Rate (invalid valueQuantity) @@ -289,28 +289,28 @@ Force Tags observation_create heart-rate create #| resourceType | ID | meta | status | Identifier | category | code | subject | DateTime | valueQuantity | dataabsentreason | R.-Code | ArrayNumber | diagnostics | #| | | available | profile | | available | coding.system | coding.code | system | value | assigner | reference | available | codingavailable | system | code | available | coding available | 0.system | 0.code | 0.display | 1.system | 1.code | 1.display | text | available | Identifier-value | | available | value | unit | system | code | | | | ENG | DE | # no valueQuantity & no dataabsentreason - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 false ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 If there is no component or hasMember element then either a value If there is no component or hasMember element then either a value + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 false ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 If there is no component or hasMember element then either a value If there is no component or hasMember element then either a value # invalid value - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88888.8} pro Minute http://unitsofmeasure.org /min false 422 0 value is not within interval, expected:0.0 <= 88888.8 < 1000.0 value is not within interval, expected:0.0 <= 88888.8 < 1000.0 - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${-10} pro Minute http://unitsofmeasure.org /min false 422 0 value is not within interval, expected:0.0 <= -10.0 < 1000.0 value is not within interval, expected:0.0 <= -10.0 < 1000.0 - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${EMPTY} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a number Fehler beim Parsen von JSON: Der primitive Wert muss eine Zahl sein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true test pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a number Fehler beim Parsen von JSON: Der primitive Wert muss eine Zahl sein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true missing pro Minute http://unitsofmeasure.org /min false 422 1 minimum required = 1, but only found 0 http://hl7.org/fhir/StructureDefinition/heartrate: mindestens erforderlich = Observation.value + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88888.8} pro Minute http://unitsofmeasure.org /min false 422 0 value is not within interval, expected:0.0 <= 88888.8 < 1000.0 value is not within interval, expected:0.0 <= 88888.8 < 1000.0 + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${-10} pro Minute http://unitsofmeasure.org /min false 422 0 value is not within interval, expected:0.0 <= -10.0 < 1000.0 value is not within interval, expected:0.0 <= -10.0 < 1000.0 + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${EMPTY} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a number Fehler beim Parsen von JSON: Der primitive Wert muss eine Zahl sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true test pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a number Fehler beim Parsen von JSON: Der primitive Wert muss eine Zahl sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true missing pro Minute http://unitsofmeasure.org /min false 422 1 minimum required = 1, but only found 0 https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.value # invalid unit - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} ${12345} http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} ${EMPTY} http://unitsofmeasure.org /min false 422 1 @value cannot be empty @value kann nicht leer sein - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} missing http://unitsofmeasure.org /min false 422 1 minimum required = 1, but only found 0 http://hl7.org/fhir/StructureDefinition/heartrate: mindestens erforderlich = Observation.value + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} ${12345} http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} ${EMPTY} http://unitsofmeasure.org /min false 422 1 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} missing http://unitsofmeasure.org /min false 422 1 minimum required = 1, but only found 0 https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.value # invalid system - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://google.com /min false 422 1 Value is 'http://google.com' but must be Der Wert ist - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute test /min false 422 1 Coding.system must be an absolute reference, not a local reference Coding.system muss eine absolute Referenz sein, nicht eine lokale Referenz - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute ${12345} /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute ${EMPTY} /min false 422 1 A code with no system has no defined meaning. A system should be provided A code with no system has no defined meaning. A system should be provided - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute missing /min false 422 1 A code with no system has no defined meaning. A system should be provided A code with no system has no defined meaning. A system should be provided + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://google.com /min false 422 1 Value is 'http://google.com' but must be Der Wert ist + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute test /min false 422 1 Coding.system must be an absolute reference, not a local reference Coding.system muss eine absolute Referenz sein, nicht eine lokale Referenz + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute ${12345} /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute ${EMPTY} /min false 422 1 A code with no system has no defined meaning. A system should be provided A code with no system has no defined meaning. A system should be provided + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute missing /min false 422 1 A code with no system has no defined meaning. A system should be provided A code with no system has no defined meaning. A system should be provided # invalid code - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org test false 422 1 Value is Der Wert ist - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org ${12345} false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org ${EMPTY} false 422 1 @value cannot be empty @value kann nicht leer sein - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org missing false 422 1 minimum required = 1, but only found 0 http://hl7.org/fhir/StructureDefinition/heartrate: mindestens erforderlich = Observation.value + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org test false 422 1 Value is Der Wert ist + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org ${12345} false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org ${EMPTY} false 422 1 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org missing false 422 1 minimum required = 1, but only found 0 https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.value [Teardown] TRACE GITHUB ISSUE 247 bug 012 Create Heart Rate (invalid DataAbsentReason) @@ -326,9 +326,9 @@ Force Tags observation_create heart-rate create #| resourceType | ID | meta | status | Identifier | category | code | subject | DateTime | valueQuantity | dataabsentreason | R.-Code | ArrayNumber | diagnostics | #| | | available | profile | | available | coding.system | coding.code | system | value | assigner | reference | available | codingavailable | system | code | available | coding available | 0.system | 0.code | 0.display | 1.system | 1.code | 1.display | text | available | Identifier-value | | available | value | unit | system | code | | | | ENG | DE | # DataAbsentReason and valueQuantity - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min truevalid 422 0 dataAbsentReason SHALL only be present if Observation.value ${EMPTY} + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min truevalid 422 0 dataAbsentReason SHALL only be present if Observation.value ${EMPTY} # invalid DataAbsentReason -# Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 false ${88.8} pro Minute http://unitsofmeasure.org /min truevalid 422 0 dataAbsentReason SHALL only be present if Observation.value ${EMPTY} +# Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 false ${88.8} pro Minute http://unitsofmeasure.org /min truevalid 422 0 dataAbsentReason SHALL only be present if Observation.value ${EMPTY} 013 Create Heart Rate (invalid multi) @@ -344,47 +344,47 @@ Force Tags observation_create heart-rate create #| resourceType | ID | meta | status | Identifier | category | code | subject | DateTime | valueQuantity | dataabsentreason | R.-Code | ArrayNumber | diagnostics | #| | | available | profile | | available | coding.system | coding.code | system | value | assigner | reference | available | codingavailable | system | code | available | coding available | 0.system | 0.code | 0.display | 1.system | 1.code | 1.display | text | available | Identifier-value | | available | value | unit | system | code | | | | ENG | DE | # all attributes invalid for valueQuantity - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} false 422 2 @value cannot be empty @value kann nicht leer sein - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true test ${1234} test ${1234} false 422 2 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true missing ${EMPTY} http://google.com test false 422 2 All FHIR elements must have a @value or childre All FHIR elements must have a @value or childre - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${EMPTY} missing test missing false 422 5 minimum required = 1, but only found 0 http://hl7.org/fhir/StructureDefinition/heartrate: mindestens erforderlich = Observation.value - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${EMPTY} ${1234} missing test false 422 3 A code with no system has no defined meaning. A system should be provided A code with no system has no defined meaning. A system should be provided + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} false 422 2 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true test ${1234} test ${1234} false 422 2 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true missing ${EMPTY} http://google.com test false 422 2 All FHIR elements must have a @value or childre All FHIR elements must have a @value or childre + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${EMPTY} missing test missing false 422 5 minimum required = 1, but only found 0 https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.value + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${EMPTY} ${1234} missing test false 422 3 A code with no system has no defined meaning. A system should be provided A code with no system has no defined meaning. A system should be provided # all attributes invalid for code - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true false http://loinc.org 8867-4 Heart rate ${EMPTY} ${12345} Heart rate (observable entity) ${12345} true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 minimum required = 1, but only found 0 http://hl7.org/fhir/StructureDefinition/heartrate: mindestens erforderlich = Observation.code.coding, aber nur gefunden Observation.code.coding:HeartRateCode - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 6 @value cannot be empty @value kann nicht leer sein - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://google.com ${12345} missing test missing ${12345} missing true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 5 minimum required = 1, but only found 0 http://hl7.org/fhir/StructureDefinition/heartrate: mindestens erforderlich = Observation.code.coding, aber nur gefunden Observation.code.coding:HeartRateCode - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true test missing ${12345} ${12345} missing test12345 ${EMPTY} true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 8 minimum required = 1, but only found 0 http://hl7.org/fhir/StructureDefinition/heartrate: mindestens erforderlich = Observation.code.coding, aber nur gefunden Observation.code.coding:HeartRateCode - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true missing test test1234 ${12345} ${EMPTY} missing ${12345} true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 8 minimum required = 1, but only found 0 http://hl7.org/fhir/StructureDefinition/heartrate: mindestens erforderlich = Observation.code.coding, aber nur gefunden Observation.code.coding:HeartRateCode + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true false http://loinc.org 8867-4 Heart rate ${EMPTY} ${12345} Heart rate (observable entity) ${12345} true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 minimum required = 1, but only found 0 https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.code.coding, aber nur gefunden Observation.code.coding:HeartRateCode + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 6 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://google.com ${12345} missing test missing ${12345} missing true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 5 minimum required = 1, but only found 0 https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.code.coding, aber nur gefunden Observation.code.coding:HeartRateCode + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true test missing ${12345} ${12345} missing test12345 ${EMPTY} true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 8 minimum required = 1, but only found 0 https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.code.coding, aber nur gefunden Observation.code.coding:HeartRateCode + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true missing test test1234 ${12345} ${EMPTY} missing ${12345} true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 8 minimum required = 1, but only found 0 https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.code.coding, aber nur gefunden Observation.code.coding:HeartRateCode # all attributes invalid for category - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://google.com test true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 This element does not match any known slice defined in the profile http://hl7.org/fhir/StructureDefinition/heartrate Dieses Element stimmt mit keinem bekannten Slice defined in the profile http://hl7.org/fhir/StructureDefinition/heartrate überein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true missing ${EMPTY} true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 minimum required = 1, but only found 0 http://hl7.org/fhir/StructureDefinition/heartrate: mindestens erforderlich = Observation.category, aber nur gefunden Observation.category:VSCat - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true ${EMPTY} ${12345} true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 4 @value cannot be empty @value kann nicht leer sein - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true ${12345} missing true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true test ${EMPTY} true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 minimum required = 1, but only found 0 http://hl7.org/fhir/StructureDefinition/heartrate: mindestens erforderlich = Observation.category, aber nur gefunden Observation.category:VSCat + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://google.com test true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 This element does not match any known slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate Dieses Element stimmt mit keinem bekannten Slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate überein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true missing ${EMPTY} true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 minimum required = 1, but only found 0 https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.category, aber nur gefunden Observation.category:VSCat + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true ${EMPTY} ${12345} true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 4 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true ${12345} missing true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true test ${EMPTY} true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 1 minimum required = 1, but only found 0 https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.category, aber nur gefunden Observation.category:VSCat # all attributes invalid for identifier - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true ${1234} missing ${EMPTY} ${EMPTY} true ${1234} true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 5 @value cannot be empty @value kann nicht leer sein - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true test ${1234} missing ${1234} true missing true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 3 Coding.system must be an absolute reference, not a local reference Coding.system muss eine absolute Referenz sein, nicht eine lokale Referenz - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true ${EMPTY} ${EMPTY} ${1234} missing false Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 4 @value cannot be empty @value kann nicht leer sein - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true missing ${12345} test ${EMPTY} true ${1234} true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 4 @value cannot be empty @value kann nicht leer sein - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} true ${EMPTY} true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 6 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true ${1234} missing ${EMPTY} ${EMPTY} true ${1234} true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 5 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} missing ${1234} true missing true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 3 Coding.system must be an absolute reference, not a local reference Coding.system muss eine absolute Referenz sein, nicht eine lokale Referenz + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true ${EMPTY} ${EMPTY} ${1234} missing false Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 4 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true missing ${12345} test ${EMPTY} true ${1234} true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 4 @value cannot be empty @value kann nicht leer sein + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} true ${EMPTY} true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 6 @value cannot be empty @value kann nicht leer sein # mix invalid attributes - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 30 Value is '1234' but must be '/min' Wert ist - ${1234} heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 0 This does not appear to be a FHIR resource Dies scheint keine FHIR-Ressource zu sein - Observation ${1234} true http://hl7.org/fhir/StructureDefinition/heartrate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 31 Value is '1234' but must be '/min' Wert ist - Observation heart-rate false http://hl7.org/fhir/StructureDefinition/heartrate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 23 The value 'test' is not a valid decimal ist kein gültiger Dezimalwert. + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 30 Value is '1234' but must be '/min' Wert ist + ${1234} heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 0 This does not appear to be a FHIR resource Dies scheint keine FHIR-Ressource zu sein + Observation ${1234} true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 31 Value is '1234' but must be '/min' Wert ist + Observation heart-rate false https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 23 The value 'test' is not a valid decimal ist kein gültiger Dezimalwert. Observation heart-rate true ${1234} final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 26 Profile reference '1234' has not been checked because it is unknown konnte nicht aufgelöst werden, wurde also nicht überprüft - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate ${1234} true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 31 Value is '1234' but must be '/min' Wert ist - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final false test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 24 Value is '1234' but must be '/min' Wert ist - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true test ${1234} ${1234} ${1234} false ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 29 Value is '1234' but must be '/min' Wert ist - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true test ${1234} ${1234} ${1234} true ${1234} false true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 27 Value is '1234' but must be '/min' Wert ist - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true test ${1234} ${1234} ${1234} true ${1234} true false ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 28 Value is '1234' but must be '/min' Wert ist - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} false true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 19 Value is '1234' but must be '/min' Wert ist - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true false ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 19 Value is '1234' but must be '/min' Wert ist - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} false valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 31 Value is '1234' but must be '/min' Wert ist - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true false ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true test 2020-02-25 true test ${1234} ${1234} ${1234} false 422 19 Value is '1234' but must be '/min' Wert ist - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true false ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid ${12345} true test ${1234} ${1234} ${1234} false 422 24 Value is '1234' but must be '/min' Wert ist - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true false ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 false test ${1234} ${1234} ${1234} false 422 12 minimum required = 1, but only found 0 http://hl7.org/fhir/StructureDefinition/heartrate: mindestens erforderlich = Observation.code.coding, aber nur gefunden Observation.code.coding:HeartRateCode - Observation heart-rate true http://hl7.org/fhir/StructureDefinition/heartrate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true false ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} true 422 20 Value is '1234' but must be '/min' Wert ist + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate ${1234} true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 31 Value is '1234' but must be '/min' Wert ist + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final false test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 24 Value is '1234' but must be '/min' Wert ist + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} false ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 29 Value is '1234' but must be '/min' Wert ist + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} false true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 27 Value is '1234' but must be '/min' Wert ist + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true false ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 28 Value is '1234' but must be '/min' Wert ist + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} false true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 19 Value is '1234' but must be '/min' Wert ist + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true false ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 19 Value is '1234' but must be '/min' Wert ist + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} false valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 31 Value is '1234' but must be '/min' Wert ist + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true false ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true test 2020-02-25 true test ${1234} ${1234} ${1234} false 422 19 Value is '1234' but must be '/min' Wert ist + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true false ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid ${12345} true test ${1234} ${1234} ${1234} false 422 24 Value is '1234' but must be '/min' Wert ist + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true false ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 false test ${1234} ${1234} ${1234} false 422 12 minimum required = 1, but only found 0 https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.code.coding, aber nur gefunden Observation.code.coding:HeartRateCode + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true false ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} true 422 20 Value is '1234' but must be '/min' Wert ist *** Keywords *** From 32b06bf3704c48218609190c101eebc98dcd7d82 Mon Sep 17 00:00:00 2001 From: zhu13 <yufei.zhu@med.uni-goettingen.de> Date: Wed, 19 May 2021 12:54:52 +0200 Subject: [PATCH 069/141] fix error bei PAtienten Aufenthalt --- .../org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java | 6 ++++-- .../PatientenAufenthaltCompositionConverter.java | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java index 1e2ac2c5c..60edb2486 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java @@ -46,10 +46,12 @@ public void configure() throws Exception { .choice() .when(header(FhirBridgeConstants.PROFILE).isEqualTo(Profile.PATIENTEN_AUFENTHALT)) .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") + .to("ehr-composition:compositionEndpoint?operation=mergeCompositionEntity") + .process("resourceResponseProcessor") .otherwise() .to("bean:fhirResourceConversionService?method=convertDefaultEncounter(${body})") - .to("ehr-composition:compositionEndpoint?operation=mergeCompositionEntity") - .process("resourceResponseProcessor"); + .to("ehr-composition:compositionEndpoint?operation=mergeCompositionEntity") + .process("resourceResponseProcessor"); // @formatter:on } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/PatientenAufenthalt/PatientenAufenthaltCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/PatientenAufenthalt/PatientenAufenthaltCompositionConverter.java index 17c36a8c1..86b785162 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/PatientenAufenthalt/PatientenAufenthaltCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/PatientenAufenthalt/PatientenAufenthaltCompositionConverter.java @@ -9,11 +9,13 @@ import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungsfallCluster; import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungstellenkontaktCluster; import org.ehrbase.fhirbridge.fhir.support.KontaktebeneDefiningCode; +import org.ehrbase.client.classgenerator.shareddefinition.Language; import static org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem.KONTAKT_EBENE; import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.Encounter; import org.hl7.fhir.r4.model.Identifier; import org.springframework.lang.NonNull; +import com.nedap.archie.rm.generic.PartySelf; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -62,6 +64,9 @@ public PatientenaufenthaltComposition convertInternal(@NonNull Encounter encount // Mapping for Versorgungsaufenthalt VersorgungsaufenthaltAdminEntry versorgungsaufenthaltAdminEntry = new VersorgungsaufenthaltAdminEntry(); + versorgungsaufenthaltAdminEntry.setSubject(new PartySelf()); + versorgungsaufenthaltAdminEntry.setLanguage(Language.DE); + if(encounter.getLocation() != null && encounter.getLocation().size() > 0) { From 273534f32d9b3a4567d0847626636bf7c797197e Mon Sep 17 00:00:00 2001 From: zhu13 <yufei.zhu@med.uni-goettingen.de> Date: Wed, 19 May 2021 17:12:13 +0200 Subject: [PATCH 070/141] fix code smell --- .../camel/route/EncounterRoutes.java | 2 +- .../config/ConversionConfiguration.java | 2 +- ...chAbteilungsSchluesselDefiningCodeMap.java | 7 +- ...tientenAufenthaltCompositionConverter.java | 103 ++++++++++-------- ...erVersorgungsfallCompositionConverter.java | 71 +++++++----- ...naererVersorgungsfallDefiningCodeMaps.java | 4 + .../fhirbridge/fhir/support/Encounters.java | 4 + .../support/KontaktebeneDefiningCode.java | 2 +- .../fhirbridge/fhir/support/Resources.java | 20 ++-- 9 files changed, 123 insertions(+), 92 deletions(-) rename src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/{PatientenAufenthalt => patientenaufenthalt}/FachAbteilungsSchluesselDefiningCodeMap.java (81%) rename src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/{PatientenAufenthalt => patientenaufenthalt}/PatientenAufenthaltCompositionConverter.java (68%) diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java index a6df51959..60edb2486 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java @@ -52,7 +52,7 @@ public void configure() throws Exception { .to("bean:fhirResourceConversionService?method=convertDefaultEncounter(${body})") .to("ehr-composition:compositionEndpoint?operation=mergeCompositionEntity") .process("resourceResponseProcessor"); - + // @formatter:on } } \ No newline at end of file diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java index efb6a6270..01773f856 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java @@ -2,7 +2,7 @@ import org.ehrbase.fhirbridge.ehr.converter.ConversionService; import org.ehrbase.fhirbridge.ehr.converter.specific.antibodypanel.GECCOSerologischerBefundCompositionConverter; -import org.ehrbase.fhirbridge.ehr.converter.specific.PatientenAufenthalt.PatientenAufenthaltCompositionConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.patientenaufenthalt.PatientenAufenthaltCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.bloodgas.BloodGasPanelCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.bloodpressure.BloodPressureCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.bodyheight.BodyHeightCompositionConverter; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/PatientenAufenthalt/FachAbteilungsSchluesselDefiningCodeMap.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/FachAbteilungsSchluesselDefiningCodeMap.java similarity index 81% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/PatientenAufenthalt/FachAbteilungsSchluesselDefiningCodeMap.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/FachAbteilungsSchluesselDefiningCodeMap.java index caead5c34..e1c99274a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/PatientenAufenthalt/FachAbteilungsSchluesselDefiningCodeMap.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/FachAbteilungsSchluesselDefiningCodeMap.java @@ -1,4 +1,4 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.PatientenAufenthalt; +package org.ehrbase.fhirbridge.ehr.converter.specific.patientenaufenthalt; import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.FachabteilungsschluesselDefiningCode; @@ -9,6 +9,11 @@ class FachAbteilungsSchluesselDefiningCodeMap { private static final Map<String, FachabteilungsschluesselDefiningCode> fachAbteilungsSchluesselMap = new HashMap<>(); + private FachAbteilungsSchluesselDefiningCodeMap() { + + throw new IllegalStateException("Utility class"); + } + static { for(FachabteilungsschluesselDefiningCode fachabteilungsschluesselDefiningCode : FachabteilungsschluesselDefiningCode.values() ) { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/PatientenAufenthalt/PatientenAufenthaltCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java similarity index 68% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/PatientenAufenthalt/PatientenAufenthaltCompositionConverter.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java index 86b785162..60ff2586a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/PatientenAufenthalt/PatientenAufenthaltCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java @@ -1,4 +1,4 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.PatientenAufenthalt; +package org.ehrbase.fhirbridge.ehr.converter.specific.patientenaufenthalt; import org.ehrbase.fhirbridge.ehr.converter.generic.EncounterToCompositionConverter; import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.PatientenaufenthaltComposition; @@ -23,7 +23,7 @@ public class PatientenAufenthaltCompositionConverter extends EncounterToCompositionConverter<PatientenaufenthaltComposition> { - private final String FACH_ABTEILUNGS_SCHLUESSEL_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel"; + private static final String FACH_ABTEILUNGS_SCHLUESSEL_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel"; @Override public PatientenaufenthaltComposition convertInternal(@NonNull Encounter encounter) { @@ -61,7 +61,13 @@ public PatientenaufenthaltComposition convertInternal(@NonNull Encounter encount } } - // Mapping for Versorgungsaufenthalt + retVal.setVersorgungsaufenthalt(convertAdminEntry(encounter)); + + return retVal; + } + + private VersorgungsaufenthaltAdminEntry convertAdminEntry(Encounter encounter) { + VersorgungsaufenthaltAdminEntry versorgungsaufenthaltAdminEntry = new VersorgungsaufenthaltAdminEntry(); versorgungsaufenthaltAdminEntry.setSubject(new PartySelf()); @@ -82,54 +88,57 @@ public PatientenaufenthaltComposition convertInternal(@NonNull Encounter encount } } - // location physical type / name -> standort - String locationPhysicalType = location.getPhysicalType().getCoding().get(0).getCode(); - //String locationName = location.getLocationTarget().getName(); // todo: get Location from Reference - String locationName = location.getPhysicalType().getText(); - StandortCluster standortCluster = new StandortCluster(); - - if (locationName != null && !locationName.isEmpty()) { - - switch (locationPhysicalType) { - case "si": - standortCluster.setCampusValue(locationName); - break; - case "bu": - standortCluster.setGebaeudegruppeValue(locationName); - break; - case "lvl": - standortCluster.setEbeneValue(locationName); - break; - case "wa": - standortCluster.setStationValue(locationName); - break; - case "ro": - standortCluster.setZimmerValue(locationName); - break; - case "bd": - standortCluster.setBettplatzValue(locationName); - break; - default: // other types aren't needed by EHR Composition - throw new IllegalStateException("unexpected location physical type " + locationPhysicalType + - " by EHR composition."); - } - } + versorgungsaufenthaltAdminEntry.setStandort(convertStandortCluster(location)); - /* TODO: get Location from Reference - if (location.getLocationTarget().getDescription() != null - && !location.getLocationTarget().getDescription().isEmpty()) { + versorgungsaufenthaltAdminEntry.setKommentarValue(location.getLocation().getDisplay()); + } - standortCluster.setZusaetzlicheBeschreibungValue(location.getLocationTarget().getDescription()); - }*/ + versorgungsaufenthaltAdminEntry.setFachlicheOrganisationseinheit(createFachlicheOrganisationseinheitClusterList(encounter)); - versorgungsaufenthaltAdminEntry.setStandort(standortCluster); + return versorgungsaufenthaltAdminEntry; + } - versorgungsaufenthaltAdminEntry.setKommentarValue(location.getLocation().getDisplay()); + private StandortCluster convertStandortCluster(Encounter.EncounterLocationComponent location) { + + // location physical type / name -> standort + String locationPhysicalType = location.getPhysicalType().getCoding().get(0).getCode(); + + String locationName = location.getPhysicalType().getText(); + StandortCluster standortCluster = new StandortCluster(); + + if (locationName != null && !locationName.isEmpty()) { + + switch (locationPhysicalType) { + case "si": + standortCluster.setCampusValue(locationName); + break; + case "bu": + standortCluster.setGebaeudegruppeValue(locationName); + break; + case "lvl": + standortCluster.setEbeneValue(locationName); + break; + case "wa": + standortCluster.setStationValue(locationName); + break; + case "ro": + standortCluster.setZimmerValue(locationName); + break; + case "bd": + standortCluster.setBettplatzValue(locationName); + break; + default: // other types aren't needed by EHR Composition + throw new IllegalStateException("unexpected location physical type " + locationPhysicalType + + " by EHR composition."); + } } - if (versorgungsaufenthaltAdminEntry.getFachlicheOrganisationseinheit() == null) { - versorgungsaufenthaltAdminEntry.setFachlicheOrganisationseinheit(new ArrayList<>()); - } + return standortCluster; + } + + private ArrayList<FachlicheOrganisationseinheitCluster> createFachlicheOrganisationseinheitClusterList(Encounter encounter) { + + ArrayList<FachlicheOrganisationseinheitCluster> retVal = new ArrayList<>(); if (encounter.getServiceType() != null && encounter.getServiceType().getCoding() != null) { @@ -147,12 +156,10 @@ public PatientenaufenthaltComposition convertInternal(@NonNull Encounter encount " or Code System for 'Fachabteilungsschlüssel'."); } - versorgungsaufenthaltAdminEntry.getFachlicheOrganisationseinheit().add(fachlicheOrganisationseinheitCluster); + retVal.add(fachlicheOrganisationseinheitCluster); } } - retVal.setVersorgungsaufenthalt(versorgungsaufenthaltAdminEntry); - return retVal; } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallCompositionConverter.java index 96b8411ba..0d8f825e3 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallCompositionConverter.java @@ -5,7 +5,6 @@ import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.StationaererVersorgungsfallComposition; import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.AufnahmedatenAdminEntry; import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.EntlassungsdatenAdminEntry; -import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.FallstatusDefiningCode; import org.ehrbase.fhirbridge.fhir.support.KontaktebeneDefiningCode; import org.ehrbase.client.classgenerator.shareddefinition.Language; import org.hl7.fhir.r4.model.Encounter; @@ -16,9 +15,10 @@ public class StationaererVersorgungsfallCompositionConverter extends EncounterToCompositionConverter<StationaererVersorgungsfallComposition> { - private final String AUFNAHME_GRUND_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund"; - private final String AUFNAHME_ANLASS_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass"; - private final String ART_DER_ENTLASSUNG_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund"; + private static final String AUFNAHME_GRUND_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund"; + private static final String AUFNAHME_ANLASS_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass"; + private static final String ART_DER_ENTLASSUNG_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund"; + private static final String INVALID_CODE = "Invalid Code "; @Override public StationaererVersorgungsfallComposition convertInternal(@NonNull Encounter encounter) { @@ -37,70 +37,81 @@ public StationaererVersorgungsfallComposition convertInternal(@NonNull Encounter retVal.setFallstatusDefiningCode(StationaererVersorgungsfallDefiningCodeMaps.getFallStatusMap().get(encounter.getStatus())); retVal.setFallKennungValue(encounter.getIdentifier().get(0).getValue()); + retVal.setAufnahmedaten(createAufnahmedatenAdminEntry(encounter)); + + if (encounter.getPeriod().hasEndElement()) { + + retVal.setEntlassungsdaten(createEntlassungsdatenAdminEntry(encounter)); + } + + return retVal; + } + + private AufnahmedatenAdminEntry createAufnahmedatenAdminEntry(Encounter encounter) { AufnahmedatenAdminEntry aufnahmedatenAdminEntry = new AufnahmedatenAdminEntry(); OffsetDateTime startDateTime = OffsetDateTime.from(encounter.getPeriod().getStartElement().getValueAsCalendar().toZonedDateTime()); aufnahmedatenAdminEntry.setDatumUhrzeitDerAufnahmeValue(startDateTime); if (encounter.getReasonCode() != null - && encounter.getReasonCode().get(0).getCoding() != null) { + && encounter.getReasonCode().get(0).getCoding() != null) { Coding aufnahmeGrund = encounter.getReasonCode().get(0).getCoding().get(0); if (aufnahmeGrund.getSystem().equals(AUFNAHME_GRUND_CODE_SYSTEM) - && StationaererVersorgungsfallDefiningCodeMaps.getAufnahmeGrundMap().containsKey(aufnahmeGrund.getCode())) { + && StationaererVersorgungsfallDefiningCodeMaps.getAufnahmeGrundMap().containsKey(aufnahmeGrund.getCode())) { aufnahmedatenAdminEntry.setAufnahmegrundDefiningCode(StationaererVersorgungsfallDefiningCodeMaps.getAufnahmeGrundMap().get(aufnahmeGrund.getCode())); } else { - throw new IllegalStateException("Invalid Code " + aufnahmeGrund.getCode() + + throw new IllegalStateException(INVALID_CODE + aufnahmeGrund.getCode() + " or Code System for mapping of 'Aufnahmegrund', valid codes are: 01, 02, 03, 04, 05, 06, 07, 08, 10."); } } if (encounter.getHospitalization() != null - && encounter.getHospitalization().getAdmitSource() != null) { + && encounter.getHospitalization().getAdmitSource() != null) { Coding aufnahmeAnlass = encounter.getHospitalization().getAdmitSource().getCoding().get(0); if (aufnahmeAnlass.getSystem().equals(AUFNAHME_ANLASS_CODE_SYSTEM) - && StationaererVersorgungsfallDefiningCodeMaps.getAufnahmeAnlassMap().containsKey(aufnahmeAnlass.getCode())) { + && StationaererVersorgungsfallDefiningCodeMaps.getAufnahmeAnlassMap().containsKey(aufnahmeAnlass.getCode())) { aufnahmedatenAdminEntry.setAufnahmeanlassDefiningCode(StationaererVersorgungsfallDefiningCodeMaps.getAufnahmeAnlassMap().get(aufnahmeAnlass.getCode())); } else { - throw new IllegalStateException("Invalid Code " + aufnahmeAnlass.getCode() + + throw new IllegalStateException(INVALID_CODE + aufnahmeAnlass.getCode() + " or Code System for mapping of 'Aufnahmeanlass', valid codes are: N, G, E, A, V, Z, B, R."); } } aufnahmedatenAdminEntry.setSubject(new PartySelf()); aufnahmedatenAdminEntry.setLanguage(Language.DE); - retVal.setAufnahmedaten(aufnahmedatenAdminEntry); - if (encounter.getPeriod().hasEndElement()) { + return aufnahmedatenAdminEntry; + } - EntlassungsdatenAdminEntry entlassungsdatenAdminEntry = new EntlassungsdatenAdminEntry(); + private EntlassungsdatenAdminEntry createEntlassungsdatenAdminEntry(Encounter encounter) { - OffsetDateTime endDateTime = OffsetDateTime.from(encounter.getPeriod().getEndElement().getValueAsCalendar().toZonedDateTime()); - entlassungsdatenAdminEntry.setDatumUhrzeitDerEntlassungValue(endDateTime); + EntlassungsdatenAdminEntry entlassungsdatenAdminEntry = new EntlassungsdatenAdminEntry(); - if (encounter.getHospitalization() != null - && encounter.getHospitalization().getDischargeDisposition() != null) { + OffsetDateTime endDateTime = OffsetDateTime.from(encounter.getPeriod().getEndElement().getValueAsCalendar().toZonedDateTime()); + entlassungsdatenAdminEntry.setDatumUhrzeitDerEntlassungValue(endDateTime); - Coding artDerEntlassung = encounter.getHospitalization().getDischargeDisposition().getCoding().get(0); + if (encounter.getHospitalization() != null + && encounter.getHospitalization().getDischargeDisposition() != null) { - if (artDerEntlassung.getSystem().equals(ART_DER_ENTLASSUNG_CODE_SYSTEM) - && StationaererVersorgungsfallDefiningCodeMaps.getArtDerEntlassungMap().containsKey(artDerEntlassung.getCode())) { + Coding artDerEntlassung = encounter.getHospitalization().getDischargeDisposition().getCoding().get(0); - entlassungsdatenAdminEntry.setArtDerEntlassungDefiningCode(StationaererVersorgungsfallDefiningCodeMaps.getArtDerEntlassungMap().get(artDerEntlassung.getCode())); - } else { - throw new IllegalStateException("Invalid Code " + artDerEntlassung.getCode() + - " or Code System for mapping of 'art der Entlassung'."); - } - } + if (artDerEntlassung.getSystem().equals(ART_DER_ENTLASSUNG_CODE_SYSTEM) + && StationaererVersorgungsfallDefiningCodeMaps.getArtDerEntlassungMap().containsKey(artDerEntlassung.getCode())) { - entlassungsdatenAdminEntry.setSubject(new PartySelf()); - entlassungsdatenAdminEntry.setLanguage(Language.DE); - retVal.setEntlassungsdaten(entlassungsdatenAdminEntry); + entlassungsdatenAdminEntry.setArtDerEntlassungDefiningCode(StationaererVersorgungsfallDefiningCodeMaps.getArtDerEntlassungMap().get(artDerEntlassung.getCode())); + } else { + throw new IllegalStateException(INVALID_CODE + artDerEntlassung.getCode() + + " or Code System for mapping of 'art der Entlassung'."); + } } - return retVal; + entlassungsdatenAdminEntry.setSubject(new PartySelf()); + entlassungsdatenAdminEntry.setLanguage(Language.DE); + + return entlassungsdatenAdminEntry; } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallDefiningCodeMaps.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallDefiningCodeMaps.java index 8c0eb5890..88fe4f82b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallDefiningCodeMaps.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallDefiningCodeMaps.java @@ -18,6 +18,10 @@ class StationaererVersorgungsfallDefiningCodeMaps { private static final Map<String, KlinischerZustandDesPatientenDefiningCode> klinischerZustandMap = new HashMap<>(); private static final Map<String, FallstatusDefiningCode> fallStatusMap = new HashMap<>(); + private StationaererVersorgungsfallDefiningCodeMaps() { + throw new IllegalStateException("Utility class"); + } + static { for(AufnahmegrundDefiningCode aufnahmegrundDefiningCode : AufnahmegrundDefiningCode.values()) { diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Encounters.java b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Encounters.java index c53b43091..bda82cd11 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Encounters.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Encounters.java @@ -8,6 +8,10 @@ public class Encounters { + private Encounters() { + throw new IllegalStateException("Utility class"); + } + public static Profile getProfileByKontaktEbene(Encounter encounter) { if (encounter.getType() != null && encounter.getType().size() > 0 ) { diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/support/KontaktebeneDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/fhir/support/KontaktebeneDefiningCode.java index c102e0b51..be8ff13e4 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/support/KontaktebeneDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/support/KontaktebeneDefiningCode.java @@ -8,7 +8,7 @@ public enum KontaktebeneDefiningCode implements EnumValueSet { ABTEILUNGS_KONTAKT("Abteilungskontakt","Beschreibt den Kontakt zur Abteilung.","","abteilungskontakt"), - VERSORGUNGS_STELLEN_KONTAKT("Versorgungsstellenkontakt","Beschreibt den Kontakt zur Versorgungsstelle.\n","","versorgungsstellenkontakt"); + VERSORGUNGS_STELLEN_KONTAKT("Versorgungsstellenkontakt","Beschreibt den Kontakt zur Versorgungsstelle.","","versorgungsstellenkontakt"); private String value; diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java index bbfe02c1f..f6ccb1885 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java @@ -24,6 +24,8 @@ import org.hl7.fhir.r4.model.QuestionnaireResponse; import org.hl7.fhir.r4.model.Resource; import org.hl7.fhir.r4.model.Encounter; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.util.Arrays; import java.util.Collections; @@ -38,6 +40,8 @@ public class Resources { public static final String RFC_4122_SYSTEM = "urn:ietf:rfc:4122"; + private static final Logger LOG = LoggerFactory.getLogger(Resources.class); + private Resources() { } @@ -91,20 +95,17 @@ public static Optional<Identifier> getSubjectIdentifier(Resource resource, Optio } else if (resource instanceof QuestionnaireResponse) { subjectIdentifier = getQuestionnaireId((QuestionnaireResponse) resource, openEhrClient, patientIdRepository); } else if (resource instanceof Encounter) { - subjectIdentifier = getEncounterIdentifier((Encounter) resource, openEhrClient, patientIdRepository); + subjectIdentifier = getEncounterIdentifier((Encounter) resource, openEhrClient); } return Optional.ofNullable(subjectIdentifier); } - private static Identifier getEncounterIdentifier(Encounter resource, Optional<OpenEhrClient> openEhrClient, Optional<PatientIdRepository> patientIdRepository) { + private static Identifier getEncounterIdentifier(Encounter resource, Optional<OpenEhrClient> openEhrClient) { if (openEhrClient.isEmpty()) { throw new InternalErrorException("getSubjectIdentifier by Encounter was called without a configured openEHRClient as parameter. Please add one."); } - if (patientIdRepository.isEmpty()) { - throw new InternalErrorException("PatientIdRepository is required by Encounter in getSubjectIdentifier()"); - } // @formatter:off Query<Record1<UUID>> query = Query.buildNativeQuery( @@ -115,17 +116,17 @@ private static Identifier getEncounterIdentifier(Encounter resource, Optional<Op List<Record1<UUID>> result = openEhrClient.get().aqlEndpoint().execute(query, new ParameterValue<>("subject", resource.getSubject().getIdentifier().getValue())); - System.out.println("Subject ID from Encounter: " + resource.getSubject().getIdentifier().getValue()); + LOG.debug("Subject ID from Encounter: " + resource.getSubject().getIdentifier().getValue()); // create ehr if patient not exist if (result.isEmpty()) { - return createEHRWithSubjectID(openEhrClient.get(), patientIdRepository.get(), resource.getSubject().getIdentifier().getValue()); + return createEHRWithSubjectID(openEhrClient.get(), resource.getSubject().getIdentifier().getValue()); } else { return resource.getSubject().getIdentifier(); } } - private static Identifier createEHRWithSubjectID(OpenEhrClient openEhrClient, PatientIdRepository patientIdRepository, String patientID) { + private static Identifier createEHRWithSubjectID(OpenEhrClient openEhrClient, String patientID) { PartySelf subject = new PartySelf(); PartyRef externalRef = new PartyRef(); @@ -139,7 +140,6 @@ private static Identifier createEHRWithSubjectID(OpenEhrClient openEhrClient, Pa DvText dvText = new DvText("any EHR status"); EhrStatus ehrStatus = new EhrStatus("openEHR-EHR-ITEM_TREE.generic.v1", dvText, subject, true, true, null); UUID ehrId = openEhrClient.ehrEndpoint().createEhr(ehrStatus); - System.out.println("created EhrID from Encounter: " + ehrId.toString()); Identifier identifier = new Identifier(); identifier.setValue(genericId.getValue()); return identifier; @@ -175,7 +175,7 @@ private static Identifier createQuestionnaireEHRAndReturnPatientId(OpenEhrClient DvText dvText = new DvText("any EHR status"); EhrStatus ehrStatus = new EhrStatus("openEHR-EHR-ITEM_TREE.generic.v1", dvText, subject, true, true, null); UUID ehrId = openEhrClient.ehrEndpoint().createEhr(ehrStatus); - System.out.println("EhrID: " + ehrId.toString()); + LOG.debug("EhrID: " + ehrId.toString()); Identifier identifier = new Identifier(); identifier.setValue(genericId.getValue()); return identifier; From 74f0df7f8588fea08944e5953137248cd8aaf05b Mon Sep 17 00:00:00 2001 From: zhu13 <yufei.zhu@med.uni-goettingen.de> Date: Thu, 20 May 2021 11:19:54 +0200 Subject: [PATCH 071/141] fix code smells again --- ...tientenAufenthaltCompositionConverter.java | 45 +++++++++++-------- .../fhirbridge/fhir/support/Resources.java | 1 + 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java index 60ff2586a..3754b5448 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java @@ -39,24 +39,33 @@ public PatientenaufenthaltComposition convertInternal(@NonNull Encounter encount String typeCode = encounter.getType().get(0).getCoding().get(0).getCode(); - if (typeCode.equals(KontaktebeneDefiningCode.EINRICHTUNGS_KONTAKT.getCode())) { - - VersorgungsfallCluster versorgungsfallCluster = new VersorgungsfallCluster(); - versorgungsfallCluster.setZugehoerigerVersorgungsfallKennungValue(encounterIdentifier.getValue()); - retVal.setVersorgungsfall(versorgungsfallCluster); - } else if (typeCode.equals(KontaktebeneDefiningCode.ABTEILUNGS_KONTAKT.getCode())) { - - AbteilungsfallCluster abteilungsfallCluster = new AbteilungsfallCluster(); - abteilungsfallCluster.setZugehoerigerAbteilungsfallKennungValue(encounterIdentifier.getValue()); - retVal.setAbteilungsfall(abteilungsfallCluster); - } else if (typeCode.equals(KontaktebeneDefiningCode.VERSORGUNGS_STELLEN_KONTAKT.getCode())) { - - VersorgungstellenkontaktCluster versorgungstellenkontaktCluster = new VersorgungstellenkontaktCluster(); - versorgungstellenkontaktCluster.setZugehoerigerVersorgungsstellenkontaktKennungValue(encounterIdentifier.getValue()); - retVal.setVersorgungstellenkontakt(versorgungstellenkontaktCluster); - } else{ - throw new IllegalStateException("Invalid Code " + typeCode + - " or Code System as 'Kontaktebene', valid codes are einrichtungskontakt, abteilungskontakt, versorgungsstellenkontakt."); + switch (typeCode) { + + case "Einrichtungskontakt": + { + VersorgungsfallCluster versorgungsfallCluster = new VersorgungsfallCluster(); + versorgungsfallCluster.setZugehoerigerVersorgungsfallKennungValue(encounterIdentifier.getValue()); + retVal.setVersorgungsfall(versorgungsfallCluster); + break; + } + case "Abteilungskontakt": + { + AbteilungsfallCluster abteilungsfallCluster = new AbteilungsfallCluster(); + abteilungsfallCluster.setZugehoerigerAbteilungsfallKennungValue(encounterIdentifier.getValue()); + retVal.setAbteilungsfall(abteilungsfallCluster); + break; + } + case "Versorgungsstellenkontakt": + { + VersorgungstellenkontaktCluster versorgungstellenkontaktCluster = new VersorgungstellenkontaktCluster(); + versorgungstellenkontaktCluster.setZugehoerigerVersorgungsstellenkontaktKennungValue(encounterIdentifier.getValue()); + retVal.setVersorgungstellenkontakt(versorgungstellenkontaktCluster); + } + default: + { + throw new IllegalStateException("Invalid Code " + typeCode + + " or Code System as 'Kontaktebene', valid codes are einrichtungskontakt, abteilungskontakt, versorgungsstellenkontakt."); + } } } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java index f6ccb1885..cc858df22 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java @@ -140,6 +140,7 @@ private static Identifier createEHRWithSubjectID(OpenEhrClient openEhrClient, St DvText dvText = new DvText("any EHR status"); EhrStatus ehrStatus = new EhrStatus("openEHR-EHR-ITEM_TREE.generic.v1", dvText, subject, true, true, null); UUID ehrId = openEhrClient.ehrEndpoint().createEhr(ehrStatus); + LOG.debug("created EhrID: " + ehrId.toString()); Identifier identifier = new Identifier(); identifier.setValue(genericId.getValue()); return identifier; From 4923c032ae75358639327fe2e53fed635eefb2be Mon Sep 17 00:00:00 2001 From: zhu13 <yufei.zhu@med.uni-goettingen.de> Date: Thu, 20 May 2021 16:19:23 +0200 Subject: [PATCH 072/141] fix switch case --- .../PatientenAufenthaltCompositionConverter.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java index 3754b5448..521de9836 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java @@ -41,28 +41,25 @@ public PatientenaufenthaltComposition convertInternal(@NonNull Encounter encount switch (typeCode) { - case "Einrichtungskontakt": - { + case "Einrichtungskontakt": { VersorgungsfallCluster versorgungsfallCluster = new VersorgungsfallCluster(); versorgungsfallCluster.setZugehoerigerVersorgungsfallKennungValue(encounterIdentifier.getValue()); retVal.setVersorgungsfall(versorgungsfallCluster); break; } - case "Abteilungskontakt": - { + case "Abteilungskontakt": { AbteilungsfallCluster abteilungsfallCluster = new AbteilungsfallCluster(); abteilungsfallCluster.setZugehoerigerAbteilungsfallKennungValue(encounterIdentifier.getValue()); retVal.setAbteilungsfall(abteilungsfallCluster); break; } - case "Versorgungsstellenkontakt": - { + case "Versorgungsstellenkontakt": { VersorgungstellenkontaktCluster versorgungstellenkontaktCluster = new VersorgungstellenkontaktCluster(); versorgungstellenkontaktCluster.setZugehoerigerVersorgungsstellenkontaktKennungValue(encounterIdentifier.getValue()); retVal.setVersorgungstellenkontakt(versorgungstellenkontaktCluster); + break; } - default: - { + default: { throw new IllegalStateException("Invalid Code " + typeCode + " or Code System as 'Kontaktebene', valid codes are einrichtungskontakt, abteilungskontakt, versorgungsstellenkontakt."); } From 13e5cb015a98bbb245d67e2c93cf2223a9616432 Mon Sep 17 00:00:00 2001 From: Pablo Pazos <pablo.pazos@cabolabs.com> Date: Fri, 21 May 2021 01:18:44 -0300 Subject: [PATCH 073/141] all test fixed for #212 --- tests/robot/OBSERVATION/04_create_heart_rate.robot | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/robot/OBSERVATION/04_create_heart_rate.robot b/tests/robot/OBSERVATION/04_create_heart_rate.robot index 27d9364f5..297d60c87 100644 --- a/tests/robot/OBSERVATION/04_create_heart_rate.robot +++ b/tests/robot/OBSERVATION/04_create_heart_rate.robot @@ -305,7 +305,7 @@ Force Tags observation_create heart-rate create Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute test /min false 422 1 Coding.system must be an absolute reference, not a local reference Coding.system muss eine absolute Referenz sein, nicht eine lokale Referenz Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute ${12345} /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute ${EMPTY} /min false 422 1 A code with no system has no defined meaning. A system should be provided A code with no system has no defined meaning. A system should be provided - Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute missing /min false 422 1 A code with no system has no defined meaning. A system should be provided A code with no system has no defined meaning. A system should be provided + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute missing /min false 422 1 If a code for the unit is present, the system SHALL also be present If a code for the unit is present, the system SHALL also be present # invalid code Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org test false 422 1 Value is Der Wert ist Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org ${12345} false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. @@ -348,7 +348,7 @@ Force Tags observation_create heart-rate create Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true test ${1234} test ${1234} false 422 2 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true missing ${EMPTY} http://google.com test false 422 2 All FHIR elements must have a @value or childre All FHIR elements must have a @value or childre Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${EMPTY} missing test missing false 422 5 minimum required = 1, but only found 0 https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.value - Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${EMPTY} ${1234} missing test false 422 3 A code with no system has no defined meaning. A system should be provided A code with no system has no defined meaning. A system should be provided + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true valid 2020-02-25 true ${EMPTY} ${1234} missing test false 422 3 If a code for the unit is present, the system SHALL also be present If a code for the unit is present, the system SHALL also be present # all attributes invalid for code Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true false http://loinc.org 8867-4 Heart rate ${EMPTY} ${12345} Heart rate (observable entity) ${12345} true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 minimum required = 1, but only found 0 https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.code.coding, aber nur gefunden Observation.code.coding:HeartRateCode Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} true valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 6 @value cannot be empty @value kann nicht leer sein @@ -379,12 +379,12 @@ Force Tags observation_create heart-rate create Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} false true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 27 Value is '1234' but must be '/min' Wert ist Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true false ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 28 Value is '1234' but must be '/min' Wert ist Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} false true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 19 Value is '1234' but must be '/min' Wert ist - Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true false ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 19 Value is '1234' but must be '/min' Wert ist + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true false ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 20 Value is '1234' but must be '/min' Wert ist Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true true ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} false valid 2020-02-25 true test ${1234} ${1234} ${1234} false 422 31 Value is '1234' but must be '/min' Wert ist - Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true false ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true test 2020-02-25 true test ${1234} ${1234} ${1234} false 422 19 Value is '1234' but must be '/min' Wert ist + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true false ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true test 2020-02-25 true test ${1234} ${1234} ${1234} false 422 20 Value is '1234' but must be '/min' Wert ist Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true false ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid ${12345} true test ${1234} ${1234} ${1234} false 422 24 Value is '1234' but must be '/min' Wert ist Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true false ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 false test ${1234} ${1234} ${1234} false 422 12 minimum required = 1, but only found 0 https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.code.coding, aber nur gefunden Observation.code.coding:HeartRateCode - Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true false ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} true 422 20 Value is '1234' but must be '/min' Wert ist + Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true test ${1234} ${1234} ${1234} true ${1234} true true ${1234} ${1234} true false ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} ${1234} true valid 2020-02-25 true test ${1234} ${1234} ${1234} true 422 21 Value is '1234' but must be '/min' Wert ist *** Keywords *** From 39a79ad89654200ac541c65e43b61a632d7ad66b Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 25 May 2021 09:26:25 +0200 Subject: [PATCH 074/141] Implement Provide Procedure and Provide Questionnaire-Response --- .../condition/ProvideConditionComponent.java | 3 +- .../fhir/consent/ProvideConsentComponent.java | 3 +- .../ProvideMedicationStatementComponent.java | 4 +- .../fhir/patient/ProvidePatientComponent.java | 4 +- ...nt.java => ProvideProcedureComponent.java} | 15 +++-- ...rovideQuestionnaireResponseComponent.java} | 15 +++-- .../fhirbridge/camel/route/PatientRoutes.java | 1 + .../camel/route/ProcedureRoutes.java | 19 ++---- .../route/QuestionnaireResponseRoutes.java | 18 ++--- .../config/CamelProcessorConfiguration.java | 12 ++++ .../common/audit/FhirBridgeEventType.java | 30 +++++---- .../patient/FindPatientAuditStrategy.java | 2 +- .../procedure/CreateProcedureProvider.java | 43 ------------ .../procedure/FindProcedureAuditStrategy.java | 2 +- ...ava => ProvideProcedureAuditStrategy.java} | 9 ++- .../procedure/ProvideProcedureProvider.java | 65 +++++++++++++++++++ ....java => ProvideProcedureTransaction.java} | 18 ++--- .../CreateQuestionnaireResponseProvider.java | 43 ------------ ...indQuestionnaireResponseAuditStrategy.java | 2 +- ...deQuestionnaireResponseAuditStrategy.java} | 17 ++--- .../ProvideQuestionnaireResponseProvider.java | 65 +++++++++++++++++++ ...videQuestionnaireResponseTransaction.java} | 18 ++--- .../apache/camel/component/procedure-create | 1 - .../apache/camel/component/procedure-provide | 1 + ...-create => questionnaire-response-provide} | 2 +- 25 files changed, 231 insertions(+), 181 deletions(-) rename src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/procedure/{CreateProcedureComponent.java => ProvideProcedureComponent.java} (66%) rename src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/questionnaireresponse/{CreateQuestionnaireResponseComponent.java => ProvideQuestionnaireResponseComponent.java} (63%) delete mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/procedure/CreateProcedureProvider.java rename src/main/java/org/ehrbase/fhirbridge/fhir/procedure/{CreateProcedureAuditStrategy.java => ProvideProcedureAuditStrategy.java} (78%) create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureProvider.java rename src/main/java/org/ehrbase/fhirbridge/fhir/procedure/{CreateProcedureTransaction.java => ProvideProcedureTransaction.java} (69%) delete mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/CreateQuestionnaireResponseProvider.java rename src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/{CreateQuestionnaireResponseAuditStrategy.java => ProvideQuestionnaireResponseAuditStrategy.java} (64%) create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseProvider.java rename src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/{CreateQuestionnaireResponseTransaction.java => ProvideQuestionnaireResponseTransaction.java} (66%) delete mode 100644 src/main/resources/META-INF/services/org/apache/camel/component/procedure-create create mode 100644 src/main/resources/META-INF/services/org/apache/camel/component/procedure-provide rename src/main/resources/META-INF/services/org/apache/camel/component/{questionnaire-response-create => questionnaire-response-provide} (58%) diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/condition/ProvideConditionComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/condition/ProvideConditionComponent.java index c7ca53df7..8e9919803 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/condition/ProvideConditionComponent.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/condition/ProvideConditionComponent.java @@ -21,7 +21,8 @@ import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; /** - * {@link org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirComponent FhirComponent} for 'Provide Condition' transaction. + * {@link org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirComponent FhirComponent} + * for 'Provide Condition' transaction. * * @since 1.2.0 */ diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/consent/ProvideConsentComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/consent/ProvideConsentComponent.java index add649232..dd75de02b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/consent/ProvideConsentComponent.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/consent/ProvideConsentComponent.java @@ -21,7 +21,8 @@ import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; /** - * {@link org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirComponent FhirComponent} for 'Provide Consent' transaction. + * {@link org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirComponent FhirComponent} + * for 'Provide Consent' transaction. * * @since 1.2.0 */ diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/medicationstatement/ProvideMedicationStatementComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/medicationstatement/ProvideMedicationStatementComponent.java index 8ff12be1e..18a0da546 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/medicationstatement/ProvideMedicationStatementComponent.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/medicationstatement/ProvideMedicationStatementComponent.java @@ -21,8 +21,8 @@ import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; /** - * {@link org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirComponent FhirComponent} for - * 'Provide Medication Statement' transaction. + * {@link org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirComponent FhirComponent} + * for 'Provide Medication Statement' transaction. * * @since 1.2.0 */ diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/patient/ProvidePatientComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/patient/ProvidePatientComponent.java index 3afe365da..8982b548b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/patient/ProvidePatientComponent.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/patient/ProvidePatientComponent.java @@ -21,8 +21,8 @@ import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; /** - * {@link org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirComponent FhirComponent} for - * 'Provide Patient' transaction. + * {@link org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirComponent FhirComponent} + * for 'Provide Patient' transaction. * * @since 1.2.0 */ diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/procedure/CreateProcedureComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/procedure/ProvideProcedureComponent.java similarity index 66% rename from src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/procedure/CreateProcedureComponent.java rename to src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/procedure/ProvideProcedureComponent.java index 484744157..cec282a5a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/procedure/CreateProcedureComponent.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/procedure/ProvideProcedureComponent.java @@ -16,19 +16,20 @@ package org.ehrbase.fhirbridge.camel.component.fhir.procedure; -import org.ehrbase.fhirbridge.fhir.procedure.CreateProcedureTransaction; +import org.ehrbase.fhirbridge.fhir.procedure.ProvideProcedureTransaction; import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; /** - * Camel {@link org.apache.camel.Component Component} that handles 'Create Procedure' transaction. + * {@link org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirComponent FhirComponent} + * for 'Provide Procedure' transaction. * - * @since 1.0.0 + * @since 1.2.0 */ -@SuppressWarnings({"java:S110"}) -public class CreateProcedureComponent extends CustomFhirComponent<GenericFhirAuditDataset> { +@SuppressWarnings("java:S110") +public class ProvideProcedureComponent extends CustomFhirComponent<GenericFhirAuditDataset> { - public CreateProcedureComponent() { - super(new CreateProcedureTransaction()); + public ProvideProcedureComponent() { + super(new ProvideProcedureTransaction()); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/questionnaireresponse/CreateQuestionnaireResponseComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/questionnaireresponse/ProvideQuestionnaireResponseComponent.java similarity index 63% rename from src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/questionnaireresponse/CreateQuestionnaireResponseComponent.java rename to src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/questionnaireresponse/ProvideQuestionnaireResponseComponent.java index 1f5ad2a1f..d8f6b6eea 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/questionnaireresponse/CreateQuestionnaireResponseComponent.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/questionnaireresponse/ProvideQuestionnaireResponseComponent.java @@ -16,19 +16,20 @@ package org.ehrbase.fhirbridge.camel.component.fhir.questionnaireresponse; -import org.ehrbase.fhirbridge.fhir.questionnaireresponse.CreateQuestionnaireResponseTransaction; +import org.ehrbase.fhirbridge.fhir.questionnaireresponse.ProvideQuestionnaireResponseTransaction; import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; /** - * Camel {@link org.apache.camel.Component Component} that handles 'Create Questionnaire-Response' transaction. + * {@link org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirComponent FhirComponent} + * for 'Provide Questionnaire-Response' transaction. * - * @since 1.0.0 + * @since 1.2.0 */ -@SuppressWarnings({"java:S110"}) -public class CreateQuestionnaireResponseComponent extends CustomFhirComponent<GenericFhirAuditDataset> { +@SuppressWarnings("java:S110") +public class ProvideQuestionnaireResponseComponent extends CustomFhirComponent<GenericFhirAuditDataset> { - public CreateQuestionnaireResponseComponent() { - super(new CreateQuestionnaireResponseTransaction()); + public ProvideQuestionnaireResponseComponent() { + super(new ProvideQuestionnaireResponseTransaction()); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java index 9720d55fc..0d62657fb 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java @@ -30,6 +30,7 @@ public class PatientRoutes extends AbstractRouteBuilder { @Override public void configure() throws Exception { // @formatter:off + super.configure(); // Route: Provide Patient from("patient-provide:consumer?fhirContext=#fhirContext") diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java index a25bd2b8c..de114fc8d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java @@ -17,8 +17,6 @@ package org.ehrbase.fhirbridge.camel.route; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.CamelConstants; -import org.ehrbase.fhirbridge.camel.processor.ResourceResponseProcessor; import org.hl7.fhir.r4.model.Procedure; import org.springframework.stereotype.Component; @@ -36,19 +34,14 @@ public void configure() throws Exception { // @formatter:off super.configure(); - // 'Create Procedure' route definition - from("procedure-create:consumer?fhirContext=#fhirContext") - .onCompletion() - .process("auditCreateResourceProcessor") - .end() + // Route: Provide Procedure + from("procedure-provide:consumer?fhirContext=#fhirContext") + .routeId("provide-procedure-route") .process("fhirProfileValidator") - .setHeader(CamelConstants.METHOD_OUTCOME, method("procedureDao", "create(${body}, ${headers.FhirRequestDetails})")) - .process("ehrIdLookupProcessor") - .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") - .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") - .process(new ResourceResponseProcessor()); + .process("provideProcedurePersistenceProcessor") + .to("direct:internal-provide-resource"); - // 'Find Procedure' route definition + // Route: 'Find Procedure' from("procedure-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") .choice() .when(isSearchOperation()) diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java index 5dad408af..3a57e5971 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java @@ -17,7 +17,6 @@ package org.ehrbase.fhirbridge.camel.route; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.CamelConstants; import org.hl7.fhir.r4.model.QuestionnaireResponse; import org.springframework.stereotype.Component; @@ -35,19 +34,14 @@ public void configure() throws Exception { // @formatter:off super.configure(); - // 'Create Questionnaire-Response' route definition - from("questionnaire-response-create:consumer?fhirContext=#fhirContext") - .onCompletion() - .process("auditCreateResourceProcessor") - .end() + // Route: Provide Questionnaire-Response + from("questionnaire-response-provide:consumer?fhirContext=#fhirContext") + .routeId("provide-questionnaire-response-route") .process("fhirProfileValidator") - .setHeader(CamelConstants.METHOD_OUTCOME, method("questionnaireResponseDao", "create(${body}, ${headers.FhirRequestDetails})")) - .process("ehrIdLookupProcessor") - .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") - .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") - .process("resourceResponseProcessor"); + .process("provideQuestionnaireResponsePersistenceProcessor") + .to("direct:internal-provide-resource"); - // 'Find Questionnaire-Response' route definition + // Route: Find Questionnaire-Response from("questionnaire-response-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") .choice() .when(isSearchOperation()) diff --git a/src/main/java/org/ehrbase/fhirbridge/config/CamelProcessorConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/CamelProcessorConfiguration.java index 2300777cb..8497557b3 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/CamelProcessorConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/CamelProcessorConfiguration.java @@ -8,6 +8,8 @@ import org.hl7.fhir.r4.model.MedicationStatement; import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Patient; +import org.hl7.fhir.r4.model.Procedure; +import org.hl7.fhir.r4.model.QuestionnaireResponse; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -44,4 +46,14 @@ public ProvideResourcePersistenceProcessor<MedicationStatement> provideMedicatio public ProvideResourcePersistenceProcessor<Patient> providePatientPersistenceProcessor(IFhirResourceDao<Patient> patientDao) { return new ProvideResourcePersistenceProcessor<>(patientDao, Patient.class, resourceMapRepository); } + + @Bean + public ProvideResourcePersistenceProcessor<Procedure> provideProcedurePersistenceProcessor(IFhirResourceDao<Procedure> procedureDao) { + return new ProvideResourcePersistenceProcessor<>(procedureDao, Procedure.class, resourceMapRepository); + } + + @Bean + public ProvideResourcePersistenceProcessor<QuestionnaireResponse> provideQuestionnaireResponsePersistenceProcessor(IFhirResourceDao<QuestionnaireResponse> questionnaireResponseDao) { + return new ProvideResourcePersistenceProcessor<>(questionnaireResponseDao, QuestionnaireResponse.class, resourceMapRepository); + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java b/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java index aed090f98..e25fb3e4a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java @@ -24,29 +24,35 @@ public enum FhirBridgeEventType implements EventType, EnumeratedCodedValue<Event FIND_MEDICATION_STATEMENT("medication-statement-find", "Find Medication Statement"), - // Review + // Patient - FindAuditEvent("audit-event-find", "Find Audit Event"), + PROVIDE_PATIENT("patient-provide", "Provide Patient"), - CreateDiagnosticReport("diagnostic-report-create", "Create Diagnostic Report"), + FIND_PATIENT("patient-find", "Find Patient"), - FindDiagnosticReport("diagnostic-report-find", "Find Diagnostic Report"), + // Procedure - CreateObservation("observation-create", "Create Observation"), + PROVIDE_PROCEDURE("procedure-provide", "Provide Procedure"), - FindObservation("observation-find", "Find Observation"), + FIND_PROCEDURE("procedure-find", "Find Procedure"), - CreatePatient("patient-create", "Create Patient"), + // Questionnaire-Response - FindPatient("patient-find", "Find Patient"), + PROVIDE_QUESTIONNAIRE_RESPONSE("questionnaire-response-provide", "Provide Questionnaire Response"), - CreateProcedure("procedure-create", "Create Procedure"), + FIND_QUESTIONNAIRE_RESPONSE("questionnaire-response-find", "Find Questionnaire Response"), - FindProcedure("procedure-find", "Find Procedure"), + // Review - CreateQuestionnaireResponse("questionnaire-response-create", "Create Questionnaire Response"), + FindAuditEvent("audit-event-find", "Find Audit Event"), + + CreateDiagnosticReport("diagnostic-report-create", "Create Diagnostic Report"), + + FindDiagnosticReport("diagnostic-report-find", "Find Diagnostic Report"), + + CreateObservation("observation-create", "Create Observation"), - FindQuestionnaireResponse("questionnaire-response-find", "Find Questionnaire Response"); + FindObservation("observation-find", "Find Observation"); private final EventType value; diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/patient/FindPatientAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/patient/FindPatientAuditStrategy.java index c7ecafb86..924b04059 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/patient/FindPatientAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/patient/FindPatientAuditStrategy.java @@ -38,7 +38,7 @@ public FindPatientAuditStrategy() { @Override public AuditMessage[] makeAuditMessage(AuditContext auditContext, FhirQueryAuditDataset auditDataset) { - return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FindPatient) + return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FIND_PATIENT) .addPatients(auditDataset.getPatientIds()) .getMessages(); } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/CreateProcedureProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/CreateProcedureProvider.java deleted file mode 100644 index 5e807ca09..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/CreateProcedureProvider.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.fhir.procedure; - -import ca.uhn.fhir.rest.annotation.Create; -import ca.uhn.fhir.rest.annotation.ResourceParam; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.api.server.RequestDetails; -import org.hl7.fhir.r4.model.Procedure; -import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * Implementation of {@link org.openehealth.ipf.commons.ihe.fhir.FhirProvider FhirProvider} that provides REST support - * for 'Create Procedure' transaction. - * - * @since 1.0.0 - */ -public class CreateProcedureProvider extends AbstractPlainProvider { - - @Create - @SuppressWarnings("unused") - public MethodOutcome createProcedure(@ResourceParam Procedure procedure, RequestDetails requestDetails, - HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) { - return requestAction(procedure, null, httpServletRequest, httpServletResponse, requestDetails); - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/FindProcedureAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/FindProcedureAuditStrategy.java index 5357ec36f..56f6f48ed 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/FindProcedureAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/FindProcedureAuditStrategy.java @@ -38,7 +38,7 @@ public FindProcedureAuditStrategy() { @Override public AuditMessage[] makeAuditMessage(AuditContext auditContext, FhirQueryAuditDataset auditDataset) { - return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FindPatient) + return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FIND_PATIENT) .addPatients(auditDataset.getPatientIds()) .getMessages(); } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/CreateProcedureAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureAuditStrategy.java similarity index 78% rename from src/main/java/org/ehrbase/fhirbridge/fhir/procedure/CreateProcedureAuditStrategy.java rename to src/main/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureAuditStrategy.java index 67db57069..d1fc52742 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/CreateProcedureAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureAuditStrategy.java @@ -23,14 +23,13 @@ import java.util.Optional; /** - * Implementation of {@link org.openehealth.ipf.commons.ihe.core.atna.AuditStrategy AuditStrategy} - * for 'Create Procedure' transaction. + * Custom implementation of {@link GenericFhirAuditStrategy} for 'Provide Procedure' transaction. * - * @since 1.0.0 + * @since 1.2.0 */ -public class CreateProcedureAuditStrategy extends GenericFhirAuditStrategy<Procedure> { +public class ProvideProcedureAuditStrategy extends GenericFhirAuditStrategy<Procedure> { - public CreateProcedureAuditStrategy() { + public ProvideProcedureAuditStrategy() { super(true, OperationOutcomeOperations.INSTANCE, procedure -> Optional.of(procedure.getSubject())); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureProvider.java new file mode 100644 index 000000000..19ca70a24 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureProvider.java @@ -0,0 +1,65 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.procedure; + +import ca.uhn.fhir.rest.annotation.ConditionalUrlParam; +import ca.uhn.fhir.rest.annotation.Create; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.annotation.ResourceParam; +import ca.uhn.fhir.rest.annotation.Update; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.Procedure; +import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Implementation of {@link AbstractPlainProvider} that handles 'Provide Procedure' transaction + * using {@link Create} and {@link Update} operations. + * + * @since 1.2.0 + */ +@SuppressWarnings("unused") +public class ProvideProcedureProvider extends AbstractPlainProvider { + + private static final Logger LOG = LoggerFactory.getLogger(ProvideProcedureProvider.class); + + @Create + public MethodOutcome create(@ResourceParam Procedure procedure, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide Procedure' transaction using 'create' operation..."); + return requestAction(procedure, null, request, response, requestDetails); + } + + @Update + public MethodOutcome update(@ResourceParam Procedure procedure, + @IdParam IdType id, + @ConditionalUrlParam String conditionalUrl, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide Procedure' transaction using 'update' operation..."); + return requestAction(procedure, null, request, response, requestDetails); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/CreateProcedureTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureTransaction.java similarity index 69% rename from src/main/java/org/ehrbase/fhirbridge/fhir/procedure/CreateProcedureTransaction.java rename to src/main/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureTransaction.java index 16b92d580..5b111bf34 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/CreateProcedureTransaction.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureTransaction.java @@ -22,20 +22,22 @@ import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; /** - * Configuration for 'Create Procedure' transaction. + * 'Provide Patient' {@link org.openehealth.ipf.commons.ihe.core.TransactionConfiguration TransactionConfiguration}. + * <p> + * Note: Server-side only * - * @since 1.0.0 + * @since 1.2.0 */ -public class CreateProcedureTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { +public class ProvideProcedureTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { - public CreateProcedureTransaction() { - super("procedure-create", - "Create Procedure", + public ProvideProcedureTransaction() { + super("procedure-provide", + "Provide Procedure Transaction", false, null, - new CreateProcedureAuditStrategy(), + new ProvideProcedureAuditStrategy(), FhirVersionEnum.R4, - new CreateProcedureProvider(), + new ProvideProcedureProvider(), null, FhirTransactionValidator.NO_VALIDATION); } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/CreateQuestionnaireResponseProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/CreateQuestionnaireResponseProvider.java deleted file mode 100644 index f22c8f555..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/CreateQuestionnaireResponseProvider.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.fhir.questionnaireresponse; - -import ca.uhn.fhir.rest.annotation.Create; -import ca.uhn.fhir.rest.annotation.ResourceParam; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.api.server.RequestDetails; -import org.hl7.fhir.r4.model.QuestionnaireResponse; -import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * Implementation of {@link org.openehealth.ipf.commons.ihe.fhir.FhirProvider FhirProvider} that provides REST support - * for 'Create Procedure' transaction. - * - * @since 1.0.0 - */ -public class CreateQuestionnaireResponseProvider extends AbstractPlainProvider { - - @Create - @SuppressWarnings("unused") - public MethodOutcome createQuestionnaireResponse(@ResourceParam QuestionnaireResponse questionnaireResponse, RequestDetails requestDetails, - HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) { - return requestAction(questionnaireResponse, null, httpServletRequest, httpServletResponse, requestDetails); - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/FindQuestionnaireResponseAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/FindQuestionnaireResponseAuditStrategy.java index ab575893f..b0f9bf1a6 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/FindQuestionnaireResponseAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/FindQuestionnaireResponseAuditStrategy.java @@ -38,7 +38,7 @@ public FindQuestionnaireResponseAuditStrategy() { @Override public AuditMessage[] makeAuditMessage(AuditContext auditContext, FhirQueryAuditDataset auditDataset) { - return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FindPatient) + return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FIND_PATIENT) .addPatients(auditDataset.getPatientIds()) .getMessages(); } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/CreateQuestionnaireResponseAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseAuditStrategy.java similarity index 64% rename from src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/CreateQuestionnaireResponseAuditStrategy.java rename to src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseAuditStrategy.java index 0a71efe86..72fe4bddb 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/CreateQuestionnaireResponseAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseAuditStrategy.java @@ -23,20 +23,13 @@ import java.util.Optional; /** - * Implementation of {@link org.openehealth.ipf.commons.ihe.core.atna.AuditStrategy AuditStrategy} - * for 'Create Procedure' transaction. + * Custom implementation of {@link GenericFhirAuditStrategy} for 'Provide Questionnaire-Response' transaction. * - * @since 1.0.0 + * @since 1.2.0 */ -public class CreateQuestionnaireResponseAuditStrategy extends GenericFhirAuditStrategy<QuestionnaireResponse> { +public class ProvideQuestionnaireResponseAuditStrategy extends GenericFhirAuditStrategy<QuestionnaireResponse> { - public CreateQuestionnaireResponseAuditStrategy() { - super(true, OperationOutcomeOperations.INSTANCE, questionnaireResponse -> { - if (questionnaireResponse.hasSubject()) { - return Optional.of(questionnaireResponse.getSubject()); - } else { - return Optional.empty(); - } - }); + public ProvideQuestionnaireResponseAuditStrategy() { + super(true, OperationOutcomeOperations.INSTANCE, questionnaireResponse -> Optional.of(questionnaireResponse.getSubject())); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseProvider.java new file mode 100644 index 000000000..bd3ba897c --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseProvider.java @@ -0,0 +1,65 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.questionnaireresponse; + +import ca.uhn.fhir.rest.annotation.ConditionalUrlParam; +import ca.uhn.fhir.rest.annotation.Create; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.annotation.ResourceParam; +import ca.uhn.fhir.rest.annotation.Update; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.QuestionnaireResponse; +import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Implementation of {@link AbstractPlainProvider} that handles 'Provide Questionnaire-Response' transaction + * using {@link Create} and {@link Update} operations. + * + * @since 1.2.0 + */ +@SuppressWarnings("unused") +public class ProvideQuestionnaireResponseProvider extends AbstractPlainProvider { + + private static final Logger LOG = LoggerFactory.getLogger(ProvideQuestionnaireResponseProvider.class); + + @Create + public MethodOutcome create(@ResourceParam QuestionnaireResponse questionnaireResponse, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide Questionnaire-Response' transaction using 'create' operation..."); + return requestAction(questionnaireResponse, null, request, response, requestDetails); + } + + @Update + public MethodOutcome update(@ResourceParam QuestionnaireResponse questionnaireResponse, + @IdParam IdType id, + @ConditionalUrlParam String conditionalUrl, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide Questionnaire-Response' transaction using 'update' operation..."); + return requestAction(questionnaireResponse, null, request, response, requestDetails); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/CreateQuestionnaireResponseTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseTransaction.java similarity index 66% rename from src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/CreateQuestionnaireResponseTransaction.java rename to src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseTransaction.java index 4dfd3191e..64545e98d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/CreateQuestionnaireResponseTransaction.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseTransaction.java @@ -22,20 +22,22 @@ import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; /** - * Configuration for 'Create Questionnaire-Response' transaction. + * 'Provide Patient' {@link org.openehealth.ipf.commons.ihe.core.TransactionConfiguration TransactionConfiguration}. + * <p> + * Note: Server-side only * - * @since 1.0.0 + * @since 1.2.0 */ -public class CreateQuestionnaireResponseTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { +public class ProvideQuestionnaireResponseTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { - public CreateQuestionnaireResponseTransaction() { - super("questionnaire-response-create", - "Create Questionnaire-Response", + public ProvideQuestionnaireResponseTransaction() { + super("questionnaire-response-provide", + "Provide Questionnaire-Response Transaction", false, null, - new CreateQuestionnaireResponseAuditStrategy(), + new ProvideQuestionnaireResponseAuditStrategy(), FhirVersionEnum.R4, - new CreateQuestionnaireResponseProvider(), + new ProvideQuestionnaireResponseProvider(), null, FhirTransactionValidator.NO_VALIDATION); } diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/procedure-create b/src/main/resources/META-INF/services/org/apache/camel/component/procedure-create deleted file mode 100644 index 3b9b09d03..000000000 --- a/src/main/resources/META-INF/services/org/apache/camel/component/procedure-create +++ /dev/null @@ -1 +0,0 @@ -class=org.ehrbase.fhirbridge.camel.component.fhir.procedure.CreateProcedureComponent \ No newline at end of file diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/procedure-provide b/src/main/resources/META-INF/services/org/apache/camel/component/procedure-provide new file mode 100644 index 000000000..ac4505841 --- /dev/null +++ b/src/main/resources/META-INF/services/org/apache/camel/component/procedure-provide @@ -0,0 +1 @@ +class=org.ehrbase.fhirbridge.camel.component.fhir.procedure.ProvideProcedureComponent \ No newline at end of file diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/questionnaire-response-create b/src/main/resources/META-INF/services/org/apache/camel/component/questionnaire-response-provide similarity index 58% rename from src/main/resources/META-INF/services/org/apache/camel/component/questionnaire-response-create rename to src/main/resources/META-INF/services/org/apache/camel/component/questionnaire-response-provide index 3f90f4f9d..265d62269 100644 --- a/src/main/resources/META-INF/services/org/apache/camel/component/questionnaire-response-create +++ b/src/main/resources/META-INF/services/org/apache/camel/component/questionnaire-response-provide @@ -1 +1 @@ -class=org.ehrbase.fhirbridge.camel.component.fhir.questionnaireresponse.CreateQuestionnaireResponseComponent +class=org.ehrbase.fhirbridge.camel.component.fhir.questionnaireresponse.ProvideQuestionnaireResponseComponent From d5561610bee6a75ddc9803d1352de9068daea787 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 25 May 2021 10:31:43 +0200 Subject: [PATCH 075/141] Implement Provide Diagnostic Report --- ... => ProvideDiagnosticReportComponent.java} | 15 +- .../fhirbridge/camel/route/BundleRoutes.java | 2 +- .../camel/route/DiagnosticReportRoutes.java | 26 ++- .../config/CamelProcessorConfiguration.java | 6 + .../audit => }/FhirBridgeEventType.java | 33 ++-- .../fhir/GenericProvideResourceProvider.java | 52 ++++++ .../FindAuditEventAuditStrategy.java | 4 +- .../TerminologyServerValidationSupport.java | 169 ------------------ .../condition/FindConditionAuditStrategy.java | 2 +- .../consent/FindConsentAuditStrategy.java | 2 +- .../CreateDiagnosticReportProvider.java | 43 ----- .../FindDiagnosticReportAuditStrategy.java | 4 +- ...ProvideDiagnosticReportAuditStrategy.java} | 9 +- .../ProvideDiagnosticReportProvider.java | 65 +++++++ ...> ProvideDiagnosticReportTransaction.java} | 19 +- .../FindMedicationStatementAuditStrategy.java | 2 +- .../FindObservationAuditStrategy.java | 4 +- .../patient/FindPatientAuditStrategy.java | 2 +- .../procedure/FindProcedureAuditStrategy.java | 4 +- .../ProvideProcedureTransaction.java | 2 +- ...indQuestionnaireResponseAuditStrategy.java | 2 +- ...ovideQuestionnaireResponseTransaction.java | 3 +- ...eport-create => diagnostic-report-provide} | 2 +- 23 files changed, 192 insertions(+), 280 deletions(-) rename src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/diagnosticreport/{CreateDiagnosticReportComponent.java => ProvideDiagnosticReportComponent.java} (64%) rename src/main/java/org/ehrbase/fhirbridge/fhir/{common/audit => }/FhirBridgeEventType.java (74%) create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/GenericProvideResourceProvider.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/common/validation/TerminologyServerValidationSupport.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/CreateDiagnosticReportProvider.java rename src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/{CreateDiagnosticReportAuditStrategy.java => ProvideDiagnosticReportAuditStrategy.java} (76%) create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportProvider.java rename src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/{CreateDiagnosticReportTransaction.java => ProvideDiagnosticReportTransaction.java} (66%) rename src/main/resources/META-INF/services/org/apache/camel/component/{diagnostic-report-create => diagnostic-report-provide} (64%) diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/diagnosticreport/CreateDiagnosticReportComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/diagnosticreport/ProvideDiagnosticReportComponent.java similarity index 64% rename from src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/diagnosticreport/CreateDiagnosticReportComponent.java rename to src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/diagnosticreport/ProvideDiagnosticReportComponent.java index 983339d38..91c0583ac 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/diagnosticreport/CreateDiagnosticReportComponent.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/diagnosticreport/ProvideDiagnosticReportComponent.java @@ -16,19 +16,20 @@ package org.ehrbase.fhirbridge.camel.component.fhir.diagnosticreport; -import org.ehrbase.fhirbridge.fhir.diagnosticreport.CreateDiagnosticReportTransaction; +import org.ehrbase.fhirbridge.fhir.diagnosticreport.ProvideDiagnosticReportTransaction; import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; /** - * Camel {@link org.apache.camel.Component Component} that handles 'Create Diagnostic Report' transaction. + * {@link org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirComponent FhirComponent} + * for 'Provide Diagnostic Report' transaction. * - * @since 1.0.0 + * @since 1.2.0 */ -@SuppressWarnings({"java:S110"}) -public class CreateDiagnosticReportComponent extends CustomFhirComponent<GenericFhirAuditDataset> { +@SuppressWarnings("java:S110") +public class ProvideDiagnosticReportComponent extends CustomFhirComponent<GenericFhirAuditDataset> { - public CreateDiagnosticReportComponent() { - super(new CreateDiagnosticReportTransaction()); + public ProvideDiagnosticReportComponent() { + super(new ProvideDiagnosticReportTransaction()); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/BundleRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/BundleRoutes.java index 64bd30d9d..28a5d3434 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/BundleRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/BundleRoutes.java @@ -76,7 +76,7 @@ public void configure() throws Exception { from("direct:process-diagnostic-report-lab-bundle") .bean(DiagnosticReportLabBundleValidator.class) .bean(DiagnosticReportLabConverter.class, CONVERT) - .to("direct:process-diagnostic-report") + .to("direct:internal-provide-diagnostic-report") .process(BUNDLE_RESPONSE_PROCESSOR); // @formatter:on diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java index 40b8873cb..c7c7e6843 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java @@ -17,7 +17,6 @@ package org.ehrbase.fhirbridge.camel.route; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.CamelConstants; import org.hl7.fhir.r4.model.DiagnosticReport; import org.springframework.stereotype.Component; @@ -35,13 +34,17 @@ public void configure() throws Exception { // @formatter:off super.configure(); - // 'Create Diagnostic Report' route definition - from("diagnostic-report-create:consumer?fhirContext=#fhirContext") - .onCompletion() - .process("auditCreateResourceProcessor") - .end() + // Route: Provide Diagnostic Report + from("diagnostic-report-provide:consumer?fhirContext=#fhirContext") + .routeId("provide-diagnostic-report-route") .process("fhirProfileValidator") - .to("direct:process-diagnostic-report"); + .to("direct:internal-provide-diagnostic-report"); + + // Route: Internal Provide Diagnostic Report + from("direct:internal-provide-diagnostic-report") + .routeId("internal-provide-diagnostic-report-route") + .process("provideDiagnosticReportPersistenceProcessor") + .to("direct:internal-provide-resource"); // 'Find Diagnostic Report' route definition from("diagnostic-report-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") @@ -51,15 +54,6 @@ public void configure() throws Exception { .process("bundleProviderResponseProcessor") .otherwise() .to("bean:diagnosticReportDao?method=read(${body}, ${headers.FhirRequestDetails})"); - - // Internal routes definition - from("direct:process-diagnostic-report") - .setHeader(CamelConstants.METHOD_OUTCOME, method("diagnosticReportDao", "create(${body}, ${headers.FhirRequestDetails})")) - .process("ehrIdLookupProcessor") - .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") - .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") - .process("resourceResponseProcessor"); - // @formatter:on } } diff --git a/src/main/java/org/ehrbase/fhirbridge/config/CamelProcessorConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/CamelProcessorConfiguration.java index 8497557b3..18b836452 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/CamelProcessorConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/CamelProcessorConfiguration.java @@ -5,6 +5,7 @@ import org.ehrbase.fhirbridge.core.repository.ResourceMapRepository; import org.hl7.fhir.r4.model.Condition; import org.hl7.fhir.r4.model.Consent; +import org.hl7.fhir.r4.model.DiagnosticReport; import org.hl7.fhir.r4.model.MedicationStatement; import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Patient; @@ -32,6 +33,11 @@ public ProvideResourcePersistenceProcessor<Consent> provideConsentPersistencePro return new ProvideResourcePersistenceProcessor<>(consentDao, Consent.class, resourceMapRepository); } + @Bean + public ProvideResourcePersistenceProcessor<DiagnosticReport> provideDiagnosticReportPersistenceProcessor(IFhirResourceDao<DiagnosticReport> diagnosticReportDao) { + return new ProvideResourcePersistenceProcessor<>(diagnosticReportDao, DiagnosticReport.class, resourceMapRepository); + } + @Bean public ProvideResourcePersistenceProcessor<Observation> provideObservationPersistenceProcessor(IFhirResourceDao<Observation> observationDao) { return new ProvideResourcePersistenceProcessor<>(observationDao, Observation.class, resourceMapRepository); diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java b/src/main/java/org/ehrbase/fhirbridge/fhir/FhirBridgeEventType.java similarity index 74% rename from src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java rename to src/main/java/org/ehrbase/fhirbridge/fhir/FhirBridgeEventType.java index e25fb3e4a..a8aabacfd 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/common/audit/FhirBridgeEventType.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/FhirBridgeEventType.java @@ -1,11 +1,14 @@ -package org.ehrbase.fhirbridge.fhir.common.audit; +package org.ehrbase.fhirbridge.fhir; import org.openehealth.ipf.commons.audit.types.EnumeratedCodedValue; import org.openehealth.ipf.commons.audit.types.EventType; -@SuppressWarnings("java:S115") public enum FhirBridgeEventType implements EventType, EnumeratedCodedValue<EventType> { + // AuditEvent + + FIND_AUDIT_EVENT("audit-event-find", "Find Audit Event"), + // Condition PROVIDE_CONDITION("condition-provide", "Provide Condition"), @@ -18,12 +21,24 @@ public enum FhirBridgeEventType implements EventType, EnumeratedCodedValue<Event FIND_CONSENT("consent-find", "Find Consent"), + // DiagnosticReport + + PROVIDE_DIAGNOSTIC_REPORT("diagnostic-report-provide", "Provide Diagnostic Report"), + + FIND_DIAGNOSTIC_REPORT("diagnostic-report-find", "Find Diagnostic Report"), + // MedicationStatement PROVIDE_MEDICATION_STATEMENT("medication-statement-provide", "Provide Medication Statement"), FIND_MEDICATION_STATEMENT("medication-statement-find", "Find Medication Statement"), + // Observation + + PROVIDE_OBSERVATION("observation-create", "Provide Observation"), + + FIND_OBSERVATION("observation-find", "Find Observation"), + // Patient PROVIDE_PATIENT("patient-provide", "Provide Patient"), @@ -40,19 +55,7 @@ public enum FhirBridgeEventType implements EventType, EnumeratedCodedValue<Event PROVIDE_QUESTIONNAIRE_RESPONSE("questionnaire-response-provide", "Provide Questionnaire Response"), - FIND_QUESTIONNAIRE_RESPONSE("questionnaire-response-find", "Find Questionnaire Response"), - - // Review - - FindAuditEvent("audit-event-find", "Find Audit Event"), - - CreateDiagnosticReport("diagnostic-report-create", "Create Diagnostic Report"), - - FindDiagnosticReport("diagnostic-report-find", "Find Diagnostic Report"), - - CreateObservation("observation-create", "Create Observation"), - - FindObservation("observation-find", "Find Observation"); + FIND_QUESTIONNAIRE_RESPONSE("questionnaire-response-find", "Find Questionnaire Response"); private final EventType value; diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/GenericProvideResourceProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/GenericProvideResourceProvider.java new file mode 100644 index 000000000..2013b2d87 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/GenericProvideResourceProvider.java @@ -0,0 +1,52 @@ +package org.ehrbase.fhirbridge.fhir; + +import ca.uhn.fhir.rest.annotation.ConditionalUrlParam; +import ca.uhn.fhir.rest.annotation.Create; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.annotation.ResourceParam; +import ca.uhn.fhir.rest.annotation.Update; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import org.hl7.fhir.r4.model.DomainResource; +import org.hl7.fhir.r4.model.IdType; +import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Generic implementation of {@link AbstractPlainProvider} that handles 'Provide Resource' transaction + * using {@link Create} and {@link Update} operations. + * + * @since 1.2.0 + */ +public class GenericProvideResourceProvider<T extends DomainResource> extends AbstractPlainProvider { + + private static final Logger LOG = LoggerFactory.getLogger(GenericProvideResourceProvider.class); + + @Create + public MethodOutcome create(@ResourceParam T resource, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide resource (resourceType: {})' transaction using 'create' operation...", + resource.getResourceType()); + + return requestAction(resource, null, request, response, requestDetails); + } + + @Update + public MethodOutcome update(@ResourceParam T resource, + @IdParam IdType id, + @ConditionalUrlParam String conditionalUrl, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide resource (resourceType: {})' transaction using 'update' operation...", + resource.getResourceType()); + + return requestAction(resource, null, request, response, requestDetails); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/auditevent/FindAuditEventAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/auditevent/FindAuditEventAuditStrategy.java index 1ddcd7db4..bb40b0473 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/auditevent/FindAuditEventAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/auditevent/FindAuditEventAuditStrategy.java @@ -16,7 +16,7 @@ package org.ehrbase.fhirbridge.fhir.auditevent; -import org.ehrbase.fhirbridge.fhir.common.audit.FhirBridgeEventType; +import org.ehrbase.fhirbridge.fhir.FhirBridgeEventType; import org.openehealth.ipf.commons.audit.AuditContext; import org.openehealth.ipf.commons.audit.model.AuditMessage; import org.openehealth.ipf.commons.ihe.core.atna.event.QueryInformationBuilder; @@ -38,7 +38,7 @@ public FindAuditEventAuditStrategy() { @Override public AuditMessage[] makeAuditMessage(AuditContext auditContext, FhirQueryAuditDataset auditDataset) { - return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FindAuditEvent) + return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FIND_AUDIT_EVENT) .addPatients(auditDataset.getPatientIds()) .getMessages(); } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/common/validation/TerminologyServerValidationSupport.java b/src/main/java/org/ehrbase/fhirbridge/fhir/common/validation/TerminologyServerValidationSupport.java deleted file mode 100644 index 4b0d8e43c..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/common/validation/TerminologyServerValidationSupport.java +++ /dev/null @@ -1,169 +0,0 @@ -package org.ehrbase.fhirbridge.fhir.common.validation; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.support.ConceptValidationOptions; -import ca.uhn.fhir.context.support.DefaultProfileValidationSupport; -import ca.uhn.fhir.context.support.ValidationSupportContext; -import ca.uhn.fhir.rest.client.api.IGenericClient; -import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; -import ca.uhn.fhir.util.ParametersUtil; -import io.micrometer.core.lang.NonNull; -import org.hl7.fhir.common.hapi.validation.support.BaseValidationSupport; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.model.BooleanType; -import org.hl7.fhir.r4.model.Bundle; -import org.hl7.fhir.r4.model.CodeSystem; -import org.hl7.fhir.r4.model.Parameters; -import org.hl7.fhir.r4.model.StringType; -import org.hl7.fhir.r4.model.ValueSet; -import org.jetbrains.annotations.NotNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.cache.annotation.Cacheable; -import org.springframework.context.MessageSource; -import org.springframework.context.MessageSourceAware; -import org.springframework.context.support.MessageSourceAccessor; - -import java.util.List; -import java.util.Objects; -import java.util.Optional; - -import static org.apache.commons.lang3.StringUtils.isBlank; - -/** - * @deprecated use {@link org.hl7.fhir.common.hapi.validation.support.RemoteTerminologyServiceValidationSupport} - */ -@Deprecated -public class TerminologyServerValidationSupport extends BaseValidationSupport implements MessageSourceAware { - - private static final Logger LOG = LoggerFactory.getLogger(TerminologyServerValidationSupport.class); - - private final IGenericClient client; - - private MessageSourceAccessor messages; - - public TerminologyServerValidationSupport(FhirContext theFhirContext, IGenericClient client) { - super(theFhirContext); - this.client = client; - } - - @Override - @Cacheable(cacheNames = "codeSystemSupported", key = "#theSystem") - public boolean isCodeSystemSupported(ValidationSupportContext theValidationSupportContext, String theSystem) { - LOG.debug("Checks whether or not the CodeSystem '{}' is supported by the server", theSystem); - Bundle bundle = client.search() - .forResource(CodeSystem.class) - .where(CodeSystem.URL.matches().value(theSystem)) - .returnBundle(Bundle.class) - .execute(); - return bundle.getTotal() > 0; - } - - @Override - @Cacheable(cacheNames = "valueSetSupported", key = "#theValueSetUrl") - public boolean isValueSetSupported(ValidationSupportContext theValidationSupportContext, String theValueSetUrl) { - LOG.debug("Checks whether or not the ValueSet '{}' is supported by the server", theValueSetUrl); - Bundle bundle = client.search() - .forResource(ValueSet.class) - .where(ValueSet.URL.matches().value(theValueSetUrl)) - .returnBundle(Bundle.class) - .execute(); - return bundle.getTotal() > 0; - } - - @Override - @Cacheable(cacheNames = "codeInCodeSystem", key = "#theCodeSystem + #theCode") - public CodeValidationResult validateCode(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) { - LOG.debug("Checks if the CodeSystem '{}' contains the code '{}'", theCodeSystem, theCode); - - try { - Parameters input = new Parameters(); - ParametersUtil.addParameterToParametersUri(getFhirContext(), input, "system", theCodeSystem); - ParametersUtil.addParameterToParametersString(getFhirContext(), input, "code", theCode); - - Parameters output = client.operation() - .onType(CodeSystem.class) - .named("lookup") - .withParameters(input) - .returnResourceType(Parameters.class) - .execute(); - - return new CodeValidationResult() - .setCode(theCode) - .setCodeSystemName(((StringType) output.getParameter("name")).getValue()) - .setDisplay(((StringType) output.getParameter("display")).getValue()); - } catch (ResourceNotFoundException e) { - return new CodeValidationResult() - .setSeverity(IssueSeverity.ERROR) - .setMessage(messages.getMessage("validation.terminology.lookup", new Object[]{theCode, theCodeSystem})); - } - } - - @Override - @Cacheable(cacheNames = "codeInValueSet", key = "#theValueSet + #theCodeSystem + #theCode") - public CodeValidationResult validateCodeInValueSet(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, @NotNull IBaseResource theValueSet) { - String valueSetUrl = DefaultProfileValidationSupport.getConformanceResourceUrl(myCtx, theValueSet); - - LOG.debug("Checks if the ValueSet '{}' contains the code '{}'", valueSetUrl, theCode); - - Parameters input = new Parameters(); - ParametersUtil.addParameterToParametersUri(getFhirContext(), input, "url", valueSetUrl); - - if (theOptions != null && theOptions.isInferSystem()) { - ValueSet valueSet = client.operation() - .onType(ValueSet.class) - .named("expand") - .withParameters(input) - .returnResourceType(ValueSet.class) - .execute(); - - ValueSet.ValueSetExpansionComponent expansion = valueSet.getExpansion(); - Optional<ValueSet.ValueSetExpansionContainsComponent> optCode = expansion.getContains().stream() - .filter(valueSetExpansionContainsComponent -> Objects.equals(valueSetExpansionContainsComponent.getCode(), theCode)) - .findFirst(); - - if (optCode.isPresent()) { - ValueSet.ValueSetExpansionContainsComponent code = optCode.get(); - return new CodeValidationResult() - .setCode(code.getCode()) - .setDisplay(code.getDisplay()); - } else { - return new CodeValidationResult() - .setSeverity(IssueSeverity.ERROR) - .setMessage(messages.getMessage("validation.terminology.expand", new Object[]{theCode, valueSetUrl})); - } - } else { - ParametersUtil.addParameterToParametersUri(getFhirContext(), input, "system", theCodeSystem); - ParametersUtil.addParameterToParametersString(getFhirContext(), input, "code", theCode); - - Parameters output = client.operation() - .onType(ValueSet.class) - .named("validate-code") - .withParameters(input) - .returnResourceType(Parameters.class) - .execute(); - - List<String> resultValues = ParametersUtil.getNamedParameterValuesAsString(getFhirContext(), output, "result"); - if (resultValues.isEmpty() || isBlank(resultValues.get(0))) { - return null; - } - - BooleanType result = (BooleanType) output.getParameter("result"); - if (result.booleanValue()) { - StringType display = (StringType) output.getParameter("display"); - return new CodeValidationResult() - .setCode(theCode) - .setDisplay(display.getValue()); - } else { - return new CodeValidationResult() - .setSeverity(IssueSeverity.WARNING) - .setMessage(messages.getMessage("validation.terminology.validateCodeInValueSet", new Object[]{theCode, theCodeSystem, valueSetUrl})); - } - } - } - - @Override - public void setMessageSource(@NonNull MessageSource messageSource) { - messages = new MessageSourceAccessor(messageSource); - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/condition/FindConditionAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/condition/FindConditionAuditStrategy.java index 9892e1dbb..af60eb0ee 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/condition/FindConditionAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/condition/FindConditionAuditStrategy.java @@ -16,7 +16,7 @@ package org.ehrbase.fhirbridge.fhir.condition; -import org.ehrbase.fhirbridge.fhir.common.audit.FhirBridgeEventType; +import org.ehrbase.fhirbridge.fhir.FhirBridgeEventType; import org.openehealth.ipf.commons.audit.AuditContext; import org.openehealth.ipf.commons.audit.model.AuditMessage; import org.openehealth.ipf.commons.ihe.core.atna.event.QueryInformationBuilder; diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentAuditStrategy.java index 347c3d8cb..2f7c43040 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentAuditStrategy.java @@ -16,7 +16,7 @@ package org.ehrbase.fhirbridge.fhir.consent; -import org.ehrbase.fhirbridge.fhir.common.audit.FhirBridgeEventType; +import org.ehrbase.fhirbridge.fhir.FhirBridgeEventType; import org.openehealth.ipf.commons.audit.AuditContext; import org.openehealth.ipf.commons.audit.model.AuditMessage; import org.openehealth.ipf.commons.ihe.core.atna.event.QueryInformationBuilder; diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/CreateDiagnosticReportProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/CreateDiagnosticReportProvider.java deleted file mode 100644 index 5c7ae40a1..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/CreateDiagnosticReportProvider.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.fhir.diagnosticreport; - -import ca.uhn.fhir.rest.annotation.Create; -import ca.uhn.fhir.rest.annotation.ResourceParam; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.api.server.RequestDetails; -import org.hl7.fhir.r4.model.DiagnosticReport; -import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * Implementation of {@link org.openehealth.ipf.commons.ihe.fhir.FhirProvider FhirProvider} that provides REST support - * for 'Create Diagnostic Report' transaction. - * - * @since 1.0.0 - */ -public class CreateDiagnosticReportProvider extends AbstractPlainProvider { - - @Create - @SuppressWarnings("unused") - public MethodOutcome createDiagnosticReport(@ResourceParam DiagnosticReport diagnosticReport, RequestDetails requestDetails, - HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) { - return requestAction(diagnosticReport, null, httpServletRequest, httpServletResponse, requestDetails); - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/FindDiagnosticReportAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/FindDiagnosticReportAuditStrategy.java index ebd930e4a..866e99671 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/FindDiagnosticReportAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/FindDiagnosticReportAuditStrategy.java @@ -16,7 +16,7 @@ package org.ehrbase.fhirbridge.fhir.diagnosticreport; -import org.ehrbase.fhirbridge.fhir.common.audit.FhirBridgeEventType; +import org.ehrbase.fhirbridge.fhir.FhirBridgeEventType; import org.openehealth.ipf.commons.audit.AuditContext; import org.openehealth.ipf.commons.audit.model.AuditMessage; import org.openehealth.ipf.commons.ihe.core.atna.event.QueryInformationBuilder; @@ -38,7 +38,7 @@ public FindDiagnosticReportAuditStrategy() { @Override public AuditMessage[] makeAuditMessage(AuditContext auditContext, FhirQueryAuditDataset auditDataset) { - return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FindDiagnosticReport) + return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FIND_DIAGNOSTIC_REPORT) .addPatients(auditDataset.getPatientIds()) .getMessages(); } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/CreateDiagnosticReportAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportAuditStrategy.java similarity index 76% rename from src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/CreateDiagnosticReportAuditStrategy.java rename to src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportAuditStrategy.java index 88e9c821c..0081856ae 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/CreateDiagnosticReportAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportAuditStrategy.java @@ -23,14 +23,13 @@ import java.util.Optional; /** - * Implementation of {@link org.openehealth.ipf.commons.ihe.core.atna.AuditStrategy AuditStrategy} - * for 'Create Diagnostic Report' transaction. + * Custom implementation of {@link GenericFhirAuditStrategy} for 'Provide Diagnostic Report' transaction. * - * @since 1.0.0 + * @since 1.2.0 */ -public class CreateDiagnosticReportAuditStrategy extends GenericFhirAuditStrategy<DiagnosticReport> { +public class ProvideDiagnosticReportAuditStrategy extends GenericFhirAuditStrategy<DiagnosticReport> { - public CreateDiagnosticReportAuditStrategy() { + public ProvideDiagnosticReportAuditStrategy() { super(true, OperationOutcomeOperations.INSTANCE, diagnosticReport -> Optional.of(diagnosticReport.getSubject())); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportProvider.java new file mode 100644 index 000000000..9426fe530 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportProvider.java @@ -0,0 +1,65 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.diagnosticreport; + +import ca.uhn.fhir.rest.annotation.ConditionalUrlParam; +import ca.uhn.fhir.rest.annotation.Create; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.annotation.ResourceParam; +import ca.uhn.fhir.rest.annotation.Update; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import org.hl7.fhir.r4.model.DiagnosticReport; +import org.hl7.fhir.r4.model.IdType; +import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Implementation of {@link AbstractPlainProvider} that handles 'Provide Diagnostic Report' transaction + * using {@link Create} and {@link Update} operations. + * + * @since 1.2.0 + */ +@SuppressWarnings("unused") +public class ProvideDiagnosticReportProvider extends AbstractPlainProvider { + + private static final Logger LOG = LoggerFactory.getLogger(ProvideDiagnosticReportProvider.class); + + @Create + public MethodOutcome create(@ResourceParam DiagnosticReport diagnosticReport, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide Diagnostic Report' transaction using 'create' operation..."); + return requestAction(diagnosticReport, null, request, response, requestDetails); + } + + @Update + public MethodOutcome update(@ResourceParam DiagnosticReport diagnosticReport, + @IdParam IdType id, + @ConditionalUrlParam String conditionalUrl, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide Diagnostic Report' transaction using 'update' operation..."); + return requestAction(diagnosticReport, null, request, response, requestDetails); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/CreateDiagnosticReportTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportTransaction.java similarity index 66% rename from src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/CreateDiagnosticReportTransaction.java rename to src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportTransaction.java index 20e9dc5a5..b899a121e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/CreateDiagnosticReportTransaction.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportTransaction.java @@ -22,20 +22,23 @@ import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; /** - * Configuration for 'Create Observation' transaction. + * 'Provide Diagnostic Report' + * {@link org.openehealth.ipf.commons.ihe.core.TransactionConfiguration TransactionConfiguration}. + * <p> + * Note: Server-side only * - * @since 1.0.0 + * @since 1.2.0 */ -public class CreateDiagnosticReportTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { +public class ProvideDiagnosticReportTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { - public CreateDiagnosticReportTransaction() { - super("diagnostic-report-create", - "Create DiagnosticReport", + public ProvideDiagnosticReportTransaction() { + super("diagnostic-report-provide", + "Provide Diagnostic Report Transaction", false, null, - new CreateDiagnosticReportAuditStrategy(), + new ProvideDiagnosticReportAuditStrategy(), FhirVersionEnum.R4, - new CreateDiagnosticReportProvider(), + new ProvideDiagnosticReportProvider(), null, FhirTransactionValidator.NO_VALIDATION); } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/FindMedicationStatementAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/FindMedicationStatementAuditStrategy.java index 93818ecf1..3cf0dfd96 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/FindMedicationStatementAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/medicationstatement/FindMedicationStatementAuditStrategy.java @@ -16,7 +16,7 @@ package org.ehrbase.fhirbridge.fhir.medicationstatement; -import org.ehrbase.fhirbridge.fhir.common.audit.FhirBridgeEventType; +import org.ehrbase.fhirbridge.fhir.FhirBridgeEventType; import org.openehealth.ipf.commons.audit.AuditContext; import org.openehealth.ipf.commons.audit.model.AuditMessage; import org.openehealth.ipf.commons.ihe.core.atna.event.QueryInformationBuilder; diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/observation/FindObservationAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/observation/FindObservationAuditStrategy.java index 542ca40ad..603eb7728 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/observation/FindObservationAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/observation/FindObservationAuditStrategy.java @@ -16,7 +16,7 @@ package org.ehrbase.fhirbridge.fhir.observation; -import org.ehrbase.fhirbridge.fhir.common.audit.FhirBridgeEventType; +import org.ehrbase.fhirbridge.fhir.FhirBridgeEventType; import org.openehealth.ipf.commons.audit.AuditContext; import org.openehealth.ipf.commons.audit.model.AuditMessage; import org.openehealth.ipf.commons.ihe.core.atna.event.QueryInformationBuilder; @@ -38,7 +38,7 @@ public FindObservationAuditStrategy() { @Override public AuditMessage[] makeAuditMessage(AuditContext auditContext, FhirQueryAuditDataset auditDataset) { - return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FindObservation) + return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FIND_OBSERVATION) .addPatients(auditDataset.getPatientIds()) .getMessages(); } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/patient/FindPatientAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/patient/FindPatientAuditStrategy.java index 924b04059..7c7346bcb 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/patient/FindPatientAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/patient/FindPatientAuditStrategy.java @@ -16,7 +16,7 @@ package org.ehrbase.fhirbridge.fhir.patient; -import org.ehrbase.fhirbridge.fhir.common.audit.FhirBridgeEventType; +import org.ehrbase.fhirbridge.fhir.FhirBridgeEventType; import org.openehealth.ipf.commons.audit.AuditContext; import org.openehealth.ipf.commons.audit.model.AuditMessage; import org.openehealth.ipf.commons.ihe.core.atna.event.QueryInformationBuilder; diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/FindProcedureAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/FindProcedureAuditStrategy.java index 56f6f48ed..59cb69f71 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/FindProcedureAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/FindProcedureAuditStrategy.java @@ -16,7 +16,7 @@ package org.ehrbase.fhirbridge.fhir.procedure; -import org.ehrbase.fhirbridge.fhir.common.audit.FhirBridgeEventType; +import org.ehrbase.fhirbridge.fhir.FhirBridgeEventType; import org.openehealth.ipf.commons.audit.AuditContext; import org.openehealth.ipf.commons.audit.model.AuditMessage; import org.openehealth.ipf.commons.ihe.core.atna.event.QueryInformationBuilder; @@ -38,7 +38,7 @@ public FindProcedureAuditStrategy() { @Override public AuditMessage[] makeAuditMessage(AuditContext auditContext, FhirQueryAuditDataset auditDataset) { - return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FIND_PATIENT) + return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FIND_PROCEDURE) .addPatients(auditDataset.getPatientIds()) .getMessages(); } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureTransaction.java index 5b111bf34..7dbb82de8 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureTransaction.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureTransaction.java @@ -22,7 +22,7 @@ import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; /** - * 'Provide Patient' {@link org.openehealth.ipf.commons.ihe.core.TransactionConfiguration TransactionConfiguration}. + * 'Provide Procedure' {@link org.openehealth.ipf.commons.ihe.core.TransactionConfiguration TransactionConfiguration}. * <p> * Note: Server-side only * diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/FindQuestionnaireResponseAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/FindQuestionnaireResponseAuditStrategy.java index b0f9bf1a6..b7ec60377 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/FindQuestionnaireResponseAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/FindQuestionnaireResponseAuditStrategy.java @@ -16,7 +16,7 @@ package org.ehrbase.fhirbridge.fhir.questionnaireresponse; -import org.ehrbase.fhirbridge.fhir.common.audit.FhirBridgeEventType; +import org.ehrbase.fhirbridge.fhir.FhirBridgeEventType; import org.openehealth.ipf.commons.audit.AuditContext; import org.openehealth.ipf.commons.audit.model.AuditMessage; import org.openehealth.ipf.commons.ihe.core.atna.event.QueryInformationBuilder; diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseTransaction.java index 64545e98d..b1a6fdf80 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseTransaction.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseTransaction.java @@ -22,7 +22,8 @@ import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; /** - * 'Provide Patient' {@link org.openehealth.ipf.commons.ihe.core.TransactionConfiguration TransactionConfiguration}. + * 'Provide Questionnaire-Response' + * {@link org.openehealth.ipf.commons.ihe.core.TransactionConfiguration TransactionConfiguration}. * <p> * Note: Server-side only * diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/diagnostic-report-create b/src/main/resources/META-INF/services/org/apache/camel/component/diagnostic-report-provide similarity index 64% rename from src/main/resources/META-INF/services/org/apache/camel/component/diagnostic-report-create rename to src/main/resources/META-INF/services/org/apache/camel/component/diagnostic-report-provide index 679bb9760..b274eac4c 100644 --- a/src/main/resources/META-INF/services/org/apache/camel/component/diagnostic-report-create +++ b/src/main/resources/META-INF/services/org/apache/camel/component/diagnostic-report-provide @@ -1 +1 @@ -class=org.ehrbase.fhirbridge.camel.component.fhir.diagnosticreport.CreateDiagnosticReportComponent \ No newline at end of file +class=org.ehrbase.fhirbridge.camel.component.fhir.diagnosticreport.ProvideDiagnosticReportComponent \ No newline at end of file From d9a32d0c6da34fe39ab36ed01df9adc37b50a10f Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 25 May 2021 11:50:30 +0200 Subject: [PATCH 076/141] Implement Provide Observation --- .../fhirbridge/camel/CamelConstants.java | 4 +- .../CreateObservationComponent.java | 34 ---------- .../ProvideObservationComponent.java | 3 +- ....java => ProvideResourceAuditHandler.java} | 27 +++----- .../ProvideResourcePersistenceProcessor.java | 26 ++++---- .../ProvideResourceResponseProcessor.java | 2 +- .../processor/ResourceResponseProcessor.java | 50 -------------- .../fhirbridge/camel/route/BundleRoutes.java | 4 +- .../fhirbridge/camel/route/CommonRoutes.java | 9 ++- .../camel/route/ConditionRoutes.java | 3 + .../fhirbridge/camel/route/ConsentRoutes.java | 9 ++- .../camel/route/DiagnosticReportRoutes.java | 3 + .../route/MedicationStatementRoutes.java | 3 + .../camel/route/ObservationRoutes.java | 54 +++------------ .../fhirbridge/camel/route/PatientRoutes.java | 3 + .../camel/route/ProcedureRoutes.java | 3 + .../route/QuestionnaireResponseRoutes.java | 3 + .../fhir/GenericProvideResourceProvider.java | 52 --------------- .../fhir/ProvideResourceProvider.java | 66 +++++++++++++++++++ .../CreateObservationAuditStrategy.java | 36 ---------- .../CreateObservationProvider.java | 42 ------------ .../CreateObservationTransaction.java | 42 ------------ .../apache/camel/component/observation-create | 1 - .../fhir/auditevent/AuditEventReportIT.java | 9 +-- .../fhir/observation/ObservationIT.java | 10 +-- 25 files changed, 141 insertions(+), 357 deletions(-) delete mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/observation/CreateObservationComponent.java rename src/main/java/org/ehrbase/fhirbridge/camel/processor/{AuditCreateResourceProcessor.java => ProvideResourceAuditHandler.java} (74%) delete mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourceResponseProcessor.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/GenericProvideResourceProvider.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/ProvideResourceProvider.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/observation/CreateObservationAuditStrategy.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/observation/CreateObservationProvider.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/observation/CreateObservationTransaction.java delete mode 100644 src/main/resources/META-INF/services/org/apache/camel/component/observation-create diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/CamelConstants.java b/src/main/java/org/ehrbase/fhirbridge/camel/CamelConstants.java index 31421767d..f7b8394fd 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/CamelConstants.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/CamelConstants.java @@ -16,14 +16,12 @@ package org.ehrbase.fhirbridge.camel; -import org.openehealth.ipf.commons.ihe.fhir.Constants; - /** * Constants used in the FHIR Bridge. * * @since 1.0.0 */ -public final class CamelConstants implements Constants { +public final class CamelConstants { public static final String COMPOSITION_VERSION_UID = "FhirBridgeCompositionVersionUid"; diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/observation/CreateObservationComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/observation/CreateObservationComponent.java deleted file mode 100644 index c8304fe05..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/observation/CreateObservationComponent.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.camel.component.fhir.observation; - -import org.ehrbase.fhirbridge.fhir.observation.CreateObservationTransaction; -import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; -import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; - -/** - * Camel {@link org.apache.camel.Component Component} that handles 'Create Observation' transaction. - * - * @since 1.0.0 - */ -@SuppressWarnings({"java:S110"}) -public class CreateObservationComponent extends CustomFhirComponent<GenericFhirAuditDataset> { - - public CreateObservationComponent() { - super(new CreateObservationTransaction()); - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/observation/ProvideObservationComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/observation/ProvideObservationComponent.java index 4e2cd8ecf..082c91f5b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/observation/ProvideObservationComponent.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/observation/ProvideObservationComponent.java @@ -21,7 +21,8 @@ import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; /** - * Camel component that enables 'Provide Observation' transaction. + * {@link org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirComponent FhirComponent} + * for 'Provide Observation' transaction. * * @since 1.2.0 */ diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/AuditCreateResourceProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceAuditHandler.java similarity index 74% rename from src/main/java/org/ehrbase/fhirbridge/camel/processor/AuditCreateResourceProcessor.java rename to src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceAuditHandler.java index 590196bac..3c02a9381 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/AuditCreateResourceProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceAuditHandler.java @@ -10,28 +10,27 @@ import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.Identifier; import org.hl7.fhir.r4.model.Reference; +import org.openehealth.ipf.commons.ihe.fhir.Constants; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import java.util.Date; @Component -public class AuditCreateResourceProcessor implements Processor { +public class ProvideResourceAuditHandler implements Processor { private final IFhirResourceDao<AuditEvent> auditEventDao; @Value("${spring.application.name}") private String applicationName; - public AuditCreateResourceProcessor(IFhirResourceDao<AuditEvent> auditEventDao) { + public ProvideResourceAuditHandler(IFhirResourceDao<AuditEvent> auditEventDao) { this.auditEventDao = auditEventDao; } @Override public void process(Exchange exchange) throws Exception { - - - AuditEvent auditEvent = new AuditEvent() + var auditEvent = new AuditEvent() .setType(new Coding("http://terminology.hl7.org/CodeSystem/audit-event-type", "rest", "RESTful Operation")) .addSubtype(new Coding("http://hl7.org/fhir/restful-interaction", "create", "create")) .setAction(AuditEvent.AuditEventAction.C) @@ -47,9 +46,7 @@ public void process(Exchange exchange) throws Exception { } auditEvent.setSource(source()); - if (extractMethodOutcome(exchange) != null) { - auditEvent.addEntity(entity(exchange)); - } + auditEvent.addEntity(entity(exchange)); auditEventDao.create(auditEvent); } @@ -66,22 +63,14 @@ private AuditEvent.AuditEventSourceComponent source() { } private AuditEvent.AuditEventEntityComponent entity(Exchange exchange) { - MethodOutcome methodOutcome = extractMethodOutcome(exchange); - RequestDetails requestDetails = extractRequestDetails(exchange); + var outcome = exchange.getProperty(CamelConstants.METHOD_OUTCOME, MethodOutcome.class); + var requestDetails = exchange.getIn().getHeader(Constants.FHIR_REQUEST_DETAILS, RequestDetails.class); return new AuditEvent.AuditEventEntityComponent() - .setWhat(new Reference(methodOutcome.getId())) + .setWhat(new Reference(outcome.getId())) .setType(new Coding() .setSystem("http://hl7.org/fhir/resource-types") .setCode(requestDetails.getResourceName()) .setDisplay(requestDetails.getResourceName())); } - - private MethodOutcome extractMethodOutcome(Exchange exchange) { - return exchange.getIn().getHeader(CamelConstants.METHOD_OUTCOME, MethodOutcome.class); - } - - private RequestDetails extractRequestDetails(Exchange exchange) { - return exchange.getIn().getHeader(org.openehealth.ipf.commons.ihe.fhir.Constants.FHIR_REQUEST_DETAILS, RequestDetails.class); - } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourcePersistenceProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourcePersistenceProcessor.java index 82f4d1efa..7898b1d53 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourcePersistenceProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourcePersistenceProcessor.java @@ -25,6 +25,7 @@ import org.ehrbase.fhirbridge.camel.CamelConstants; import org.ehrbase.fhirbridge.core.repository.ResourceMapRepository; import org.hl7.fhir.instance.model.api.IBaseResource; +import org.openehealth.ipf.commons.ihe.fhir.Constants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -48,25 +49,26 @@ public ProvideResourcePersistenceProcessor(IFhirResourceDao<T> resourceDao, Clas this.resourceMapRepository = resourceMapRepository; } - /** - * @see Processor#process(Exchange) - */ @Override public void process(Exchange exchange) throws Exception { LOG.trace("Processing..."); var resource = exchange.getIn().getBody(resourceType); - var requestDetails = exchange.getIn().getHeader(CamelConstants.FHIR_REQUEST_DETAILS, RequestDetails.class); + var requestDetails = exchange.getIn().getHeader(Constants.FHIR_REQUEST_DETAILS, RequestDetails.class); MethodOutcome outcome; - if (requestDetails.getRestOperationType() == RestOperationTypeEnum.CREATE) { - outcome = handleCreateResource(resource, requestDetails); - } else if (requestDetails.getRestOperationType() == RestOperationTypeEnum.UPDATE) { - outcome = handleUpdateResource(resource, requestDetails); - resourceMapRepository.findById(outcome.getId().getIdPart()) - .ifPresent(resourceMap -> exchange.getMessage().setHeader(CamelConstants.COMPOSITION_VERSION_UID, resourceMap.getCompositionVersionUid())); - } else { - throw new UnsupportedOperationException("Only 'Create' and 'Update' operations are supported"); + switch (requestDetails.getRestOperationType()) { + case CREATE: + case TRANSACTION: + outcome = handleCreateResource(resource, requestDetails); + break; + case UPDATE: + outcome = handleUpdateResource(resource, requestDetails); + resourceMapRepository.findById(outcome.getId().getIdPart()) + .ifPresent(resourceMap -> exchange.getMessage().setHeader(CamelConstants.COMPOSITION_VERSION_UID, resourceMap.getCompositionVersionUid())); + break; + default: + throw new UnsupportedOperationException("Only 'Create', 'Transaction' or 'Update' operations are supported"); } exchange.getMessage().setHeader(CamelConstants.RESOURCE_ID, outcome.getId().getIdPart()); diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java index bcb4d9e58..454162c95 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java @@ -46,7 +46,7 @@ public ProvideResourceResponseProcessor(ResourceMapRepository resourceMapReposit @Override public void process(Exchange exchange) throws Exception { - LOG.trace("Processing Exchange: {}", exchange); + LOG.trace("Processing exchange..."); var composition = exchange.getIn().getMandatoryBody(CompositionEntity.class); var resourceId = exchange.getIn().getHeader(CamelConstants.RESOURCE_ID, String.class); diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourceResponseProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourceResponseProcessor.java deleted file mode 100644 index 0b188f2cc..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourceResponseProcessor.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.ehrbase.fhirbridge.camel.processor; - -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; -import org.apache.camel.Exchange; -import org.apache.camel.Processor; -import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.camel.CamelConstants; -import org.ehrbase.fhirbridge.camel.component.ehr.composition.CompositionConstants; -import org.ehrbase.fhirbridge.fhir.support.Resources; -import org.hl7.fhir.r4.model.Identifier; -import org.hl7.fhir.r4.model.Resource; -import org.springframework.stereotype.Component; - -/** - * {@link Processor} that injects the composition version ID in the resource sent back to the client. - */ -@Component -public class ResourceResponseProcessor implements Processor { - - @Override - public void process(Exchange exchange) throws Exception { - MethodOutcome methodOutcome = getMethodOutcome(exchange); - VersionUid compositionVersionId = getCompositionVersionId(exchange); - - Resource resource = (Resource) methodOutcome.getResource(); - Identifier identifier = new Identifier() - .setSystem(compositionVersionId.getSystem()) - .setValue(compositionVersionId.getUuid().toString()); - Resources.addIdentifier(identifier, resource); - - exchange.getMessage().setBody(methodOutcome); - } - - private MethodOutcome getMethodOutcome(Exchange exchange) { - MethodOutcome methodOutcome = exchange.getIn().getHeader(CamelConstants.METHOD_OUTCOME, MethodOutcome.class); - if (methodOutcome == null) { - throw new InternalErrorException("MethodOutcome must not be null"); - } - return methodOutcome; - } - - private VersionUid getCompositionVersionId(Exchange exchange) { - VersionUid compositionVersionId = exchange.getIn().getHeader(CompositionConstants.VERSION_UID, VersionUid.class); - if (compositionVersionId == null) { - throw new InternalErrorException("CompositionVersionId must not be null"); - } - return compositionVersionId; - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/BundleRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/BundleRoutes.java index 28a5d3434..0d6d9be6c 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/BundleRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/BundleRoutes.java @@ -64,13 +64,13 @@ public void configure() throws Exception { from("direct:process-anti-body-panel-bundle") .bean(AntiBodyPanelBundleValidator.class) .bean(AntiBodyPanelConverter.class, CONVERT) - .to("direct:process-observation") + .to("direct:internal-provide-observation") .process(BUNDLE_RESPONSE_PROCESSOR); from("direct:process-blood-gas-panel-bundle") .bean(BloodGasPanelBundleValidator.class) .bean(BloodGasPanelConverter.class, CONVERT) - .to("direct:process-observation") + .to("direct:internal-provide-observation") .process(BUNDLE_RESPONSE_PROCESSOR); from("direct:process-diagnostic-report-lab-bundle") diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java index fb067ed92..cb6dc3636 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java @@ -3,6 +3,7 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.apache.camel.builder.RouteBuilder; import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; +import org.ehrbase.client.exception.WrongStatusCodeException; import org.ehrbase.client.openehrclient.VersionUid; import org.ehrbase.fhirbridge.camel.CamelConstants; import org.ehrbase.fhirbridge.ehr.converter.ConversionException; @@ -14,6 +15,7 @@ public class CommonRoutes extends RouteBuilder { @Override public void configure() throws Exception { // @formatter:off + from("direct:internal-provide-resource") .routeId("internal-provide-resource") .process("ehrIdLookupProcessor") @@ -29,8 +31,13 @@ public void configure() throws Exception { composition.setVersionUid(new VersionUid(exchange.getIn().getHeader(CamelConstants.COMPOSITION_VERSION_UID, String.class))); }) .end() - .to("ehr-composition:producer?operation=mergeCompositionEntity") + .doTry() + .to("ehr-composition:producer?operation=mergeCompositionEntity") + .doCatch(WrongStatusCodeException.class) + .throwException(UnprocessableEntityException.class, "${exception.message}") + .end() .process("provideResourceResponseProcessor"); + // @formatter:on } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java index 7b3b01bab..b57fb3feb 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java @@ -35,6 +35,9 @@ public void configure() throws Exception { // Route: Provide Condition from("condition-provide:consumer?fhirContext=#fhirContext") .routeId("provide-condition-route") + .onCompletion() + .process("provideResourceAuditHandler") + .end() .process("fhirProfileValidator") .process("provideConditionPersistenceProcessor") .to("direct:internal-provide-resource"); diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java index 1903a1176..9269207f6 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java @@ -30,15 +30,14 @@ public class ConsentRoutes extends AbstractRouteBuilder { @Override public void configure() throws Exception { // @formatter:off - errorHandler( - defaultErrorHandler() - .logStackTrace(false)); -// onException(Exception.class) -// .process("defaultExceptionHandler"); + super.configure(); // Route: Provide Consent from("consent-provide:consumer?fhirContext=#fhirContext") .routeId("provide-consent-route") + .onCompletion() + .process("provideResourceAuditHandler") + .end() .process("fhirProfileValidator") .process("provideConsentPersistenceProcessor") .to("direct:internal-provide-resource"); diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java index c7c7e6843..3f91b5145 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java @@ -37,6 +37,9 @@ public void configure() throws Exception { // Route: Provide Diagnostic Report from("diagnostic-report-provide:consumer?fhirContext=#fhirContext") .routeId("provide-diagnostic-report-route") + .onCompletion() + .process("provideResourceAuditHandler") + .end() .process("fhirProfileValidator") .to("direct:internal-provide-diagnostic-report"); diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java index 8c1d23eb0..2c919f53d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java @@ -35,6 +35,9 @@ public void configure() throws Exception { // Route: Provide Medication Statement from("medication-statement-provide:consumer?fhirContext=#fhirContext") .routeId("provide-medication-statement-route") + .onCompletion() + .process("provideResourceAuditHandler") + .end() .process("fhirProfileValidator") .process("provideMedicationStatementPersistenceProcessor") .to("direct:internal-provide-resource"); diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java index ae7b385ed..1392ad2cc 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java @@ -16,15 +16,8 @@ package org.ehrbase.fhirbridge.camel.route; -import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; -import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.camel.CamelConstants; -import org.ehrbase.fhirbridge.camel.processor.ProvideResourcePersistenceProcessor; -import org.ehrbase.fhirbridge.core.repository.ResourceMapRepository; import org.hl7.fhir.r4.model.Observation; -import org.springframework.context.annotation.Bean; import org.springframework.stereotype.Component; /** @@ -41,32 +34,20 @@ public void configure() throws Exception { // @formatter:off super.configure(); - // 'Provide Observation' route definition + // Route: Provide Observation from("observation-provide:consumer?fhirContext=#fhirContext") -// .onCompletion() -// .process("auditEventProcessor") -// .end() - .process("fhirProfileValidator") - .process("observationPersistenceProcessor") - .process("ehrIdLookupProcessor") - .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") - .choice() - .when(header(CamelConstants.COMPOSITION_VERSION_UID).isNotNull()) - .process(exchange -> { - CompositionEntity composition = exchange.getIn().getMandatoryBody(CompositionEntity.class); - composition.setVersionUid(new VersionUid(exchange.getIn().getHeader(CamelConstants.COMPOSITION_VERSION_UID, String.class))); - }) - .end() - .to("ehr-composition:producer?operation=mergeCompositionEntity") - .process("provideResourceResponseProcessor"); - - // 'Create Observation' route definition - from("observation-create:consumer?fhirContext=#fhirContext") + .routeId("provide-observation-route") .onCompletion() - .process("auditCreateResourceProcessor") + .process("provideResourceAuditHandler") .end() .process("fhirProfileValidator") - .to("direct:process-observation"); + .to("direct:internal-provide-observation"); + + // Route: Internal Provide Observation + from("direct:internal-provide-observation") + .routeId("internal-provide-observation-route") + .process("provideObservationPersistenceProcessor") + .to("direct:internal-provide-resource"); // 'Find Observation' route definition from("observation-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") @@ -76,21 +57,6 @@ public void configure() throws Exception { .process("bundleProviderResponseProcessor") .otherwise() .to("bean:observationDao?method=read(${body}, ${headers.FhirRequestDetails})"); - - // Internal routes definition - from("direct:process-observation") - .setHeader(CamelConstants.METHOD_OUTCOME, method("observationDao", "create(${body}, ${headers.FhirRequestDetails})")) - .process("ehrIdLookupProcessor") - .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") - .to("ehr-composition:compositionEndpoint?operation=mergeCompositionEntity") - .process("resourceResponseProcessor"); - // @formatter:on } - - @Bean - public ProvideResourcePersistenceProcessor<Observation> observationPersistenceProcessor(IFhirResourceDao<Observation> observationDao, - ResourceMapRepository resourceMapRepository) { - return new ProvideResourcePersistenceProcessor<>(observationDao, Observation.class, resourceMapRepository); - } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java index 0d62657fb..a927b99b9 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java @@ -35,6 +35,9 @@ public void configure() throws Exception { // Route: Provide Patient from("patient-provide:consumer?fhirContext=#fhirContext") .routeId("provide-patient-route") + .onCompletion() + .process("provideResourceAuditHandler") + .end() .process("fhirProfileValidator") .process("providePatientPersistenceProcessor") .to("direct:internal-provide-resource"); diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java index de114fc8d..b4a52e77e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java @@ -37,6 +37,9 @@ public void configure() throws Exception { // Route: Provide Procedure from("procedure-provide:consumer?fhirContext=#fhirContext") .routeId("provide-procedure-route") + .onCompletion() + .process("provideResourceAuditHandler") + .end() .process("fhirProfileValidator") .process("provideProcedurePersistenceProcessor") .to("direct:internal-provide-resource"); diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java index 3a57e5971..9fb1b211d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java @@ -37,6 +37,9 @@ public void configure() throws Exception { // Route: Provide Questionnaire-Response from("questionnaire-response-provide:consumer?fhirContext=#fhirContext") .routeId("provide-questionnaire-response-route") + .onCompletion() + .process("provideResourceAuditHandler") + .end() .process("fhirProfileValidator") .process("provideQuestionnaireResponsePersistenceProcessor") .to("direct:internal-provide-resource"); diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/GenericProvideResourceProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/GenericProvideResourceProvider.java deleted file mode 100644 index 2013b2d87..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/GenericProvideResourceProvider.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.ehrbase.fhirbridge.fhir; - -import ca.uhn.fhir.rest.annotation.ConditionalUrlParam; -import ca.uhn.fhir.rest.annotation.Create; -import ca.uhn.fhir.rest.annotation.IdParam; -import ca.uhn.fhir.rest.annotation.ResourceParam; -import ca.uhn.fhir.rest.annotation.Update; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.api.server.RequestDetails; -import org.hl7.fhir.r4.model.DomainResource; -import org.hl7.fhir.r4.model.IdType; -import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * Generic implementation of {@link AbstractPlainProvider} that handles 'Provide Resource' transaction - * using {@link Create} and {@link Update} operations. - * - * @since 1.2.0 - */ -public class GenericProvideResourceProvider<T extends DomainResource> extends AbstractPlainProvider { - - private static final Logger LOG = LoggerFactory.getLogger(GenericProvideResourceProvider.class); - - @Create - public MethodOutcome create(@ResourceParam T resource, - RequestDetails requestDetails, - HttpServletRequest request, - HttpServletResponse response) { - LOG.trace("Executing 'Provide resource (resourceType: {})' transaction using 'create' operation...", - resource.getResourceType()); - - return requestAction(resource, null, request, response, requestDetails); - } - - @Update - public MethodOutcome update(@ResourceParam T resource, - @IdParam IdType id, - @ConditionalUrlParam String conditionalUrl, - RequestDetails requestDetails, - HttpServletRequest request, - HttpServletResponse response) { - LOG.trace("Executing 'Provide resource (resourceType: {})' transaction using 'update' operation...", - resource.getResourceType()); - - return requestAction(resource, null, request, response, requestDetails); - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/ProvideResourceProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/ProvideResourceProvider.java new file mode 100644 index 000000000..cdbd3e45a --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/ProvideResourceProvider.java @@ -0,0 +1,66 @@ +package org.ehrbase.fhirbridge.fhir; + +import ca.uhn.fhir.rest.annotation.ConditionalUrlParam; +import ca.uhn.fhir.rest.annotation.Create; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.annotation.ResourceParam; +import ca.uhn.fhir.rest.annotation.Update; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import org.hl7.fhir.r4.model.DomainResource; +import org.hl7.fhir.r4.model.IdType; +import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Implementation of {@link AbstractPlainProvider} that handles "Provide Resource" transaction + * {@link Create} and {@link Update} operations. + * + * @since 1.2.0 + */ +public class ProvideResourceProvider<T extends DomainResource> extends AbstractPlainProvider { + + private static final Logger LOG = LoggerFactory.getLogger(ProvideResourceProvider.class); + + /** + * Provides resource using {@link Create} operation. + * + * @param resource resource to be created + * @param requestDetails FHIR request details + * @param request HTTP servlet request + * @param response HTTP servlet response + * @return the result of the operation + */ + @Create + public MethodOutcome create(@ResourceParam T resource, + RequestDetails requestDetails, + HttpServletRequest request, HttpServletResponse response) { + LOG.trace("Executing 'Provide {}' transaction using 'create' operation...", resource.getResourceType()); + return requestAction(resource, null, request, response, requestDetails); + } + + /** + * Provides resource using {@link Update} operation. + * + * @param resource resource to be updated + * @param id ID of the existing resource + * @param conditionalUrl conditional "search" URL for update + * @param requestDetails FHIR request details + * @param request HTTP servlet request + * @param response HTTP servlet response + * @return the outcome of the operation + */ + @Update + public MethodOutcome update(@ResourceParam T resource, + @IdParam IdType id, + @ConditionalUrlParam String conditionalUrl, + RequestDetails requestDetails, + HttpServletRequest request, HttpServletResponse response) { + LOG.trace("Executing 'Provide {}' transaction using 'update' operation...", resource.getResourceType()); + return requestAction(resource, null, request, response, requestDetails); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/observation/CreateObservationAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/observation/CreateObservationAuditStrategy.java deleted file mode 100644 index 24feda936..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/observation/CreateObservationAuditStrategy.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.fhir.observation; - -import org.hl7.fhir.r4.model.Observation; -import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditStrategy; -import org.openehealth.ipf.commons.ihe.fhir.support.OperationOutcomeOperations; - -import java.util.Optional; - -/** - * Implementation of {@link org.openehealth.ipf.commons.ihe.core.atna.AuditStrategy AuditStrategy} - * for 'Create Observation' transaction. - * - * @since 1.0.0 - */ -public class CreateObservationAuditStrategy extends GenericFhirAuditStrategy<Observation> { - - public CreateObservationAuditStrategy() { - super(true, OperationOutcomeOperations.INSTANCE, observation -> Optional.of(observation.getSubject())); - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/observation/CreateObservationProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/observation/CreateObservationProvider.java deleted file mode 100644 index 9c5c599d2..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/observation/CreateObservationProvider.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.fhir.observation; - -import ca.uhn.fhir.rest.annotation.Create; -import ca.uhn.fhir.rest.annotation.ResourceParam; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.api.server.RequestDetails; -import org.hl7.fhir.r4.model.Observation; -import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * Implementation of {@link org.openehealth.ipf.commons.ihe.fhir.FhirProvider FhirProvider} that provides REST support - * for 'Create Observation' transaction. - * - * @since 1.0.0 - */ -public class CreateObservationProvider extends AbstractPlainProvider { - - @Create - public MethodOutcome createObservation(@ResourceParam Observation observation, RequestDetails requestDetails, - HttpServletRequest request, HttpServletResponse response) { - return requestAction(observation, null, request, response, requestDetails); - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/observation/CreateObservationTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/observation/CreateObservationTransaction.java deleted file mode 100644 index 0e30768a8..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/observation/CreateObservationTransaction.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.fhir.observation; - -import ca.uhn.fhir.context.FhirVersionEnum; -import org.openehealth.ipf.commons.ihe.fhir.FhirTransactionConfiguration; -import org.openehealth.ipf.commons.ihe.fhir.FhirTransactionValidator; -import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; - -/** - * Configuration for 'Create Observation' transaction. - * - * @since 1.0.0 - */ -public class CreateObservationTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { - - public CreateObservationTransaction() { - super("observation-create", - "Create Observation", - false, - null, - new CreateObservationAuditStrategy(), - FhirVersionEnum.R4, - new CreateObservationProvider(), - null, - FhirTransactionValidator.NO_VALIDATION); - } -} diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/observation-create b/src/main/resources/META-INF/services/org/apache/camel/component/observation-create deleted file mode 100644 index 499d56e82..000000000 --- a/src/main/resources/META-INF/services/org/apache/camel/component/observation-create +++ /dev/null @@ -1 +0,0 @@ -class=org.ehrbase.fhirbridge.camel.component.fhir.observation.CreateObservationComponent \ No newline at end of file diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/auditevent/AuditEventReportIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/auditevent/AuditEventReportIT.java index 3420e5eab..a67b2ba38 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/auditevent/AuditEventReportIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/auditevent/AuditEventReportIT.java @@ -2,23 +2,15 @@ import ca.uhn.fhir.rest.api.MethodOutcome; import org.apache.commons.io.IOUtils; -import org.ehrbase.fhirbridge.comparators.CustomTemporalAcessorComparator; -import org.ehrbase.fhirbridge.ehr.opt.d4lquestionnairecomposition.D4LQuestionnaireComposition; import org.ehrbase.fhirbridge.fhir.AbstractSetupIT; -import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.r4.model.AuditEvent; import org.hl7.fhir.r4.model.Bundle; -import org.javers.core.Javers; -import org.javers.core.JaversBuilder; -import org.javers.core.metamodel.clazz.ValueObjectDefinition; import org.junit.jupiter.api.Test; import org.springframework.core.io.ClassPathResource; import java.io.IOException; import java.nio.charset.StandardCharsets; -import java.time.temporal.TemporalAccessor; import java.util.Date; -import java.util.List; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -27,6 +19,7 @@ * Integration tests for {@link org.hl7.fhir.r4.model.AuditEvent AuditEvent} resource. */ class AuditEventReportIT extends AbstractSetupIT { + @Test void createResourceAndSearchAuditEvent() throws IOException { Date now = new Date(); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ObservationIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ObservationIT.java index 8f2e49871..a770df504 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ObservationIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ObservationIT.java @@ -14,7 +14,9 @@ import java.io.IOException; import java.time.temporal.TemporalAccessor; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * Integration tests for {@link org.hl7.fhir.r4.model.Observation Observation} resource. @@ -82,12 +84,12 @@ void createRespiratoryRate() throws IOException { @Test void createSofaScore() throws IOException { - //TODO The template does not support cvs0 yet create("create-sofa-score.json"); + //TODO The template does not support cvs0 yet create("create-sofa-score.json"); } @Test void createSofaScore1() throws IOException { - // create("create-sofa-score-cardiovuskular-score-1.json"); + // create("create-sofa-score-cardiovuskular-score-1.json"); } @Test @@ -111,7 +113,7 @@ void createWithInvalidQuantity() throws IOException { ICreateTyped createTyped = client.create().resource(resource.replaceAll(PATIENT_ID_TOKEN, PATIENT_ID)); Exception exception = Assertions.assertThrows(UnprocessableEntityException.class, createTyped::execute); - assertTrue(StringUtils.startsWith(exception.getMessage(), "HTTP 422 : HTTP status '400 Bad Request' was returned by EHRbase while trying to save the composition. Details: Wrong Status code. ")); + assertTrue(StringUtils.startsWith(exception.getMessage(), "HTTP 422 : Wrong Status code. Expected: [200, 201, 204]. Got: 400.")); } From 23fa1b3472c4241b988653ac88527cbc75cd4682 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Wed, 26 May 2021 09:08:54 +0200 Subject: [PATCH 077/141] Fix search issue --- .../config/HapiFhirJpaConfiguration.java | 50 ++++++++++--------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java index 37401a043..e77d7883d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java @@ -37,7 +37,10 @@ import org.hl7.fhir.r4.model.ConceptMap; import org.hl7.fhir.r4.model.Condition; import org.hl7.fhir.r4.model.Consent; +import org.hl7.fhir.r4.model.Device; import org.hl7.fhir.r4.model.DiagnosticReport; +import org.hl7.fhir.r4.model.Group; +import org.hl7.fhir.r4.model.Location; import org.hl7.fhir.r4.model.MedicationStatement; import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Patient; @@ -103,6 +106,14 @@ public IFhirResourceDao<Consent> consentDao() { return consentDao; } + @Bean + public IFhirResourceDao<Device> deviceDao() { + JpaResourceDao<Device> deviceDao = new JpaResourceDao<>(); + deviceDao.setResourceType(Device.class); + deviceDao.setContext(fhirContext()); + return deviceDao; + } + @Bean public IFhirResourceDao<DiagnosticReport> diagnosticReportDao() { JpaResourceDao<DiagnosticReport> diagnosticReportDao = new JpaResourceDao<>(); @@ -111,30 +122,21 @@ public IFhirResourceDao<DiagnosticReport> diagnosticReportDao() { return diagnosticReportDao; } -// -// @Bean -// public IFhirResourceDao<Device> deviceDao() { -// JpaResourceDao<Device> resourceDao = new JpaResourceDao<>(); -// resourceDao.setResourceType(Device.class); -// resourceDao.setContext(fhirContext()); -// return resourceDao; -// } -// -// @Bean -// public IFhirResourceDao<Group> groupDao() { -// JpaResourceDao<Group> resourceDao = new JpaResourceDao<>(); -// resourceDao.setResourceType(Group.class); -// resourceDao.setContext(fhirContext()); -// return resourceDao; -// } -// -// @Bean -// public IFhirResourceDao<Location> locationDao() { -// JpaResourceDao<Location> resourceDao = new JpaResourceDao<>(); -// resourceDao.setResourceType(Location.class); -// resourceDao.setContext(fhirContext()); -// return resourceDao; -// } + @Bean + public IFhirResourceDao<Group> groupDao() { + JpaResourceDao<Group> groupDao = new JpaResourceDao<>(); + groupDao.setResourceType(Group.class); + groupDao.setContext(fhirContext()); + return groupDao; + } + + @Bean + public IFhirResourceDao<Location> locationDao() { + JpaResourceDao<Location> locationDao = new JpaResourceDao<>(); + locationDao.setResourceType(Location.class); + locationDao.setContext(fhirContext()); + return locationDao; + } @Bean public IFhirResourceDao<MedicationStatement> medicationStatementDao() { From 11218db2b3e3086111b2e60a7642cfbbd47e1ad9 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 28 May 2021 10:05:35 +0200 Subject: [PATCH 078/141] Add integration tests for Condition and update Postman collection --- .../fhir-bridge.postman_collection.json | 176 +++++++++++++++--- .../fhir/AbstractTransactionIT.java | 61 ++++++ .../condition/FindConditionTransactionIT.java | 58 ++++++ .../ProvideConditionTransactionIT.java | 44 +++++ .../transactions/find-condition-search.json | 77 ++++++++ .../provide-condition-create.json | 77 ++++++++ .../provide-condition-update.json | 77 ++++++++ tests/robot/OBSERVATION/02_search.robot | 2 +- 8 files changed, 544 insertions(+), 28 deletions(-) create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/AbstractTransactionIT.java create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/condition/FindConditionTransactionIT.java create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionTransactionIT.java create mode 100644 src/test/resources/Condition/transactions/find-condition-search.json create mode 100644 src/test/resources/Condition/transactions/provide-condition-create.json create mode 100644 src/test/resources/Condition/transactions/provide-condition-update.json diff --git a/config/postman/fhir-bridge.postman_collection.json b/config/postman/fhir-bridge.postman_collection.json index 97ddc7911..d441c61a9 100644 --- a/config/postman/fhir-bridge.postman_collection.json +++ b/config/postman/fhir-bridge.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "d9f6a4ea-db6e-4816-986d-79b7d1f45886", + "_postman_id": "758479b8-b438-4a2a-a129-c12ee29d8d51", "name": "fhir-bridge", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, @@ -28,7 +28,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{baseUrl}}/fhir/AuditEvent?outcome", + "raw": "{{baseUrl}}/fhir/AuditEvent", "host": [ "{{baseUrl}}" ], @@ -142,10 +142,6 @@ "value": null, "disabled": true }, - { - "key": "outcome", - "value": null - }, { "key": "policy", "value": null, @@ -224,7 +220,50 @@ "name": "Condition", "item": [ { - "name": "Create Condition", + "name": "Profiles", + "item": [ + { + "name": "Create SymptomsCovid19", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"id\": \"8cb12ab0-3563-4154-bfeb-25aa897c2105\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/symptoms-covid-19\"\r\n ]\r\n },\r\n \"modifierExtension\": [\r\n {\r\n \"url\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/uncertainty-of-presence\",\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"261665006\",\r\n \"display\": \"Unknown (qualifier value)\",\r\n \"system\": \"http://snomed.info/sct\"\r\n }\r\n ],\r\n \"text\": \"Presence of symptom is unknown.\"\r\n }\r\n }\r\n ],\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"code\": \"75325-1\",\r\n \"display\": \"Symptom\",\r\n \"system\": \"http://loinc.org\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"36955009\",\r\n \"display\": \"Loss of taste\",\r\n \"system\": \"http://snomed.info/sct\"\r\n },\r\n {\r\n \"system\": \"http://fhir.de/CodeSystem/dimdi/icd-10-gm\",\r\n \"version\": \"2020\",\r\n \"code\": \"B97.2\",\r\n \"display\": \"Coronavirus as the cause of diseases classified to other chapters\"\r\n }\r\n ]\r\n },\r\n \"recordedDate\": \"2020-10-05\",\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"resourceType\": \"Condition\",\r\n \"verificationStatus\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"confirmed\",\r\n \"display\": \"Confirmed\",\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-ver-status\"\r\n },\r\n {\r\n \"code\": \"410605003\",\r\n \"display\": \"Confirmed present (qualifier value)\",\r\n \"system\": \"http://snomed.info/sct\"\r\n }\r\n ]\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Condition", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Condition" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Provide Condition - create", "event": [ { "listen": "prerequest", @@ -262,7 +301,7 @@ "response": [] }, { - "name": "Create SymptomsCovid19", + "name": "Provide Condition - update", "event": [ { "listen": "prerequest", @@ -275,11 +314,11 @@ } ], "request": { - "method": "POST", + "method": "PUT", "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"id\": \"8cb12ab0-3563-4154-bfeb-25aa897c2105\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/symptoms-covid-19\"\r\n ]\r\n },\r\n \"modifierExtension\": [\r\n {\r\n \"url\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/uncertainty-of-presence\",\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"261665006\",\r\n \"display\": \"Unknown (qualifier value)\",\r\n \"system\": \"http://snomed.info/sct\"\r\n }\r\n ],\r\n \"text\": \"Presence of symptom is unknown.\"\r\n }\r\n }\r\n ],\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"code\": \"75325-1\",\r\n \"display\": \"Symptom\",\r\n \"system\": \"http://loinc.org\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"36955009\",\r\n \"display\": \"Loss of taste\",\r\n \"system\": \"http://snomed.info/sct\"\r\n },\r\n {\r\n \"system\": \"http://fhir.de/CodeSystem/dimdi/icd-10-gm\",\r\n \"version\": \"2020\",\r\n \"code\": \"B97.2\",\r\n \"display\": \"Coronavirus as the cause of diseases classified to other chapters\"\r\n }\r\n ]\r\n },\r\n \"recordedDate\": \"2020-10-05\",\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"resourceType\": \"Condition\",\r\n \"verificationStatus\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"confirmed\",\r\n \"display\": \"Confirmed\",\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-ver-status\"\r\n },\r\n {\r\n \"code\": \"410605003\",\r\n \"display\": \"Confirmed present (qualifier value)\",\r\n \"system\": \"http://snomed.info/sct\"\r\n }\r\n ]\r\n }\r\n}", + "raw": "{\r\n \"resourceType\": \"Condition\",\r\n \"clinicalStatus\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n \"code\": \"active\"\r\n }\r\n ]\r\n },\r\n \"verificationStatus\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-ver-status\",\r\n \"code\": \"confirmed\"\r\n }\r\n ]\r\n },\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-category\",\r\n \"code\": \"encounter-diagnosis\",\r\n \"display\": \"Encounter Diagnosis\"\r\n },\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"439401001\",\r\n \"display\": \"Diagnosis\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"severity\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"24484000\",\r\n \"display\": \"Severe\"\r\n }\r\n ]\r\n },\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://fhir.de/CodeSystem/dimdi/icd-10-gm\",\r\n \"version\": \"2020\",\r\n \"code\": \"B97.2\",\r\n \"display\": \"Coronavirus as the cause of diseases classified to other chapters\"\r\n }\r\n ],\r\n \"text\": \"Coronavirus as the cause of diseases classified to other chapters\"\r\n },\r\n \"bodySite\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"49521004\",\r\n \"display\": \"Left external ear structure\"\r\n }\r\n ],\r\n \"text\": \"Left Ear\"\r\n }\r\n ],\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"onsetDateTime\": \"2012-05-24\",\r\n \"recorder\": {\r\n \"reference\": \"http://external.fhir.server/Practitioner/f201\"\r\n }\r\n}", "options": { "raw": { "language": "json" @@ -287,20 +326,31 @@ } }, "url": { - "raw": "{{baseUrl}}/fhir/Condition", + "raw": "{{baseUrl}}/fhir/Condition?_id=1", "host": [ "{{baseUrl}}" ], "path": [ "fhir", "Condition" + ], + "query": [ + { + "key": "_id", + "value": "1" + }, + { + "key": "subject.identifier", + "value": null, + "disabled": true + } ] } }, "response": [] }, { - "name": "Find Condition: read", + "name": "Find Condition - read", "event": [ { "listen": "prerequest", @@ -336,7 +386,7 @@ "response": [] }, { - "name": "Find Condition: read", + "name": "Find Condition - vread", "event": [ { "listen": "prerequest", @@ -352,19 +402,25 @@ "method": "GET", "header": [], "url": { - "raw": "{{baseUrl}}/fhir/Condition/:id", + "raw": "{{baseUrl}}/fhir/Condition/:id/_history/:vid", "host": [ "{{baseUrl}}" ], "path": [ "fhir", "Condition", - ":id" + ":id", + "_history", + ":vid" ], "variable": [ { "key": "id", - "value": "2" + "value": "1" + }, + { + "key": "vid", + "value": "3" } ] } @@ -372,7 +428,7 @@ "response": [] }, { - "name": "Find Condition: search", + "name": "Find Condition - search", "event": [ { "listen": "prerequest", @@ -388,7 +444,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{baseUrl}}/fhir/Condition?verification-status=confirmed", + "raw": "{{baseUrl}}/fhir/Condition?_id=70", "host": [ "{{baseUrl}}" ], @@ -399,8 +455,7 @@ "query": [ { "key": "_id", - "value": "1", - "disabled": true + "value": "70" }, { "key": "_language", @@ -543,13 +598,14 @@ "disabled": true }, { - "key": "subject", - "value": null, + "key": "verification-status", + "value": "confirmed", "disabled": true }, { - "key": "verification-status", - "value": "confirmed" + "key": "subject.identifier", + "value": "123", + "disabled": true } ] } @@ -1678,7 +1734,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{baseUrl}}/fhir/Observation?patient.identifier=07f602e0-579e-4fe3-95af-381728bf0d46", + "raw": "{{baseUrl}}/fhir/Observation", "host": [ "{{baseUrl}}" ], @@ -1879,7 +1935,8 @@ }, { "key": "patient.identifier", - "value": "07f602e0-579e-4fe3-95af-381728bf0d46" + "value": "07f602e0-579e-4fe3-95af-381728bf0d46", + "disabled": true }, { "key": "performer", @@ -1925,6 +1982,33 @@ } }, "response": [] + }, + { + "name": "Provide Observation - PUT", + "request": { + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-pressure\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"system\": \"urn:ietf:rfc:3986\",\r\n \"value\": \"urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281\"\r\n }\r\n ],\r\n \"basedOn\": [\r\n {\r\n \"identifier\": {\r\n \"system\": \"https://acme.org/identifiers\",\r\n \"value\": \"1234\"\r\n }\r\n }\r\n ],\r\n \"status\": \"unknown\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\",\r\n \"display\": \"Vital Signs\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"85354-9\",\r\n \"display\": \"Blood pressure panel with all children optional\"\r\n }\r\n ],\r\n \"text\": \"Blood pressure systolic & diastolic\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"07f602e0-579e-4fe3-95af-381728bf0d49\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2012-09-17\",\r\n \"performer\": [\r\n {\r\n \"reference\": \"http://external.fhir.server/Practitioner/example\"\r\n }\r\n ],\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"L\",\r\n \"display\": \"low\"\r\n }\r\n ],\r\n \"text\": \"Below low normal\"\r\n }\r\n ],\r\n \"bodySite\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"368209003\",\r\n \"display\": \"Right arm\"\r\n }\r\n ]\r\n },\r\n \"component\": [\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8480-6\",\r\n \"display\": \"Systolic blood pressure\"\r\n },\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"271649006\",\r\n \"display\": \"Systolic blood pressure\"\r\n },\r\n {\r\n \"system\": \"http://acme.org/devices/clinical-codes\",\r\n \"code\": \"bp-s\",\r\n \"display\": \"Systolic Blood pressure\"\r\n }\r\n ]\r\n },\r\n \"valueQuantity\": {\r\n \"value\": 107,\r\n \"unit\": \"mmHg\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"mm[Hg]\"\r\n },\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"N\",\r\n \"display\": \"normal\"\r\n }\r\n ],\r\n \"text\": \"Normal\"\r\n }\r\n ]\r\n },\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8462-4\",\r\n \"display\": \"Diastolic blood pressure\"\r\n }\r\n ]\r\n },\r\n \"valueQuantity\": {\r\n \"value\": 107,\r\n \"unit\": \"mmHg\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"mm[Hg]\"\r\n },\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"L\",\r\n \"display\": \"low\"\r\n }\r\n ],\r\n \"text\": \"Below low normal\"\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Observation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Observation" + ] + } + }, + "response": [] } ] }, @@ -1944,6 +2028,44 @@ } } ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Patient\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/Patient\"\r\n ]\r\n },\r\n \"extension\": [\r\n {\r\n \"url\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/ethnic-group\",\r\n \"valueCoding\": {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"186019001\",\r\n \"display\": \"Other ethnic, mixed origin\"\r\n }\r\n },\r\n {\r\n \"extension\": [\r\n {\r\n \"url\": \"dateTimeOfDocumentation\",\r\n \"valueDateTime\": \"2020-10-01\"\r\n },\r\n {\r\n \"url\": \"age\",\r\n \"valueAge\": {\r\n \"value\": 67,\r\n \"unit\": \"years\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"a\"\r\n }\r\n }\r\n ],\r\n \"url\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/age\"\r\n }\r\n ],\r\n \"identifier\": [\r\n {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n ]\r\n}\r\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Patient", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Patient" + ] + } + }, + "response": [] + }, + { + "name": "Provide Patient - Invalid", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], "request": { "method": "POST", "header": [], @@ -3034,4 +3156,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/AbstractTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/AbstractTransactionIT.java new file mode 100644 index 000000000..0502bb3d8 --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/AbstractTransactionIT.java @@ -0,0 +1,61 @@ +package org.ehrbase.fhirbridge.fhir; + +import ca.uhn.fhir.rest.api.MethodOutcome; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.r4.model.Bundle; +import org.springframework.core.io.ClassPathResource; +import org.springframework.util.FileCopyUtils; + +import java.io.IOException; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; + +public class AbstractTransactionIT extends AbstractSetupIT { + + protected MethodOutcome create(String resourceLocation) throws IOException { + return client.create() + .resource(getResourceAsString(resourceLocation)) + .execute(); + } + + protected MethodOutcome update(String resourceLocation) throws IOException { + return update(resourceLocation, null); + } + + protected MethodOutcome update(String resourceLocation, String conditionalUrl) throws IOException { + var update = client.update() + .resource(getResourceAsString(resourceLocation)); + + if (conditionalUrl != null) { + update.conditionalByUrl(conditionalUrl); + } + + return update.execute(); + } + + protected <T extends IBaseResource> T read(String id, Class<T> resourceType) { + return client.read() + .resource(resourceType) + .withId(id) + .execute(); + } + + protected <T extends IBaseResource> T vread(String id, String versionId, Class<T> resourceType) { + return client.read() + .resource(resourceType) + .withIdAndVersion(id, versionId) + .execute(); + } + + protected Bundle search(String searchUrl) { + return (Bundle) client.search() + .byUrl(searchUrl) + .execute(); + } + + private String getResourceAsString(String resourceLocation) throws IOException { + var reader = new InputStreamReader(new ClassPathResource(resourceLocation).getInputStream(), StandardCharsets.UTF_8); + var resource = FileCopyUtils.copyToString(reader); + return resource.replaceAll(PATIENT_ID_TOKEN, PATIENT_ID); + } +} diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/condition/FindConditionTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/condition/FindConditionTransactionIT.java new file mode 100644 index 000000000..f304c2a7a --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/condition/FindConditionTransactionIT.java @@ -0,0 +1,58 @@ +package org.ehrbase.fhirbridge.fhir.condition; + +import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.Condition; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import java.io.IOException; + +/** + * Integration Tests that validate "Find Condition" transaction. + */ +class FindConditionTransactionIT extends AbstractTransactionIT { + + @Test + void findConditionRead() throws Exception { + var outcome = create("Condition/transactions/provide-condition-create.json"); + var id = outcome.getId(); + + var condition = read(id.getIdPart(), Condition.class); + + Assertions.assertNotNull(condition); + Assertions.assertNotNull(condition.getId(), id.getIdPart()); + Assertions.assertEquals(PATIENT_ID, condition.getSubject().getIdentifier().getValue()); + } + + @Test + void findConditionVRead() throws Exception { + var outcome = create("Condition/transactions/provide-condition-create.json"); + var id = outcome.getId(); + + var condition = vread(id.getIdPart(), id.getVersionIdPart(), Condition.class); + Assertions.assertNotNull(condition); + Assertions.assertNotNull(condition.getId(), id.getIdPart()); + Assertions.assertNotNull(condition.getMeta().getVersionId(), id.getVersionIdPart()); + Assertions.assertEquals(PATIENT_ID, condition.getSubject().getIdentifier().getValue()); + } + + @Test + void findConditionSearch() throws IOException { + create("Condition/transactions/find-condition-search.json"); + create("Condition/transactions/find-condition-search.json"); + create("Condition/transactions/find-condition-search.json"); + + Bundle bundle = search("Condition?subject.identifier=" + PATIENT_ID + "&clinical-status=recurrence&verification-status=refuted"); + + Assertions.assertEquals(3, bundle.getTotal()); + + bundle.getEntry().forEach(entry -> { + var condition = (Condition) entry.getResource(); + + Assertions.assertEquals(PATIENT_ID, condition.getSubject().getIdentifier().getValue()); + Assertions.assertEquals("refuted", condition.getVerificationStatus().getCodingFirstRep().getCode()); + Assertions.assertEquals("recurrence", condition.getClinicalStatus().getCodingFirstRep().getCode()); + }); + } +} diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionTransactionIT.java new file mode 100644 index 000000000..f761c03f2 --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionTransactionIT.java @@ -0,0 +1,44 @@ +package org.ehrbase.fhirbridge.fhir.condition; + +import ca.uhn.fhir.rest.api.MethodOutcome; +import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.r4.model.Condition; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +/** + * Integration Tests that validate "Provide Condition" transaction. + */ +class ProvideConditionTransactionIT extends AbstractTransactionIT { + + @Test + void provideConditionCreate() throws Exception { + var outcome = create("Condition/transactions/provide-condition-create.json"); + + Assertions.assertEquals(true, outcome.getCreated()); + Assertions.assertNotNull(outcome.getId().getValue()); + } + + @Test + void provideConditionConditionalUpdate() throws Exception { + MethodOutcome outcome; + + outcome = create("Condition/transactions/provide-condition-create.json"); + var id = outcome.getId(); + + outcome = update("Condition/transactions/provide-condition-update.json", "Condition?_id=" + id.getIdPart() + "&subject.identifier=" + PATIENT_ID); + + Assertions.assertEquals(id.getIdPart(), outcome.getId().getIdPart()); + Assertions.assertEquals(id.getVersionIdPartAsLong() + 1, outcome.getId().getVersionIdPartAsLong()); + + var condition = (Condition) outcome.getResource(); + + var clinicalStatus = condition.getClinicalStatus(); + Assertions.assertEquals("inactive", clinicalStatus.getCodingFirstRep().getCode()); + + var verificationStatus = condition.getVerificationStatus(); + Assertions.assertEquals("unconfirmed", verificationStatus.getCodingFirstRep().getCode()); + + Assertions.assertEquals(PATIENT_ID, condition.getSubject().getIdentifier().getValue()); + } +} diff --git a/src/test/resources/Condition/transactions/find-condition-search.json b/src/test/resources/Condition/transactions/find-condition-search.json new file mode 100644 index 000000000..fc1e65c36 --- /dev/null +++ b/src/test/resources/Condition/transactions/find-condition-search.json @@ -0,0 +1,77 @@ +{ + "resourceType": "Condition", + "clinicalStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", + "code": "recurrence" + } + ] + }, + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "refuted" + } + ] + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "problem-list-item", + "display": "Problem List Item" + }, + { + "system": "http://snomed.info/sct", + "code": "439401001", + "display": "Diagnosis" + } + ] + } + ], + "severity": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "24484000", + "display": "Severe" + } + ] + }, + "code": { + "coding": [ + { + "system": "http://fhir.de/CodeSystem/dimdi/icd-10-gm", + "code": "B97.2", + "display": "Coronavirus as the cause of diseases classified to other chapters" + } + ], + "text": "Coronavirus as the cause of diseases classified to other chapters" + }, + "bodySite": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "49521004", + "display": "Left external ear structure" + } + ], + "text": "Left Ear" + } + ], + "subject": { + "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "onsetDateTime": "2012-05-24", + "recorder": { + "reference": "http://external.fhir.server/Practitioner/f201" + } +} \ No newline at end of file diff --git a/src/test/resources/Condition/transactions/provide-condition-create.json b/src/test/resources/Condition/transactions/provide-condition-create.json new file mode 100644 index 000000000..8439c417f --- /dev/null +++ b/src/test/resources/Condition/transactions/provide-condition-create.json @@ -0,0 +1,77 @@ +{ + "resourceType": "Condition", + "clinicalStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", + "code": "active" + } + ] + }, + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed" + } + ] + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "encounter-diagnosis", + "display": "Encounter Diagnosis" + }, + { + "system": "http://snomed.info/sct", + "code": "439401001", + "display": "Diagnosis" + } + ] + } + ], + "severity": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "24484000", + "display": "Severe" + } + ] + }, + "code": { + "coding": [ + { + "system": "http://fhir.de/CodeSystem/dimdi/icd-10-gm", + "code": "B97.2", + "display": "Coronavirus as the cause of diseases classified to other chapters" + } + ], + "text": "Coronavirus as the cause of diseases classified to other chapters" + }, + "bodySite": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "49521004", + "display": "Left external ear structure" + } + ], + "text": "Left Ear" + } + ], + "subject": { + "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "onsetDateTime": "2012-05-24", + "recorder": { + "reference": "http://external.fhir.server/Practitioner/f201" + } +} \ No newline at end of file diff --git a/src/test/resources/Condition/transactions/provide-condition-update.json b/src/test/resources/Condition/transactions/provide-condition-update.json new file mode 100644 index 000000000..321f8cf55 --- /dev/null +++ b/src/test/resources/Condition/transactions/provide-condition-update.json @@ -0,0 +1,77 @@ +{ + "resourceType": "Condition", + "clinicalStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", + "code": "inactive" + } + ] + }, + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "unconfirmed" + } + ] + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-category", + "code": "encounter-diagnosis", + "display": "Encounter Diagnosis" + }, + { + "system": "http://snomed.info/sct", + "code": "439401001", + "display": "Diagnosis" + } + ] + } + ], + "severity": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "24484000", + "display": "Severe" + } + ] + }, + "code": { + "coding": [ + { + "system": "http://fhir.de/CodeSystem/dimdi/icd-10-gm", + "code": "B97.2", + "display": "Coronavirus as the cause of diseases classified to other chapters" + } + ], + "text": "Coronavirus as the cause of diseases classified to other chapters" + }, + "bodySite": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "49521004", + "display": "Left external ear structure" + } + ], + "text": "Left Ear" + } + ], + "subject": { + "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "onsetDateTime": "2012-05-24", + "recorder": { + "reference": "http://external.fhir.server/Practitioner/f201" + } +} \ No newline at end of file diff --git a/tests/robot/OBSERVATION/02_search.robot b/tests/robot/OBSERVATION/02_search.robot index c84f56607..5c1413c5e 100644 --- a/tests/robot/OBSERVATION/02_search.robot +++ b/tests/robot/OBSERVATION/02_search.robot @@ -77,7 +77,7 @@ Force Tags observation_search ... 4. *POST* example JSON to observation endpoint\n\n ... 5. *GET* ``POST {{ehrbase_url}}/query/aql WITH "q": "SELECT c FROM EHR e [ehr_id/value='{{ehr_id}}'] CONTAINS COMPOSITION c" `` \n\n ... 6. *VALIDATE* response status against 200 - [Tags] heart-rate valid + [Tags] heart-rate valid not-ready not-implemented observation.create heart rate Heart Rate create-heart-rate.json extract identifier_value from response From 8cd1b6fa13972ab5f79a9210a21d08ad2de1e3e2 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 28 May 2021 10:26:25 +0200 Subject: [PATCH 079/141] Add integration tests for Consent and update Postman collection --- .../fhir-bridge.postman_collection.json | 50 +++++++++++++-- .../consent/FindConsentTransactionIT.java | 61 +++++++++++++++++++ .../consent/ProvideConsentTransactionIT.java | 44 +++++++++++++ .../transactions/find-consent-search.json | 54 ++++++++++++++++ .../transactions/provide-consent-create.json | 54 ++++++++++++++++ .../transactions/provide-consent-update.json | 54 ++++++++++++++++ 6 files changed, 311 insertions(+), 6 deletions(-) create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentTransactionIT.java create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentTransactionIT.java create mode 100644 src/test/resources/Consent/transactions/find-consent-search.json create mode 100644 src/test/resources/Consent/transactions/provide-consent-create.json create mode 100644 src/test/resources/Consent/transactions/provide-consent-update.json diff --git a/config/postman/fhir-bridge.postman_collection.json b/config/postman/fhir-bridge.postman_collection.json index d441c61a9..65ecfdf01 100644 --- a/config/postman/fhir-bridge.postman_collection.json +++ b/config/postman/fhir-bridge.postman_collection.json @@ -416,11 +416,11 @@ "variable": [ { "key": "id", - "value": "1" + "value": "70" }, { "key": "vid", - "value": "3" + "value": "1" } ] } @@ -638,7 +638,7 @@ "name": "Consent", "item": [ { - "name": "Create Consent", + "name": "Provide Consent - create", "event": [ { "listen": "prerequest", @@ -676,7 +676,45 @@ "response": [] }, { - "name": "Find Consent: read", + "name": "Provide Consent - update", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Consent\",\r\n \"id\": \"e1c90e84-aa7b-4999-8036-27f88dd7b60e\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/do-not-resuscitate-order\"\r\n ]\r\n },\r\n \"status\": \"active\",\r\n \"scope\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\r\n \"code\": \"adr\",\r\n \"display\": \"Advanced Care Directive\"\r\n }\r\n ]\r\n },\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentcategorycodes\",\r\n \"code\": \"dnr\",\r\n \"display\": \"Do Not Resuscitate\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"patient\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\",\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"policy\": [\r\n {\r\n \"uri\": \"https://www.aerzteblatt.de/archiv/65440/DNR-Anordnungen-Das-fehlende-Bindeglied\"\r\n }\r\n ],\r\n \"provision\": {\r\n \"code\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"304252001\",\r\n \"display\": \"For resuscitation\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Consent", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Consent" + ] + } + }, + "response": [] + }, + { + "name": "Find Consent - read", "event": [ { "listen": "prerequest", @@ -712,7 +750,7 @@ "response": [] }, { - "name": "Find Consent: vread", + "name": "Find Consent - vread", "event": [ { "listen": "prerequest", @@ -754,7 +792,7 @@ "response": [] }, { - "name": "Find Consent: search", + "name": "Find Consent - search", "event": [ { "listen": "prerequest", diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentTransactionIT.java new file mode 100644 index 000000000..dc796d1db --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentTransactionIT.java @@ -0,0 +1,61 @@ +package org.ehrbase.fhirbridge.fhir.consent; + +import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.Consent; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.io.IOException; + +/** + * Integration Tests that validate "Find Consent" transaction. + */ +class FindConsentTransactionIT extends AbstractTransactionIT { + + @Disabled("Converter not yet implemented") + @Test + void findConsentRead() throws Exception { + var outcome = create("Consent/transactions/provide-consent-create.json"); + var id = outcome.getId(); + + var consent = read(id.getIdPart(), Consent.class); + + Assertions.assertNotNull(consent); + Assertions.assertNotNull(consent.getId(), id.getIdPart()); + Assertions.assertEquals(PATIENT_ID, consent.getPatient().getIdentifier().getValue()); + } + + @Disabled("Converter not yet implemented") + @Test + void findConsentVRead() throws Exception { + var outcome = create("Consent/transactions/provide-consent-create.json"); + var id = outcome.getId(); + + var consent = vread(id.getIdPart(), id.getVersionIdPart(), Consent.class); + Assertions.assertNotNull(consent); + Assertions.assertNotNull(consent.getId(), id.getIdPart()); + Assertions.assertNotNull(consent.getMeta().getVersionId(), id.getVersionIdPart()); + Assertions.assertEquals(PATIENT_ID, consent.getPatient().getIdentifier().getValue()); + } + + @Disabled("Converter not yet implemented") + @Test + void findConsentSearch() throws IOException { + create("Consent/transactions/find-consent-search.json"); + create("Consent/transactions/find-consent-search.json"); + create("Consent/transactions/find-consent-search.json"); + + Bundle bundle = search("Consent?subject.identifier=" + PATIENT_ID + "&status=rejected"); + + Assertions.assertEquals(3, bundle.getTotal()); + + bundle.getEntry().forEach(entry -> { + var consent = (Consent) entry.getResource(); + + Assertions.assertEquals(PATIENT_ID, consent.getPatient().getIdentifier().getValue()); + Assertions.assertEquals(Consent.ConsentState.REJECTED, consent.getStatus()); + }); + } +} diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentTransactionIT.java new file mode 100644 index 000000000..1be49cea1 --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentTransactionIT.java @@ -0,0 +1,44 @@ +package org.ehrbase.fhirbridge.fhir.consent; + +import ca.uhn.fhir.rest.api.MethodOutcome; +import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.r4.model.Consent; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Integration Tests that validate "Provide Consent" transaction. + */ +class ProvideConsentTransactionIT extends AbstractTransactionIT { + + @Disabled("Converter not yet implemented") + @Test + void provideConsentCreate() throws Exception { + var outcome = create("Consent/transactions/provide-consent-create.json"); + + Assertions.assertEquals(true, outcome.getCreated()); + Assertions.assertNotNull(outcome.getId().getValue()); + } + + @Disabled("Converter not yet implemented") + @Test + void provideConsentConditionalUpdate() throws Exception { + MethodOutcome outcome; + + outcome = create("Consent/transactions/provide-consent-create.json"); + var id = outcome.getId(); + + outcome = update("Consent/transactions/provide-consent-update.json", "Consent?_id=" + id.getIdPart() + "&patient.identifier=" + PATIENT_ID); + + Assertions.assertEquals(id.getIdPart(), outcome.getId().getIdPart()); + Assertions.assertEquals(id.getVersionIdPartAsLong() + 1, outcome.getId().getVersionIdPartAsLong()); + + var consent = (Consent) outcome.getResource(); + + var scope = consent.getScope(); + Assertions.assertEquals("research", scope.getCodingFirstRep().getCode()); + + Assertions.assertEquals(PATIENT_ID, consent.getPatient().getIdentifier().getValue()); + } +} diff --git a/src/test/resources/Consent/transactions/find-consent-search.json b/src/test/resources/Consent/transactions/find-consent-search.json new file mode 100644 index 000000000..cc675d05f --- /dev/null +++ b/src/test/resources/Consent/transactions/find-consent-search.json @@ -0,0 +1,54 @@ +{ + "resourceType": "Consent", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/do-not-resuscitate-order" + ] + }, + "status": "rejected", + "scope": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/consentscope", + "code": "adr", + "display": "Advanced Care Directive" + } + ] + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/consentcategorycodes", + "code": "dnr", + "display": "Do Not Resuscitate" + } + ] + } + ], + "patient": { + "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "policy": [ + { + "uri": "https://www.aerzteblatt.de/archiv/65440/DNR-Anordnungen-Das-fehlende-Bindeglied" + } + ], + "provision": { + "code": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "304252001", + "display": "For resuscitation" + } + ] + } + ] + } +} \ No newline at end of file diff --git a/src/test/resources/Consent/transactions/provide-consent-create.json b/src/test/resources/Consent/transactions/provide-consent-create.json new file mode 100644 index 000000000..2ea7f118f --- /dev/null +++ b/src/test/resources/Consent/transactions/provide-consent-create.json @@ -0,0 +1,54 @@ +{ + "resourceType": "Consent", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/do-not-resuscitate-order" + ] + }, + "status": "active", + "scope": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/consentscope", + "code": "adr", + "display": "Advanced Care Directive" + } + ] + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/consentcategorycodes", + "code": "dnr", + "display": "Do Not Resuscitate" + } + ] + } + ], + "patient": { + "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "policy": [ + { + "uri": "https://www.aerzteblatt.de/archiv/65440/DNR-Anordnungen-Das-fehlende-Bindeglied" + } + ], + "provision": { + "code": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "304252001", + "display": "For resuscitation" + } + ] + } + ] + } +} \ No newline at end of file diff --git a/src/test/resources/Consent/transactions/provide-consent-update.json b/src/test/resources/Consent/transactions/provide-consent-update.json new file mode 100644 index 000000000..463b6998e --- /dev/null +++ b/src/test/resources/Consent/transactions/provide-consent-update.json @@ -0,0 +1,54 @@ +{ + "resourceType": "Consent", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/do-not-resuscitate-order" + ] + }, + "status": "active", + "scope": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/consentscope", + "code": "research", + "display": "Research" + } + ] + }, + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/consentcategorycodes", + "code": "dnr", + "display": "Do Not Resuscitate" + } + ] + } + ], + "patient": { + "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "policy": [ + { + "uri": "https://www.aerzteblatt.de/archiv/65440/DNR-Anordnungen-Das-fehlende-Bindeglied" + } + ], + "provision": { + "code": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "304252001", + "display": "For resuscitation" + } + ] + } + ] + } +} \ No newline at end of file From 30cd6fabccc00eab385814b3dd93f2cfc0b2b55a Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 28 May 2021 11:48:29 +0200 Subject: [PATCH 080/141] Add integration tests for DiagnosticReport and update Postman collection --- .../fhir-bridge.postman_collection.json | 1115 +++++++++-------- .../consent/FindConsentTransactionIT.java | 2 +- .../FindDiagnosticReportTransactionIT.java | 57 + .../ProvideDiagnosticReportTransactionIT.java | 40 + .../find-diagnostic-report-search.json | 178 +++ .../provide-diagnostic-report-create.json | 178 +++ .../provide-diagnostic-report-update.json | 178 +++ 7 files changed, 1231 insertions(+), 517 deletions(-) create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/FindDiagnosticReportTransactionIT.java create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportTransactionIT.java create mode 100644 src/test/resources/DiagnosticReport/transactions/find-diagnostic-report-search.json create mode 100644 src/test/resources/DiagnosticReport/transactions/provide-diagnostic-report-create.json create mode 100644 src/test/resources/DiagnosticReport/transactions/provide-diagnostic-report-update.json diff --git a/config/postman/fhir-bridge.postman_collection.json b/config/postman/fhir-bridge.postman_collection.json index 65ecfdf01..867787704 100644 --- a/config/postman/fhir-bridge.postman_collection.json +++ b/config/postman/fhir-bridge.postman_collection.json @@ -280,7 +280,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Condition\",\r\n \"clinicalStatus\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n \"code\": \"active\"\r\n }\r\n ]\r\n },\r\n \"verificationStatus\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-ver-status\",\r\n \"code\": \"confirmed\"\r\n }\r\n ]\r\n },\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-category\",\r\n \"code\": \"encounter-diagnosis\",\r\n \"display\": \"Encounter Diagnosis\"\r\n },\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"439401001\",\r\n \"display\": \"Diagnosis\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"severity\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"24484000\",\r\n \"display\": \"Severe\"\r\n }\r\n ]\r\n },\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://fhir.de/CodeSystem/dimdi/icd-10-gm\",\r\n \"version\": \"2020\",\r\n \"code\": \"B97.2\",\r\n \"display\": \"Coronavirus as the cause of diseases classified to other chapters\"\r\n }\r\n ],\r\n \"text\": \"Coronavirus as the cause of diseases classified to other chapters\"\r\n },\r\n \"bodySite\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"49521004\",\r\n \"display\": \"Left external ear structure\"\r\n }\r\n ],\r\n \"text\": \"Left Ear\"\r\n }\r\n ],\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"onsetDateTime\": \"2012-05-24\",\r\n \"recorder\": {\r\n \"reference\": \"http://external.fhir.server/Practitioner/f201\"\r\n }\r\n}", + "raw": "{\r\n \"resourceType\": \"Condition\",\r\n \"clinicalStatus\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n \"code\": \"active\"\r\n }\r\n ]\r\n },\r\n \"verificationStatus\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-ver-status\",\r\n \"code\": \"confirmed\"\r\n }\r\n ]\r\n },\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-category\",\r\n \"code\": \"encounter-diagnosis\",\r\n \"display\": \"Encounter Diagnosis\"\r\n },\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"439401001\",\r\n \"display\": \"Diagnosis\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"severity\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"24484000\",\r\n \"display\": \"Severe\"\r\n }\r\n ]\r\n },\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://fhir.de/CodeSystem/dimdi/icd-10-gm\",\r\n \"version\": \"2020\",\r\n \"code\": \"B97.2\",\r\n \"display\": \"Coronavirus as the cause of diseases classified to other chapters\"\r\n }\r\n ],\r\n \"text\": \"Coronavirus as the cause of diseases classified to other chapters\"\r\n },\r\n \"bodySite\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"49521004\",\r\n \"display\": \"Left external ear structure\"\r\n }\r\n ],\r\n \"text\": \"Left Ear\"\r\n }\r\n ],\r\n \"subject\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\",\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"onsetDateTime\": \"2012-05-24\",\r\n \"recorder\": {\r\n \"reference\": \"http://external.fhir.server/Practitioner/f201\"\r\n }\r\n}", "options": { "raw": { "language": "json" @@ -701,13 +701,19 @@ } }, "url": { - "raw": "{{baseUrl}}/fhir/Consent", + "raw": "{{baseUrl}}/fhir/Consent?patient.identifier={{patientId}}", "host": [ "{{baseUrl}}" ], "path": [ "fhir", "Consent" + ], + "query": [ + { + "key": "patient.identifier", + "value": "{{patientId}}" + } ] } }, @@ -832,7 +838,7 @@ "name": "DiagnosticReport", "item": [ { - "name": "Create DiagnosticReportLab", + "name": "Provide Diagnostic Report - create", "event": [ { "listen": "prerequest", @@ -849,7 +855,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"resourceType\": \"DiagnosticReport\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/DiagnosticReportLab\"\r\n ],\r\n \"source\": \"http://www.highmed.org\"\r\n },\r\n \"contained\": [\r\n {\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"obs-1\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ObservationLab\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://diz.mii.de/fhir/core/NamingSystem/test-lab-results\",\r\n \"value\": \"59826-8_1234567890\",\r\n \"assigner\": {\r\n \"identifier\": {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/NamingSystem/org-identifier\",\r\n \"value\": \"DIZ-ID\"\r\n }\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"26436-6\"\r\n },\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"laboratory\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"732-8\",\r\n \"display\": \"Lymphocytes [#/volume] in Blood by Manual count\"\r\n }\r\n ],\r\n \"text\": \"Kreatinin\"\r\n },\r\n \"subject\": {\r\n \"reference\": \"urn:uuid:07f602e0-579e-4fe3-95af-381728bf0d49\"\r\n },\r\n \"encounter\": {\r\n \"reference\": \"http://external.fhir.server/Encounter/555\"\r\n },\r\n \"effectiveDateTime\": \"2018-11-20T12:05:00+01:00\",\r\n \"issued\": \"2018-03-11T10:28:00+01:00\",\r\n \"performer\": [\r\n {\r\n \"reference\": \"http://external.fhir.server/Organization/7772\",\r\n \"display\": \"Zentrallabor des IKCL\"\r\n }\r\n ],\r\n \"valueQuantity\": {\r\n \"value\": 72,\r\n \"unit\": \"µmol/l\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"umol/L\"\r\n },\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"N\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"referenceRange\": [\r\n {\r\n \"low\": {\r\n \"value\": 72\r\n },\r\n \"high\": {\r\n \"value\": 127\r\n },\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/referencerange-meaning\",\r\n \"code\": \"normal\",\r\n \"display\": \"Normal Range\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n ],\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"FILL\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://diz.mii.de/fhir/core/NamingSystem/test-befund\",\r\n \"value\": \"0987654666\",\r\n \"assigner\": {\r\n \"identifier\": {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/NamingSystem/org-identifier\",\r\n \"value\": \"DIZ-ID\"\r\n }\r\n }\r\n }\r\n ],\r\n \"basedOn\": [\r\n {\r\n \"reference\": \"http://external.fhir.server/ServiceRequest/111\"\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0074\",\r\n \"code\": \"LAB\"\r\n },\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"26436-6\",\r\n \"display\": \"Laboratory studies\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"11502-2\",\r\n \"display\": \"Laboratory report\"\r\n }\r\n ]\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2018-11-20T12:05:00+01:00\",\r\n \"issued\": \"2018-03-11T10:28:00+01:00\",\r\n \"result\": [\r\n {\r\n \"reference\": \"#obs-1\"\r\n }\r\n ]\r\n}", + "raw": "{\r\n \"resourceType\": \"DiagnosticReport\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/DiagnosticReportLab\"\r\n ],\r\n \"source\": \"http://www.highmed.org\"\r\n },\r\n \"contained\": [\r\n {\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"obs-1\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ObservationLab\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://diz.mii.de/fhir/core/NamingSystem/test-lab-results\",\r\n \"value\": \"59826-8_1234567890\",\r\n \"assigner\": {\r\n \"identifier\": {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/NamingSystem/org-identifier\",\r\n \"value\": \"DIZ-ID\"\r\n }\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"26436-6\"\r\n },\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"laboratory\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"732-8\",\r\n \"display\": \"Lymphocytes [#/volume] in Blood by Manual count\"\r\n }\r\n ],\r\n \"text\": \"Kreatinin\"\r\n },\r\n \"subject\": {\r\n \"reference\": \"urn:uuid:07f602e0-579e-4fe3-95af-381728bf0d49\"\r\n },\r\n \"encounter\": {\r\n \"reference\": \"http://external.fhir.server/Encounter/555\"\r\n },\r\n \"effectiveDateTime\": \"2018-11-20T12:05:00+01:00\",\r\n \"issued\": \"2018-03-11T10:28:00+01:00\",\r\n \"performer\": [\r\n {\r\n \"reference\": \"http://external.fhir.server/Organization/7772\",\r\n \"display\": \"Zentrallabor des IKCL\"\r\n }\r\n ],\r\n \"valueQuantity\": {\r\n \"value\": 72,\r\n \"unit\": \"µmol/l\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"umol/L\"\r\n },\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"N\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"referenceRange\": [\r\n {\r\n \"low\": {\r\n \"value\": 72\r\n },\r\n \"high\": {\r\n \"value\": 127\r\n },\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/referencerange-meaning\",\r\n \"code\": \"normal\",\r\n \"display\": \"Normal Range\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n ],\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"FILL\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://diz.mii.de/fhir/core/NamingSystem/test-befund\",\r\n \"value\": \"0987654666\",\r\n \"assigner\": {\r\n \"identifier\": {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/NamingSystem/org-identifier\",\r\n \"value\": \"DIZ-ID\"\r\n }\r\n }\r\n }\r\n ],\r\n \"basedOn\": [\r\n {\r\n \"reference\": \"http://external.fhir.server/ServiceRequest/111\"\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0074\",\r\n \"code\": \"LAB\"\r\n },\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"26436-6\",\r\n \"display\": \"Laboratory studies\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"11502-2\",\r\n \"display\": \"Laboratory report\"\r\n }\r\n ]\r\n },\r\n \"subject\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\",\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2018-11-20T12:05:00+01:00\",\r\n \"issued\": \"2018-03-11T10:28:00+01:00\",\r\n \"result\": [\r\n {\r\n \"reference\": \"#obs-1\"\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" @@ -870,7 +876,51 @@ "response": [] }, { - "name": "Find DiagnosticReport: read", + "name": "Provide Diagnostic Report - update", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"DiagnosticReport\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/DiagnosticReportLab\"\r\n ],\r\n \"source\": \"http://www.highmed.org\"\r\n },\r\n \"contained\": [\r\n {\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"obs-1\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ObservationLab\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://diz.mii.de/fhir/core/NamingSystem/test-lab-results\",\r\n \"value\": \"59826-8_1234567890\",\r\n \"assigner\": {\r\n \"identifier\": {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/NamingSystem/org-identifier\",\r\n \"value\": \"DIZ-ID\"\r\n }\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"26436-6\"\r\n },\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"laboratory\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"732-8\",\r\n \"display\": \"Lymphocytes [#/volume] in Blood by Manual count\"\r\n }\r\n ],\r\n \"text\": \"Kreatinin\"\r\n },\r\n \"subject\": {\r\n \"reference\": \"urn:uuid:07f602e0-579e-4fe3-95af-381728bf0d49\"\r\n },\r\n \"encounter\": {\r\n \"reference\": \"http://external.fhir.server/Encounter/555\"\r\n },\r\n \"effectiveDateTime\": \"2018-11-20T12:05:00+01:00\",\r\n \"issued\": \"2018-03-11T10:28:00+01:00\",\r\n \"performer\": [\r\n {\r\n \"reference\": \"http://external.fhir.server/Organization/7772\",\r\n \"display\": \"Zentrallabor des IKCL\"\r\n }\r\n ],\r\n \"valueQuantity\": {\r\n \"value\": 72,\r\n \"unit\": \"µmol/l\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"umol/L\"\r\n },\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"N\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"referenceRange\": [\r\n {\r\n \"low\": {\r\n \"value\": 72\r\n },\r\n \"high\": {\r\n \"value\": 127\r\n },\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/referencerange-meaning\",\r\n \"code\": \"normal\",\r\n \"display\": \"Normal Range\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n ],\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"FILL\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://diz.mii.de/fhir/core/NamingSystem/test-befund\",\r\n \"value\": \"0987654666\",\r\n \"assigner\": {\r\n \"identifier\": {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/NamingSystem/org-identifier\",\r\n \"value\": \"DIZ-ID\"\r\n }\r\n }\r\n }\r\n ],\r\n \"basedOn\": [\r\n {\r\n \"reference\": \"http://external.fhir.server/ServiceRequest/111\"\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0074\",\r\n \"code\": \"LAB\"\r\n },\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"26436-6\",\r\n \"display\": \"Laboratory studies\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"11502-2\",\r\n \"display\": \"Laboratory report\"\r\n }\r\n ]\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2018-11-20T12:05:00+01:00\",\r\n \"issued\": \"2018-03-11T10:28:00+01:00\",\r\n \"result\": [\r\n {\r\n \"reference\": \"#obs-1\"\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/DiagnosticReport?subject.identifier={{patientId}}", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "DiagnosticReport" + ], + "query": [ + { + "key": "subject.identifier", + "value": "{{patientId}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Find Diagnostic Report - read", "event": [ { "listen": "prerequest", @@ -906,7 +956,7 @@ "response": [] }, { - "name": "Find DiagnosticReport: vread", + "name": "Find Diagnostic Report - vread", "event": [ { "listen": "prerequest", @@ -948,7 +998,7 @@ "response": [] }, { - "name": "Find DiagnosticReport: search", + "name": "Find Diagnostic Report - search", "event": [ { "listen": "prerequest", @@ -964,7 +1014,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{baseUrl}}/fhir/DiagnosticReport?status=error", + "raw": "{{baseUrl}}/fhir/DiagnosticReport", "host": [ "{{baseUrl}}" ], @@ -1090,7 +1140,8 @@ }, { "key": "status", - "value": "error" + "value": "error", + "disabled": true }, { "key": "subject", @@ -1108,518 +1159,588 @@ "name": "Observation", "item": [ { - "name": "Create BloodGasPannel", - "event": [ + "name": "Profiles", + "item": [ { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-gas-panel\"\r\n ]\r\n },\r\n \"contained\": [\r\n {\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"obs-1\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pH\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\r\n \"value\": \"2744-1_pH\",\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"26436-6\"\r\n },\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"laboratory\"\r\n },\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"18767-4\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"2744-1\",\r\n \"display\": \"pH of Arterial blood\"\r\n }\r\n ],\r\n \"text\": \"pH of Arterial blood\"\r\n },\r\n \"subject\": {\r\n \"reference\": \"Patient/c786ac3c-0579-4aa2-adda-db784b214ad6\"\r\n },\r\n \"effectiveDateTime\": \"2020-09-21\",\r\n \"valueQuantity\": {\r\n \"value\": 7.4,\r\n \"unit\": \"pH\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"[pH]\"\r\n }\r\n }\r\n ],\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\r\n \"value\": \"24336-0_gasPanelBldA\",\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"26436-6\"\r\n },\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"laboratory\"\r\n },\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"18767-4\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"24336-0\",\r\n \"display\": \"Gas panel - Arterial blood\"\r\n }\r\n ],\r\n \"text\": \"Gas panel - Arterial blood\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-09-21\",\r\n \"hasMember\": [\r\n {\r\n \"reference\": \"#obs-1\"\r\n }\r\n ]\r\n}", - "options": { - "raw": { - "language": "json" + "name": "Create BloodGasPannel", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } } - } - }, - "url": { - "raw": "{{baseUrl}}/fhir/Observation", - "host": [ - "{{baseUrl}}" ], - "path": [ - "fhir", - "Observation" - ] - } - }, - "response": [] - }, - { - "name": "Create BloodPressure", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-pressure\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"system\": \"urn:ietf:rfc:3986\",\r\n \"value\": \"urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281\"\r\n }\r\n ],\r\n \"basedOn\": [\r\n {\r\n \"identifier\": {\r\n \"system\": \"https://acme.org/identifiers\",\r\n \"value\": \"1234\"\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\",\r\n \"display\": \"Vital Signs\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"85354-9\",\r\n \"display\": \"Blood pressure panel with all children optional\"\r\n }\r\n ],\r\n \"text\": \"Blood pressure systolic & diastolic\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2012-09-17\",\r\n \"performer\": [\r\n {\r\n \"reference\": \"http://external.fhir.server/Practitioner/example\"\r\n }\r\n ],\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"L\",\r\n \"display\": \"low\"\r\n }\r\n ],\r\n \"text\": \"Below low normal\"\r\n }\r\n ],\r\n \"bodySite\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"368209003\",\r\n \"display\": \"Right arm\"\r\n }\r\n ]\r\n },\r\n \"component\": [\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8480-6\",\r\n \"display\": \"Systolic blood pressure\"\r\n },\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"271649006\",\r\n \"display\": \"Systolic blood pressure\"\r\n },\r\n {\r\n \"system\": \"http://acme.org/devices/clinical-codes\",\r\n \"code\": \"bp-s\",\r\n \"display\": \"Systolic Blood pressure\"\r\n }\r\n ]\r\n },\r\n \"valueQuantity\": {\r\n \"value\": 107,\r\n \"unit\": \"mmHg\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"mm[Hg]\"\r\n },\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"N\",\r\n \"display\": \"normal\"\r\n }\r\n ],\r\n \"text\": \"Normal\"\r\n }\r\n ]\r\n },\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8462-4\",\r\n \"display\": \"Diastolic blood pressure\"\r\n }\r\n ]\r\n },\r\n \"valueQuantity\": {\r\n \"value\": 107,\r\n \"unit\": \"mmHg\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"mm[Hg]\"\r\n },\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"L\",\r\n \"display\": \"low\"\r\n }\r\n ],\r\n \"text\": \"Below low normal\"\r\n }\r\n ]\r\n }\r\n ]\r\n}", - "options": { - "raw": { - "language": "json" + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-gas-panel\"\r\n ]\r\n },\r\n \"contained\": [\r\n {\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"obs-1\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pH\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\r\n \"value\": \"2744-1_pH\",\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"26436-6\"\r\n },\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"laboratory\"\r\n },\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"18767-4\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"2744-1\",\r\n \"display\": \"pH of Arterial blood\"\r\n }\r\n ],\r\n \"text\": \"pH of Arterial blood\"\r\n },\r\n \"subject\": {\r\n \"reference\": \"Patient/c786ac3c-0579-4aa2-adda-db784b214ad6\"\r\n },\r\n \"effectiveDateTime\": \"2020-09-21\",\r\n \"valueQuantity\": {\r\n \"value\": 7.4,\r\n \"unit\": \"pH\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"[pH]\"\r\n }\r\n }\r\n ],\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\r\n \"value\": \"24336-0_gasPanelBldA\",\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"26436-6\"\r\n },\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"laboratory\"\r\n },\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"18767-4\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"24336-0\",\r\n \"display\": \"Gas panel - Arterial blood\"\r\n }\r\n ],\r\n \"text\": \"Gas panel - Arterial blood\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-09-21\",\r\n \"hasMember\": [\r\n {\r\n \"reference\": \"#obs-1\"\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Observation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Observation" + ] } - } + }, + "response": [] }, - "url": { - "raw": "{{baseUrl}}/fhir/Observation", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "fhir", - "Observation" - ] - } - }, - "response": [] - }, - { - "name": "Create BodyHeight", - "event": [ { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"23499ea6-d046-4e91-b7ab-d9cf040add72\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/body-height\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/observation-identifiers\",\r\n \"value\": \"8302-2_BodyHeight\",\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8302-2\",\r\n \"display\": \"Body height\"\r\n },\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"50373000\",\r\n \"display\": \"Body height measure (observable entity)\"\r\n }\r\n ],\r\n \"text\": \"Body height\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-10-02\",\r\n \"valueQuantity\": {\r\n \"value\": 1111111111111,\r\n \"unit\": \"centimeter\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"cm\"\r\n }\r\n}", - "options": { - "raw": { - "language": "json" + "name": "Create BloodPressure", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } } - } - }, - "url": { - "raw": "{{baseUrl}}/fhir/Observation", - "host": [ - "{{baseUrl}}" ], - "path": [ - "fhir", - "Observation" - ] - } - }, - "response": [] - }, - { - "name": "Create BodyWeight", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"80ac4908-3637-476d-a416-9ab7ed7474e6\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/body-weight\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/observation-identifiers\",\r\n \"value\": \"29463-7_BodyWeight\",\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"29463-7\",\r\n \"display\": \"Body weight\"\r\n },\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"27113001\",\r\n \"display\": \"Body weight (observable entity)\"\r\n }\r\n ],\r\n \"text\": \"Body weight\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-10-02\",\r\n \"valueQuantity\": {\r\n \"value\": 10000,\r\n \"unit\": \"kilogram\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"kg\"\r\n }\r\n}", - "options": { - "raw": { - "language": "json" + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-pressure\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"system\": \"urn:ietf:rfc:3986\",\r\n \"value\": \"urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281\"\r\n }\r\n ],\r\n \"basedOn\": [\r\n {\r\n \"identifier\": {\r\n \"system\": \"https://acme.org/identifiers\",\r\n \"value\": \"1234\"\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\",\r\n \"display\": \"Vital Signs\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"85354-9\",\r\n \"display\": \"Blood pressure panel with all children optional\"\r\n }\r\n ],\r\n \"text\": \"Blood pressure systolic & diastolic\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2012-09-17\",\r\n \"performer\": [\r\n {\r\n \"reference\": \"http://external.fhir.server/Practitioner/example\"\r\n }\r\n ],\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"L\",\r\n \"display\": \"low\"\r\n }\r\n ],\r\n \"text\": \"Below low normal\"\r\n }\r\n ],\r\n \"bodySite\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"368209003\",\r\n \"display\": \"Right arm\"\r\n }\r\n ]\r\n },\r\n \"component\": [\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8480-6\",\r\n \"display\": \"Systolic blood pressure\"\r\n },\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"271649006\",\r\n \"display\": \"Systolic blood pressure\"\r\n },\r\n {\r\n \"system\": \"http://acme.org/devices/clinical-codes\",\r\n \"code\": \"bp-s\",\r\n \"display\": \"Systolic Blood pressure\"\r\n }\r\n ]\r\n },\r\n \"valueQuantity\": {\r\n \"value\": 107,\r\n \"unit\": \"mmHg\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"mm[Hg]\"\r\n },\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"N\",\r\n \"display\": \"normal\"\r\n }\r\n ],\r\n \"text\": \"Normal\"\r\n }\r\n ]\r\n },\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8462-4\",\r\n \"display\": \"Diastolic blood pressure\"\r\n }\r\n ]\r\n },\r\n \"valueQuantity\": {\r\n \"value\": 107,\r\n \"unit\": \"mmHg\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"mm[Hg]\"\r\n },\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"L\",\r\n \"display\": \"low\"\r\n }\r\n ],\r\n \"text\": \"Below low normal\"\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Observation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Observation" + ] } - } + }, + "response": [] }, - "url": { - "raw": "{{baseUrl}}/fhir/Observation", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "fhir", - "Observation" - ] - } - }, - "response": [] - }, - { - "name": "Create BodyTemp", - "event": [ { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"bodytemp\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"http://hl7.org/fhir/StructureDefinition/bodytemp\"\r\n ]\r\n },\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8310-5\"\r\n }\r\n ]\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-04-30T12:00:00+01:00\",\r\n \"valueQuantity\": {\r\n \"value\": 37.5,\r\n \"unit\": \"Cel\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"Cel\"\r\n }\r\n}", - "options": { - "raw": { - "language": "json" + "name": "Create BodyHeight", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } } - } - }, - "url": { - "raw": "{{baseUrl}}/fhir/Observation", - "host": [ - "{{baseUrl}}" ], - "path": [ - "fhir", - "Observation" - ] - } - }, - "response": [] - }, - { - "name": "Create ClinicalFrailtyScaleScore", - "event": [ + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"23499ea6-d046-4e91-b7ab-d9cf040add72\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/body-height\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/observation-identifiers\",\r\n \"value\": \"8302-2_BodyHeight\",\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8302-2\",\r\n \"display\": \"Body height\"\r\n },\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"50373000\",\r\n \"display\": \"Body height measure (observable entity)\"\r\n }\r\n ],\r\n \"text\": \"Body height\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-10-02\",\r\n \"valueQuantity\": {\r\n \"value\": 1111111111111,\r\n \"unit\": \"centimeter\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"cm\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Observation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Observation" + ] + } + }, + "response": [] + }, { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"4b5cfc04-0d92-47f6-8bd0-be820286db01\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/frailty-score\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/observation-identifiers\",\r\n \"value\": \"763264000_FrailtyScaleScore\",\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"survey\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"763264000\",\r\n \"display\": \"Canadian Study of Health and Aging Clinical Frailty Scale score\"\r\n }\r\n ],\r\n \"text\": \"Frailty Scale Score\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-10-02\",\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/frailty-score\",\r\n \"code\": \"2\",\r\n \"display\": \"Severely Frail\"\r\n }\r\n ]\r\n },\r\n \"method\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"445414007\",\r\n \"display\": \"Canadian Study of Health and Aging clinical frailty scale\"\r\n }\r\n ]\r\n }\r\n}", - "options": { - "raw": { - "language": "json" + "name": "Create BodyWeight", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } } - } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"80ac4908-3637-476d-a416-9ab7ed7474e6\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/body-weight\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/observation-identifiers\",\r\n \"value\": \"29463-7_BodyWeight\",\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"29463-7\",\r\n \"display\": \"Body weight\"\r\n },\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"27113001\",\r\n \"display\": \"Body weight (observable entity)\"\r\n }\r\n ],\r\n \"text\": \"Body weight\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-10-02\",\r\n \"valueQuantity\": {\r\n \"value\": 10000,\r\n \"unit\": \"kilogram\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"kg\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Observation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Observation" + ] + } + }, + "response": [] }, - "url": { - "raw": "{{baseUrl}}/fhir/Observation", - "host": [ - "{{baseUrl}}" + { + "name": "Create BodyTemp", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } ], - "path": [ - "fhir", - "Observation" - ] - } - }, - "response": [] - }, - { - "name": "Create CoronavirusNachweisTest", - "event": [ + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"bodytemp\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"http://hl7.org/fhir/StructureDefinition/bodytemp\"\r\n ]\r\n },\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8310-5\"\r\n }\r\n ]\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-04-30T12:00:00+01:00\",\r\n \"valueQuantity\": {\r\n \"value\": 37.5,\r\n \"unit\": \"Cel\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"Cel\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Observation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Observation" + ] + } + }, + "response": [] + }, { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://charite.infectioncontrol.de/fhir/core/StructureDefinition/CoronavirusNachweisTest\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://diz.mii.de/fhir/core/NamingSystem/test-lab-results\",\r\n \"value\": \"59826-8_1234567890\",\r\n \"assigner\": {\r\n \"identifier\": {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/NamingSystem/org-identifier\",\r\n \"value\": \"DIZ-ID\"\r\n }\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"18725-2\",\r\n \"display\": \"Microbiology studies\"\r\n },\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"laboratory\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"94532-9\"\r\n }\r\n ]\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"encounter\": {\r\n \"reference\": \"http://external.fhir.server/Encounter/555\"\r\n },\r\n \"effectiveDateTime\": \"2018-11-20T12:05:00+01:00\",\r\n \"issued\": \"2018-03-11T10:28:00+01:00\",\r\n \"performer\": [\r\n {\r\n \"reference\": \"http://external.fhir.server/Organization/7772\",\r\n \"display\": \"Zentrallabor des IKCL\"\r\n }\r\n ],\r\n \"referenceRange\": [\r\n {\r\n \"low\": {\r\n \"value\": 72\r\n },\r\n \"high\": {\r\n \"value\": 127\r\n },\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/referencerange-meaning\",\r\n \"code\": \"normal\",\r\n \"display\": \"Normal Range\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n}", - "options": { - "raw": { - "language": "json" + "name": "Create ClinicalFrailtyScaleScore", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } } - } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"4b5cfc04-0d92-47f6-8bd0-be820286db01\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/frailty-score\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/observation-identifiers\",\r\n \"value\": \"763264000_FrailtyScaleScore\",\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"survey\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"763264000\",\r\n \"display\": \"Canadian Study of Health and Aging Clinical Frailty Scale score\"\r\n }\r\n ],\r\n \"text\": \"Frailty Scale Score\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-10-02\",\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/frailty-score\",\r\n \"code\": \"2\",\r\n \"display\": \"Severely Frail\"\r\n }\r\n ]\r\n },\r\n \"method\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"445414007\",\r\n \"display\": \"Canadian Study of Health and Aging clinical frailty scale\"\r\n }\r\n ]\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Observation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Observation" + ] + } + }, + "response": [] }, - "url": { - "raw": "{{baseUrl}}/fhir/Observation", - "host": [ - "{{baseUrl}}" + { + "name": "Create CoronavirusNachweisTest", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } ], - "path": [ - "fhir", - "Observation" - ] - } - }, - "response": [] - }, - { - "name": "Create FIO2", - "event": [ + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://charite.infectioncontrol.de/fhir/core/StructureDefinition/CoronavirusNachweisTest\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://diz.mii.de/fhir/core/NamingSystem/test-lab-results\",\r\n \"value\": \"59826-8_1234567890\",\r\n \"assigner\": {\r\n \"identifier\": {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/NamingSystem/org-identifier\",\r\n \"value\": \"DIZ-ID\"\r\n }\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"18725-2\",\r\n \"display\": \"Microbiology studies\"\r\n },\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"laboratory\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"94532-9\"\r\n }\r\n ]\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"encounter\": {\r\n \"reference\": \"http://external.fhir.server/Encounter/555\"\r\n },\r\n \"effectiveDateTime\": \"2018-11-20T12:05:00+01:00\",\r\n \"issued\": \"2018-03-11T10:28:00+01:00\",\r\n \"performer\": [\r\n {\r\n \"reference\": \"http://external.fhir.server/Organization/7772\",\r\n \"display\": \"Zentrallabor des IKCL\"\r\n }\r\n ],\r\n \"referenceRange\": [\r\n {\r\n \"low\": {\r\n \"value\": 72\r\n },\r\n \"high\": {\r\n \"value\": 127\r\n },\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/referencerange-meaning\",\r\n \"code\": \"normal\",\r\n \"display\": \"Normal Range\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Observation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Observation" + ] + } + }, + "response": [] + }, { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"c9f96dd3-a77a-4aa9-9b12-43cd1972d9a4\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/inhaled-oxygen-concentration\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\r\n \"value\": \"3150-0_FiO2\",\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"26436-6\"\r\n },\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"laboratory\"\r\n },\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"18767-4\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"3150-0\",\r\n \"display\": \"Inhaled oxygen concentration\"\r\n }\r\n ],\r\n \"text\": \"Inhaled oxygen concentration\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-09-21\",\r\n \"valueQuantity\": {\r\n \"value\": 21,\r\n \"unit\": \"%\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"%\"\r\n }\r\n}\r\n", - "options": { - "raw": { - "language": "json" + "name": "Create FIO2", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } } - } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"c9f96dd3-a77a-4aa9-9b12-43cd1972d9a4\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/inhaled-oxygen-concentration\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\r\n \"value\": \"3150-0_FiO2\",\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"26436-6\"\r\n },\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"laboratory\"\r\n },\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"18767-4\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"3150-0\",\r\n \"display\": \"Inhaled oxygen concentration\"\r\n }\r\n ],\r\n \"text\": \"Inhaled oxygen concentration\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-09-21\",\r\n \"valueQuantity\": {\r\n \"value\": 21,\r\n \"unit\": \"%\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"%\"\r\n }\r\n}\r\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Observation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Observation" + ] + } + }, + "response": [] }, - "url": { - "raw": "{{baseUrl}}/fhir/Observation", - "host": [ - "{{baseUrl}}" + { + "name": "Create HeartRate", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } ], - "path": [ - "fhir", - "Observation" - ] - } - }, - "response": [] - }, - { - "name": "Create HeartRate", - "event": [ + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"heart-rate\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"http://hl7.org/fhir/StructureDefinition/heartrate\"\r\n ]\r\n },\r\n \"text\": {\r\n \"status\": \"generated\",\r\n \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: heart-rate</p><p><b>meta</b>: </p><p><b>status</b>: final</p><p><b>category</b>: Vital Signs <span>(Details : {http://terminology.hl7.org/CodeSystem/observation-category code 'vital-signs' = 'Vital Signs', given as 'Vital Signs'})</span></p><p><b>code</b>: Heart rate <span>(Details : {LOINC code '8867-4' = 'Heart rate', given as 'Heart rate'})</span></p><p><b>subject</b>: <a>urn:uuid:07f602e0-579e-4fe3-95af-381728bf0d49</a></p><p><b>effective</b>: 02/07/1999</p><p><b>value</b>: 44 beats/minute<span> (Details: UCUM code /min = '/min')</span></p></div>\"\r\n },\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\",\r\n \"display\": \"Vital Signs\"\r\n }\r\n ],\r\n \"text\": \"Vital Signs\"\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8867-4\",\r\n \"display\": \"Heart rate\"\r\n }\r\n ],\r\n \"text\": \"Heart rate\"\r\n },\r\n \"subject\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\"\r\n },\r\n \"effectiveDateTime\": \"1999-07-02\",\r\n \"valueQuantity\": {\r\n \"value\": 44,\r\n \"unit\": \"beats/minute\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"/min\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Observation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Observation" + ] + } + }, + "response": [] + }, { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"heart-rate\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"http://hl7.org/fhir/StructureDefinition/heartrate\"\r\n ]\r\n },\r\n \"text\": {\r\n \"status\": \"generated\",\r\n \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: heart-rate</p><p><b>meta</b>: </p><p><b>status</b>: final</p><p><b>category</b>: Vital Signs <span>(Details : {http://terminology.hl7.org/CodeSystem/observation-category code 'vital-signs' = 'Vital Signs', given as 'Vital Signs'})</span></p><p><b>code</b>: Heart rate <span>(Details : {LOINC code '8867-4' = 'Heart rate', given as 'Heart rate'})</span></p><p><b>subject</b>: <a>urn:uuid:07f602e0-579e-4fe3-95af-381728bf0d49</a></p><p><b>effective</b>: 02/07/1999</p><p><b>value</b>: 44 beats/minute<span> (Details: UCUM code /min = '/min')</span></p></div>\"\r\n },\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\",\r\n \"display\": \"Vital Signs\"\r\n }\r\n ],\r\n \"text\": \"Vital Signs\"\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8867-4\",\r\n \"display\": \"Heart rate\"\r\n }\r\n ],\r\n \"text\": \"Heart rate\"\r\n },\r\n \"subject\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\"\r\n },\r\n \"effectiveDateTime\": \"1999-07-02\",\r\n \"valueQuantity\": {\r\n \"value\": 44,\r\n \"unit\": \"beats/minute\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"/min\"\r\n }\r\n}", - "options": { - "raw": { - "language": "json" + "name": "Create ObservationLab", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } } - } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ObservationLab\"\r\n ],\r\n \"source\": \"http://www.highmed.org\"\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://diz.mii.de/fhir/core/NamingSystem/test-lab-results\",\r\n \"value\": \"59826-8_1234567890\",\r\n \"assigner\": {\r\n \"identifier\": {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/NamingSystem/org-identifier\",\r\n \"value\": \"DIZ-ID\"\r\n }\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"26436-6\"\r\n },\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"laboratory\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"732-8\",\r\n \"display\": \"Lymphocytes [#/volume] in Blood by Manual count\"\r\n }\r\n ],\r\n \"text\": \"Kreatinin\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"encounter\": {\r\n \"reference\": \"http://external.fhir.server/Encounter/555\"\r\n },\r\n \"effectiveDateTime\": \"2018-11-20T12:05:00+01:00\",\r\n \"issued\": \"2018-03-11T10:28:00+01:00\",\r\n \"performer\": [\r\n {\r\n \"reference\": \"http://external.fhir.server/Organization/7772\",\r\n \"display\": \"Zentrallabor des IKCL\"\r\n }\r\n ],\r\n \"valueQuantity\": {\r\n \"value\": 72,\r\n \"unit\": \"µmol/l\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"umol/L\"\r\n },\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"N\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"referenceRange\": [\r\n {\r\n \"low\": {\r\n \"value\": 72\r\n },\r\n \"high\": {\r\n \"value\": 127\r\n },\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/referencerange-meaning\",\r\n \"code\": \"normal\",\r\n \"display\": \"Normal Range\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Observation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Observation" + ] + } + }, + "response": [] }, - "url": { - "raw": "{{baseUrl}}/fhir/Observation", - "host": [ - "{{baseUrl}}" + { + "name": "Create RespiratoryRate", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } ], - "path": [ - "fhir", - "Observation" - ] - } - }, - "response": [] - }, - { - "name": "Create ObservationLab", - "event": [ + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"a0897b04-2e57-43a7-9372-3c1f6a2fef1c\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/respiratory-rate\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/observation-identifiers\",\r\n \"value\": \"9279-1_RespiratoryRate\",\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"9279-1\",\r\n \"display\": \"Respiratory rate\"\r\n },\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"86290005\",\r\n \"display\": \"Respiratory rate (observable entity)\"\r\n }\r\n ],\r\n \"text\": \"Respiratory rate\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-09-25\",\r\n \"valueQuantity\": {\r\n \"value\": 22,\r\n \"unit\": \"per minute\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"/min\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Observation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Observation" + ] + } + }, + "response": [] + }, { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ObservationLab\"\r\n ],\r\n \"source\": \"http://www.highmed.org\"\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://diz.mii.de/fhir/core/NamingSystem/test-lab-results\",\r\n \"value\": \"59826-8_1234567890\",\r\n \"assigner\": {\r\n \"identifier\": {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/NamingSystem/org-identifier\",\r\n \"value\": \"DIZ-ID\"\r\n }\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"26436-6\"\r\n },\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"laboratory\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"732-8\",\r\n \"display\": \"Lymphocytes [#/volume] in Blood by Manual count\"\r\n }\r\n ],\r\n \"text\": \"Kreatinin\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"encounter\": {\r\n \"reference\": \"http://external.fhir.server/Encounter/555\"\r\n },\r\n \"effectiveDateTime\": \"2018-11-20T12:05:00+01:00\",\r\n \"issued\": \"2018-03-11T10:28:00+01:00\",\r\n \"performer\": [\r\n {\r\n \"reference\": \"http://external.fhir.server/Organization/7772\",\r\n \"display\": \"Zentrallabor des IKCL\"\r\n }\r\n ],\r\n \"valueQuantity\": {\r\n \"value\": 72,\r\n \"unit\": \"µmol/l\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"umol/L\"\r\n },\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"N\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"referenceRange\": [\r\n {\r\n \"low\": {\r\n \"value\": 72\r\n },\r\n \"high\": {\r\n \"value\": 127\r\n },\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/referencerange-meaning\",\r\n \"code\": \"normal\",\r\n \"display\": \"Normal Range\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n}", - "options": { - "raw": { - "language": "json" + "name": "Create PatientInIcu", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } } - } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"cefe30c3-7597-421a-8509-8c15aa2a2d87\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/patient-in-icu\"\r\n ]\r\n },\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"code\": \"survey\",\r\n \"display\": \"Survey\",\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"01\",\r\n \"display\": \"Is the patient in the intensive care unit?\",\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes\"\r\n }\r\n ]\r\n },\r\n \"effectiveDateTime\": \"2020-10-14\",\r\n \"status\": \"final\",\r\n \"subject\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\",\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"373067005\",\r\n \"display\": \"No (qualifier value)\",\r\n \"system\": \"http://snomed.info/sct\"\r\n }\r\n ]\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Observation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Observation" + ] + } + }, + "response": [] }, - "url": { - "raw": "{{baseUrl}}/fhir/Observation", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "fhir", - "Observation" - ] - } - }, - "response": [] - }, - { - "name": "Create PatientInIcu", - "event": [ { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"cefe30c3-7597-421a-8509-8c15aa2a2d87\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/patient-in-icu\"\r\n ]\r\n },\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"code\": \"survey\",\r\n \"display\": \"Survey\",\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"01\",\r\n \"display\": \"Is the patient in the intensive care unit?\",\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes\"\r\n }\r\n ]\r\n },\r\n \"effectiveDateTime\": \"2020-10-14\",\r\n \"status\": \"final\",\r\n \"subject\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\",\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"373067005\",\r\n \"display\": \"No (qualifier value)\",\r\n \"system\": \"http://snomed.info/sct\"\r\n }\r\n ]\r\n }\r\n}", - "options": { - "raw": { - "language": "json" + "name": "Create PregnancyStatus", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } } - } - }, - "url": { - "raw": "{{baseUrl}}/fhir/Observation", - "host": [ - "{{baseUrl}}" ], - "path": [ - "fhir", - "Observation" - ] - } - }, - "response": [] - }, - { - "name": "Create PregnancyStatus", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"pregnancy-status\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pregnancy-status\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"system\": \"urn:ietf:rfc:3986\",\r\n \"value\": \"urn:uuid:187e0c12-8dd2-67e2-1234-bf273c878281\"\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"survey\",\r\n \"display\": \"Survey\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"82810-3\",\r\n \"display\": \"Pregnancy status\"\r\n }\r\n ],\r\n \"text\": \"Pregnancy status\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2012-09-17\",\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA26683-5\",\r\n \"display\": \"Not pregnant\"\r\n }\r\n ],\r\n \"text\": \"Not pregnant\"\r\n },\r\n \"performer\": [\r\n {\r\n \"reference\": \"http://external.fhir.server/Practitioner/f201\"\r\n }\r\n ]\r\n}\r\n", - "options": { - "raw": { - "language": "json" + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"pregnancy-status\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pregnancy-status\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"system\": \"urn:ietf:rfc:3986\",\r\n \"value\": \"urn:uuid:187e0c12-8dd2-67e2-1234-bf273c878281\"\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"survey\",\r\n \"display\": \"Survey\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"82810-3\",\r\n \"display\": \"Pregnancy status\"\r\n }\r\n ],\r\n \"text\": \"Pregnancy status\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2012-09-17\",\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA26683-5\",\r\n \"display\": \"Not pregnant\"\r\n }\r\n ],\r\n \"text\": \"Not pregnant\"\r\n },\r\n \"performer\": [\r\n {\r\n \"reference\": \"http://external.fhir.server/Practitioner/f201\"\r\n }\r\n ]\r\n}\r\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Observation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Observation" + ] } - } + }, + "response": [] }, - "url": { - "raw": "{{baseUrl}}/fhir/Observation", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "fhir", - "Observation" - ] - } - }, - "response": [] - }, - { - "name": "Create RespiratoryRate", - "event": [ { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"id\": \"a0897b04-2e57-43a7-9372-3c1f6a2fef1c\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/respiratory-rate\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/observation-identifiers\",\r\n \"value\": \"9279-1_RespiratoryRate\",\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"9279-1\",\r\n \"display\": \"Respiratory rate\"\r\n },\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"86290005\",\r\n \"display\": \"Respiratory rate (observable entity)\"\r\n }\r\n ],\r\n \"text\": \"Respiratory rate\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-09-25\",\r\n \"valueQuantity\": {\r\n \"value\": 22,\r\n \"unit\": \"per minute\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"/min\"\r\n }\r\n}", - "options": { - "raw": { - "language": "json" + "name": "Create SmokingStatus", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } } - } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/smoking-status\"\r\n ]\r\n },\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"social-history\",\r\n \"display\": \"Social History\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"72166-2\",\r\n \"display\": \"Tobacco smoking status\"\r\n }\r\n ]\r\n },\r\n \"subject\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\"\r\n },\r\n \"effectiveDateTime\": \"2020-09-21\",\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA18978-9\",\r\n \"display\": \"Never smoker\"\r\n }\r\n ],\r\n \"text\": \"Patient is nonsmoker\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Observation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Observation" + ] + } + }, + "response": [] }, - "url": { - "raw": "{{baseUrl}}/fhir/Observation", - "host": [ - "{{baseUrl}}" + { + "name": "Create SofaScore", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } ], - "path": [ - "fhir", - "Observation" - ] + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"status\": \"final\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sofa-score\"\r\n ]\r\n },\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"survey\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes\",\r\n \"code\": \"06\",\r\n \"display\": \"SOFA-Score\"\r\n }\r\n ],\r\n \"text\": \"Sepsis-related organ failure assessment score\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-09-16\",\r\n \"component\": [\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"resp\",\r\n \"display\": \"Respiratory system\"\r\n }\r\n ],\r\n \"text\": \"SOFA Respiratory system scoring category\"\r\n },\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"resp3\",\r\n \"display\": \"Respiratory system SOFA score 3\"\r\n }\r\n ],\r\n \"text\": \"PaO2/FiO2 [mmHg (kPa)] < 200 (26.7) and mechanically ventilated\"\r\n }\r\n },\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"ns\",\r\n \"display\": \"Nervous system\"\r\n }\r\n ],\r\n \"text\": \"SOFA Nervous system scoring category\"\r\n },\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"ns4\",\r\n \"display\": \"Nervous system SOFA score 4\"\r\n }\r\n ],\r\n \"text\": \"Glasgow Coma Scale (GCS) < 6\"\r\n }\r\n },\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"cvs\",\r\n \"display\": \"Cardiovascular system\"\r\n }\r\n ],\r\n \"text\": \"SOFA Cardiovascular system scoring category\"\r\n },\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"cvs0\",\r\n \"display\": \"Cardiovascular system SOFA score 0\"\r\n }\r\n ],\r\n \"text\": \"Mean arterial pressure (MAP) ≥ 70 mmHg\"\r\n }\r\n },\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"liv\",\r\n \"display\": \"Liver\"\r\n }\r\n ],\r\n \"text\": \"SOFA Liver scoring category\"\r\n },\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"liv1\",\r\n \"display\": \"Liver SOFA score 1\"\r\n }\r\n ],\r\n \"text\": \"Bilirubin (mg/dl) [umol/L] 1.2-1.9 [20-32]\"\r\n }\r\n },\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"coa\",\r\n \"display\": \"Coagulation\"\r\n }\r\n ],\r\n \"text\": \"SOFA Coagulation scoring category\"\r\n },\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"coa2\",\r\n \"display\": \"Coagulation SOFA score 2\"\r\n }\r\n ],\r\n \"text\": \"Platelets×10^3/ul < 100\"\r\n }\r\n },\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"kid\",\r\n \"display\": \"Kidneys\"\r\n }\r\n ],\r\n \"text\": \"SOFA Kidneys scoring category\"\r\n },\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"kid4\",\r\n \"display\": \"Kidneys SOFA score 4\"\r\n }\r\n ],\r\n \"text\": \"Creatinine (mg/dl) [umol/L] (or urine output) > 5.0 [> 440] (or < 200 ml/d)\"\r\n }\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Observation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Observation" + ] + } + }, + "response": [] } - }, - "response": [] + ] }, { - "name": "Create SmokingStatus", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript" - } - } - ], + "name": "Provide Observation - create", "request": { "method": "POST", "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/smoking-status\"\r\n ]\r\n },\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"social-history\",\r\n \"display\": \"Social History\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"72166-2\",\r\n \"display\": \"Tobacco smoking status\"\r\n }\r\n ]\r\n },\r\n \"subject\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\"\r\n },\r\n \"effectiveDateTime\": \"2020-09-21\",\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA18978-9\",\r\n \"display\": \"Never smoker\"\r\n }\r\n ],\r\n \"text\": \"Patient is nonsmoker\"\r\n }\r\n}", + "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-pressure\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"system\": \"urn:ietf:rfc:3986\",\r\n \"value\": \"urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281\"\r\n }\r\n ],\r\n \"basedOn\": [\r\n {\r\n \"identifier\": {\r\n \"system\": \"https://acme.org/identifiers\",\r\n \"value\": \"1234\"\r\n }\r\n }\r\n ],\r\n \"status\": \"unknown\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\",\r\n \"display\": \"Vital Signs\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"85354-9\",\r\n \"display\": \"Blood pressure panel with all children optional\"\r\n }\r\n ],\r\n \"text\": \"Blood pressure systolic & diastolic\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"07f602e0-579e-4fe3-95af-381728bf0d49\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2012-09-17\",\r\n \"performer\": [\r\n {\r\n \"reference\": \"http://external.fhir.server/Practitioner/example\"\r\n }\r\n ],\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"L\",\r\n \"display\": \"low\"\r\n }\r\n ],\r\n \"text\": \"Below low normal\"\r\n }\r\n ],\r\n \"bodySite\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"368209003\",\r\n \"display\": \"Right arm\"\r\n }\r\n ]\r\n },\r\n \"component\": [\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8480-6\",\r\n \"display\": \"Systolic blood pressure\"\r\n },\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"271649006\",\r\n \"display\": \"Systolic blood pressure\"\r\n },\r\n {\r\n \"system\": \"http://acme.org/devices/clinical-codes\",\r\n \"code\": \"bp-s\",\r\n \"display\": \"Systolic Blood pressure\"\r\n }\r\n ]\r\n },\r\n \"valueQuantity\": {\r\n \"value\": 107,\r\n \"unit\": \"mmHg\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"mm[Hg]\"\r\n },\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"N\",\r\n \"display\": \"normal\"\r\n }\r\n ],\r\n \"text\": \"Normal\"\r\n }\r\n ]\r\n },\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8462-4\",\r\n \"display\": \"Diastolic blood pressure\"\r\n }\r\n ]\r\n },\r\n \"valueQuantity\": {\r\n \"value\": 107,\r\n \"unit\": \"mmHg\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"mm[Hg]\"\r\n },\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"L\",\r\n \"display\": \"low\"\r\n }\r\n ],\r\n \"text\": \"Below low normal\"\r\n }\r\n ]\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" @@ -1640,24 +1761,13 @@ "response": [] }, { - "name": "Create SofaScore", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript" - } - } - ], + "name": "Provide Observation - update", "request": { - "method": "POST", + "method": "PUT", "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"status\": \"final\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sofa-score\"\r\n ]\r\n },\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"survey\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes\",\r\n \"code\": \"06\",\r\n \"display\": \"SOFA-Score\"\r\n }\r\n ],\r\n \"text\": \"Sepsis-related organ failure assessment score\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-09-16\",\r\n \"component\": [\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"resp\",\r\n \"display\": \"Respiratory system\"\r\n }\r\n ],\r\n \"text\": \"SOFA Respiratory system scoring category\"\r\n },\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"resp3\",\r\n \"display\": \"Respiratory system SOFA score 3\"\r\n }\r\n ],\r\n \"text\": \"PaO2/FiO2 [mmHg (kPa)] < 200 (26.7) and mechanically ventilated\"\r\n }\r\n },\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"ns\",\r\n \"display\": \"Nervous system\"\r\n }\r\n ],\r\n \"text\": \"SOFA Nervous system scoring category\"\r\n },\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"ns4\",\r\n \"display\": \"Nervous system SOFA score 4\"\r\n }\r\n ],\r\n \"text\": \"Glasgow Coma Scale (GCS) < 6\"\r\n }\r\n },\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"cvs\",\r\n \"display\": \"Cardiovascular system\"\r\n }\r\n ],\r\n \"text\": \"SOFA Cardiovascular system scoring category\"\r\n },\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"cvs0\",\r\n \"display\": \"Cardiovascular system SOFA score 0\"\r\n }\r\n ],\r\n \"text\": \"Mean arterial pressure (MAP) ≥ 70 mmHg\"\r\n }\r\n },\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"liv\",\r\n \"display\": \"Liver\"\r\n }\r\n ],\r\n \"text\": \"SOFA Liver scoring category\"\r\n },\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"liv1\",\r\n \"display\": \"Liver SOFA score 1\"\r\n }\r\n ],\r\n \"text\": \"Bilirubin (mg/dl) [umol/L] 1.2-1.9 [20-32]\"\r\n }\r\n },\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"coa\",\r\n \"display\": \"Coagulation\"\r\n }\r\n ],\r\n \"text\": \"SOFA Coagulation scoring category\"\r\n },\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"coa2\",\r\n \"display\": \"Coagulation SOFA score 2\"\r\n }\r\n ],\r\n \"text\": \"Platelets×10^3/ul < 100\"\r\n }\r\n },\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"kid\",\r\n \"display\": \"Kidneys\"\r\n }\r\n ],\r\n \"text\": \"SOFA Kidneys scoring category\"\r\n },\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/sofa-score\",\r\n \"code\": \"kid4\",\r\n \"display\": \"Kidneys SOFA score 4\"\r\n }\r\n ],\r\n \"text\": \"Creatinine (mg/dl) [umol/L] (or urine output) > 5.0 [> 440] (or < 200 ml/d)\"\r\n }\r\n }\r\n ]\r\n}", + "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-pressure\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"system\": \"urn:ietf:rfc:3986\",\r\n \"value\": \"urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281\"\r\n }\r\n ],\r\n \"basedOn\": [\r\n {\r\n \"identifier\": {\r\n \"system\": \"https://acme.org/identifiers\",\r\n \"value\": \"1234\"\r\n }\r\n }\r\n ],\r\n \"status\": \"unknown\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\",\r\n \"display\": \"Vital Signs\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"85354-9\",\r\n \"display\": \"Blood pressure panel with all children optional\"\r\n }\r\n ],\r\n \"text\": \"Blood pressure systolic & diastolic\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"07f602e0-579e-4fe3-95af-381728bf0d49\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2012-09-17\",\r\n \"performer\": [\r\n {\r\n \"reference\": \"http://external.fhir.server/Practitioner/example\"\r\n }\r\n ],\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"L\",\r\n \"display\": \"low\"\r\n }\r\n ],\r\n \"text\": \"Below low normal\"\r\n }\r\n ],\r\n \"bodySite\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"368209003\",\r\n \"display\": \"Right arm\"\r\n }\r\n ]\r\n },\r\n \"component\": [\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8480-6\",\r\n \"display\": \"Systolic blood pressure\"\r\n },\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"271649006\",\r\n \"display\": \"Systolic blood pressure\"\r\n },\r\n {\r\n \"system\": \"http://acme.org/devices/clinical-codes\",\r\n \"code\": \"bp-s\",\r\n \"display\": \"Systolic Blood pressure\"\r\n }\r\n ]\r\n },\r\n \"valueQuantity\": {\r\n \"value\": 107,\r\n \"unit\": \"mmHg\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"mm[Hg]\"\r\n },\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"N\",\r\n \"display\": \"normal\"\r\n }\r\n ],\r\n \"text\": \"Normal\"\r\n }\r\n ]\r\n },\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8462-4\",\r\n \"display\": \"Diastolic blood pressure\"\r\n }\r\n ]\r\n },\r\n \"valueQuantity\": {\r\n \"value\": 107,\r\n \"unit\": \"mmHg\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"mm[Hg]\"\r\n },\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"L\",\r\n \"display\": \"low\"\r\n }\r\n ],\r\n \"text\": \"Below low normal\"\r\n }\r\n ]\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" @@ -1678,7 +1788,7 @@ "response": [] }, { - "name": "Find Observation: read", + "name": "Find Observation - read", "event": [ { "listen": "prerequest", @@ -1714,7 +1824,7 @@ "response": [] }, { - "name": "Find Observation: vread", + "name": "Find Observation - vread", "event": [ { "listen": "prerequest", @@ -1756,7 +1866,7 @@ "response": [] }, { - "name": "Find Observation: search", + "name": "Find Observation - search", "event": [ { "listen": "prerequest", @@ -2020,33 +2130,6 @@ } }, "response": [] - }, - { - "name": "Provide Observation - PUT", - "request": { - "method": "PUT", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-pressure\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"system\": \"urn:ietf:rfc:3986\",\r\n \"value\": \"urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281\"\r\n }\r\n ],\r\n \"basedOn\": [\r\n {\r\n \"identifier\": {\r\n \"system\": \"https://acme.org/identifiers\",\r\n \"value\": \"1234\"\r\n }\r\n }\r\n ],\r\n \"status\": \"unknown\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\",\r\n \"display\": \"Vital Signs\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"85354-9\",\r\n \"display\": \"Blood pressure panel with all children optional\"\r\n }\r\n ],\r\n \"text\": \"Blood pressure systolic & diastolic\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"07f602e0-579e-4fe3-95af-381728bf0d49\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2012-09-17\",\r\n \"performer\": [\r\n {\r\n \"reference\": \"http://external.fhir.server/Practitioner/example\"\r\n }\r\n ],\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"L\",\r\n \"display\": \"low\"\r\n }\r\n ],\r\n \"text\": \"Below low normal\"\r\n }\r\n ],\r\n \"bodySite\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"368209003\",\r\n \"display\": \"Right arm\"\r\n }\r\n ]\r\n },\r\n \"component\": [\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8480-6\",\r\n \"display\": \"Systolic blood pressure\"\r\n },\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"271649006\",\r\n \"display\": \"Systolic blood pressure\"\r\n },\r\n {\r\n \"system\": \"http://acme.org/devices/clinical-codes\",\r\n \"code\": \"bp-s\",\r\n \"display\": \"Systolic Blood pressure\"\r\n }\r\n ]\r\n },\r\n \"valueQuantity\": {\r\n \"value\": 107,\r\n \"unit\": \"mmHg\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"mm[Hg]\"\r\n },\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"N\",\r\n \"display\": \"normal\"\r\n }\r\n ],\r\n \"text\": \"Normal\"\r\n }\r\n ]\r\n },\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8462-4\",\r\n \"display\": \"Diastolic blood pressure\"\r\n }\r\n ]\r\n },\r\n \"valueQuantity\": {\r\n \"value\": 107,\r\n \"unit\": \"mmHg\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"mm[Hg]\"\r\n },\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"L\",\r\n \"display\": \"low\"\r\n }\r\n ],\r\n \"text\": \"Below low normal\"\r\n }\r\n ]\r\n }\r\n ]\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/fhir/Observation", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "fhir", - "Observation" - ] - } - }, - "response": [] } ] }, diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentTransactionIT.java index dc796d1db..993f3f183 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentTransactionIT.java @@ -47,7 +47,7 @@ void findConsentSearch() throws IOException { create("Consent/transactions/find-consent-search.json"); create("Consent/transactions/find-consent-search.json"); - Bundle bundle = search("Consent?subject.identifier=" + PATIENT_ID + "&status=rejected"); + Bundle bundle = search("Consent?patient.identifier=" + PATIENT_ID + "&status=rejected"); Assertions.assertEquals(3, bundle.getTotal()); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/FindDiagnosticReportTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/FindDiagnosticReportTransactionIT.java new file mode 100644 index 000000000..90749dfc8 --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/FindDiagnosticReportTransactionIT.java @@ -0,0 +1,57 @@ +package org.ehrbase.fhirbridge.fhir.diagnosticreport; + +import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.DiagnosticReport; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import java.io.IOException; + +/** + * Integration Tests that validate "Find DiagnosticReport" transaction. + */ +class FindDiagnosticReportTransactionIT extends AbstractTransactionIT { + + @Test + void findDiagnosticReportRead() throws Exception { + var outcome = create("DiagnosticReport/transactions/provide-diagnostic-report-create.json"); + var id = outcome.getId(); + + var diagnosticReport = read(id.getIdPart(), DiagnosticReport.class); + + Assertions.assertNotNull(diagnosticReport); + Assertions.assertNotNull(diagnosticReport.getId(), id.getIdPart()); + Assertions.assertEquals(PATIENT_ID, diagnosticReport.getSubject().getIdentifier().getValue()); + } + + @Test + void findDiagnosticReportVRead() throws Exception { + var outcome = create("DiagnosticReport/transactions/provide-diagnostic-report-create.json"); + var id = outcome.getId(); + + var diagnosticReport = vread(id.getIdPart(), id.getVersionIdPart(), DiagnosticReport.class); + Assertions.assertNotNull(diagnosticReport); + Assertions.assertNotNull(diagnosticReport.getId(), id.getIdPart()); + Assertions.assertNotNull(diagnosticReport.getMeta().getVersionId(), id.getVersionIdPart()); + Assertions.assertEquals(PATIENT_ID, diagnosticReport.getSubject().getIdentifier().getValue()); + } + + @Test + void findDiagnosticReportSearch() throws IOException { + create("DiagnosticReport/transactions/find-diagnostic-report-search.json"); + create("DiagnosticReport/transactions/find-diagnostic-report-search.json"); + create("DiagnosticReport/transactions/find-diagnostic-report-search.json"); + + Bundle bundle = search("DiagnosticReport?subject.identifier=" + PATIENT_ID + "&status=registered"); + + Assertions.assertEquals(3, bundle.getTotal()); + + bundle.getEntry().forEach(entry -> { + var diagnosticReport = (DiagnosticReport) entry.getResource(); + + Assertions.assertEquals(PATIENT_ID, diagnosticReport.getSubject().getIdentifier().getValue()); + Assertions.assertEquals(DiagnosticReport.DiagnosticReportStatus.REGISTERED, diagnosticReport.getStatus()); + }); + } +} diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportTransactionIT.java new file mode 100644 index 000000000..3fe401029 --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportTransactionIT.java @@ -0,0 +1,40 @@ +package org.ehrbase.fhirbridge.fhir.diagnosticreport; + +import ca.uhn.fhir.rest.api.MethodOutcome; +import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.r4.model.DiagnosticReport; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +/** + * Integration Tests that validate "Provide DiagnosticReport" transaction. + */ +class ProvideDiagnosticReportTransactionIT extends AbstractTransactionIT { + + @Test + void provideDiagnosticReportCreate() throws Exception { + var outcome = create("DiagnosticReport/transactions/provide-diagnostic-report-create.json"); + + Assertions.assertEquals(true, outcome.getCreated()); + Assertions.assertNotNull(outcome.getId().getValue()); + } + + @Test + void provideDiagnosticReportConditionalUpdate() throws Exception { + MethodOutcome outcome; + + outcome = create("DiagnosticReport/transactions/provide-diagnostic-report-create.json"); + var id = outcome.getId(); + + outcome = update("DiagnosticReport/transactions/provide-diagnostic-report-update.json", "DiagnosticReport?_id=" + id.getIdPart() + "&subject.identifier=" + PATIENT_ID); + + Assertions.assertEquals(id.getIdPart(), outcome.getId().getIdPart()); + Assertions.assertEquals(id.getVersionIdPartAsLong() + 1, outcome.getId().getVersionIdPartAsLong()); + + var diagnosticReport = (DiagnosticReport) outcome.getResource(); + + Assertions.assertEquals(PATIENT_ID, diagnosticReport.getSubject().getIdentifier().getValue()); + Assertions.assertEquals("http://external.fhir.server/ServiceRequest/987", diagnosticReport.getBasedOn().get(0).getReference()); + Assertions.assertEquals(DiagnosticReport.DiagnosticReportStatus.CORRECTED, diagnosticReport.getStatus()); + } +} diff --git a/src/test/resources/DiagnosticReport/transactions/find-diagnostic-report-search.json b/src/test/resources/DiagnosticReport/transactions/find-diagnostic-report-search.json new file mode 100644 index 000000000..c8007650e --- /dev/null +++ b/src/test/resources/DiagnosticReport/transactions/find-diagnostic-report-search.json @@ -0,0 +1,178 @@ +{ + "resourceType": "DiagnosticReport", + "meta": { + "profile": [ + "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/DiagnosticReportLab" + ], + "source": "http://www.highmed.org" + }, + "contained": [ + { + "resourceType": "Observation", + "id": "obs-1", + "meta": { + "profile": [ + "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ObservationLab" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "OBI" + } + ] + }, + "system": "https://diz.mii.de/fhir/core/NamingSystem/test-lab-results", + "value": "59826-8_1234567890", + "assigner": { + "identifier": { + "system": "https://www.medizininformatik-initiative.de/fhir/core/NamingSystem/org-identifier", + "value": "DIZ-ID" + } + } + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://loinc.org", + "code": "26436-6" + }, + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "laboratory" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "732-8", + "display": "Lymphocytes [#/volume] in Blood by Manual count" + } + ], + "text": "Kreatinin" + }, + "subject": { + "reference": "urn:uuid:07f602e0-579e-4fe3-95af-381728bf0d49" + }, + "encounter": { + "reference": "http://external.fhir.server/Encounter/555" + }, + "effectiveDateTime": "2018-11-20T12:05:00+01:00", + "issued": "2018-03-11T10:28:00+01:00", + "performer": [ + { + "reference": "http://external.fhir.server/Organization/7772", + "display": "Zentrallabor des IKCL" + } + ], + "valueQuantity": { + "value": 72, + "unit": "µmol/l", + "system": "http://unitsofmeasure.org", + "code": "umol/L" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "N" + } + ] + } + ], + "referenceRange": [ + { + "low": { + "value": 72 + }, + "high": { + "value": 127 + }, + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/referencerange-meaning", + "code": "normal", + "display": "Normal Range" + } + ] + } + } + ] + } + ], + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "FILL" + } + ] + }, + "system": "https://diz.mii.de/fhir/core/NamingSystem/test-befund", + "value": "0987654666", + "assigner": { + "identifier": { + "system": "https://www.medizininformatik-initiative.de/fhir/core/NamingSystem/org-identifier", + "value": "DIZ-ID" + } + } + } + ], + "basedOn": [ + { + "reference": "http://external.fhir.server/ServiceRequest/111" + } + ], + "status": "registered", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0074", + "code": "LAB" + }, + { + "system": "http://loinc.org", + "code": "26436-6", + "display": "Laboratory studies" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "11502-2", + "display": "Laboratory report" + } + ] + }, + "subject": { + "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2018-11-20T12:05:00+01:00", + "issued": "2018-03-11T10:28:00+01:00", + "result": [ + { + "reference": "#obs-1" + } + ] +} \ No newline at end of file diff --git a/src/test/resources/DiagnosticReport/transactions/provide-diagnostic-report-create.json b/src/test/resources/DiagnosticReport/transactions/provide-diagnostic-report-create.json new file mode 100644 index 000000000..cf7aefe5c --- /dev/null +++ b/src/test/resources/DiagnosticReport/transactions/provide-diagnostic-report-create.json @@ -0,0 +1,178 @@ +{ + "resourceType": "DiagnosticReport", + "meta": { + "profile": [ + "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/DiagnosticReportLab" + ], + "source": "http://www.highmed.org" + }, + "contained": [ + { + "resourceType": "Observation", + "id": "obs-1", + "meta": { + "profile": [ + "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ObservationLab" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "OBI" + } + ] + }, + "system": "https://diz.mii.de/fhir/core/NamingSystem/test-lab-results", + "value": "59826-8_1234567890", + "assigner": { + "identifier": { + "system": "https://www.medizininformatik-initiative.de/fhir/core/NamingSystem/org-identifier", + "value": "DIZ-ID" + } + } + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://loinc.org", + "code": "26436-6" + }, + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "laboratory" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "732-8", + "display": "Lymphocytes [#/volume] in Blood by Manual count" + } + ], + "text": "Kreatinin" + }, + "subject": { + "reference": "urn:uuid:07f602e0-579e-4fe3-95af-381728bf0d49" + }, + "encounter": { + "reference": "http://external.fhir.server/Encounter/555" + }, + "effectiveDateTime": "2018-11-20T12:05:00+01:00", + "issued": "2018-03-11T10:28:00+01:00", + "performer": [ + { + "reference": "http://external.fhir.server/Organization/7772", + "display": "Zentrallabor des IKCL" + } + ], + "valueQuantity": { + "value": 72, + "unit": "µmol/l", + "system": "http://unitsofmeasure.org", + "code": "umol/L" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "N" + } + ] + } + ], + "referenceRange": [ + { + "low": { + "value": 72 + }, + "high": { + "value": 127 + }, + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/referencerange-meaning", + "code": "normal", + "display": "Normal Range" + } + ] + } + } + ] + } + ], + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "FILL" + } + ] + }, + "system": "https://diz.mii.de/fhir/core/NamingSystem/test-befund", + "value": "0987654666", + "assigner": { + "identifier": { + "system": "https://www.medizininformatik-initiative.de/fhir/core/NamingSystem/org-identifier", + "value": "DIZ-ID" + } + } + } + ], + "basedOn": [ + { + "reference": "http://external.fhir.server/ServiceRequest/111" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0074", + "code": "LAB" + }, + { + "system": "http://loinc.org", + "code": "26436-6", + "display": "Laboratory studies" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "11502-2", + "display": "Laboratory report" + } + ] + }, + "subject": { + "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2018-11-20T12:05:00+01:00", + "issued": "2018-03-11T10:28:00+01:00", + "result": [ + { + "reference": "#obs-1" + } + ] +} \ No newline at end of file diff --git a/src/test/resources/DiagnosticReport/transactions/provide-diagnostic-report-update.json b/src/test/resources/DiagnosticReport/transactions/provide-diagnostic-report-update.json new file mode 100644 index 000000000..a440f52f1 --- /dev/null +++ b/src/test/resources/DiagnosticReport/transactions/provide-diagnostic-report-update.json @@ -0,0 +1,178 @@ +{ + "resourceType": "DiagnosticReport", + "meta": { + "profile": [ + "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/DiagnosticReportLab" + ], + "source": "http://www.highmed.org" + }, + "contained": [ + { + "resourceType": "Observation", + "id": "obs-1", + "meta": { + "profile": [ + "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ObservationLab" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "OBI" + } + ] + }, + "system": "https://diz.mii.de/fhir/core/NamingSystem/test-lab-results", + "value": "59826-8_1234567890", + "assigner": { + "identifier": { + "system": "https://www.medizininformatik-initiative.de/fhir/core/NamingSystem/org-identifier", + "value": "DIZ-ID" + } + } + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://loinc.org", + "code": "26436-6" + }, + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "laboratory" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "732-8", + "display": "Lymphocytes [#/volume] in Blood by Manual count" + } + ], + "text": "Kreatinin" + }, + "subject": { + "reference": "urn:uuid:07f602e0-579e-4fe3-95af-381728bf0d49" + }, + "encounter": { + "reference": "http://external.fhir.server/Encounter/555" + }, + "effectiveDateTime": "2018-11-20T12:05:00+01:00", + "issued": "2018-03-11T10:28:00+01:00", + "performer": [ + { + "reference": "http://external.fhir.server/Organization/7772", + "display": "Zentrallabor des IKCL" + } + ], + "valueQuantity": { + "value": 72, + "unit": "µmol/l", + "system": "http://unitsofmeasure.org", + "code": "umol/L" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "N" + } + ] + } + ], + "referenceRange": [ + { + "low": { + "value": 72 + }, + "high": { + "value": 127 + }, + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/referencerange-meaning", + "code": "normal", + "display": "Normal Range" + } + ] + } + } + ] + } + ], + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "FILL" + } + ] + }, + "system": "https://diz.mii.de/fhir/core/NamingSystem/test-befund", + "value": "0987654666", + "assigner": { + "identifier": { + "system": "https://www.medizininformatik-initiative.de/fhir/core/NamingSystem/org-identifier", + "value": "DIZ-ID" + } + } + } + ], + "basedOn": [ + { + "reference": "http://external.fhir.server/ServiceRequest/987" + } + ], + "status": "corrected", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0074", + "code": "LAB" + }, + { + "system": "http://loinc.org", + "code": "26436-6", + "display": "Laboratory studies" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "11502-2", + "display": "Laboratory report" + } + ] + }, + "subject": { + "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2018-11-20T12:05:00+01:00", + "issued": "2018-03-11T10:28:00+01:00", + "result": [ + { + "reference": "#obs-1" + } + ] +} \ No newline at end of file From 8552fe123a0635134286ea67a2e8548c4ab72057 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 28 May 2021 12:00:12 +0200 Subject: [PATCH 081/141] Add integration tests for Medication Statement and update Postman collection --- .../fhir-bridge.postman_collection.json | 321 ++++++++++++++++++ .../FindDiagnosticReportTransactionIT.java | 2 +- .../ProvideDiagnosticReportTransactionIT.java | 2 +- .../FindMedicationStatementTransactionIT.java | 57 ++++ ...ovideMedicationStatementTransactionIT.java | 39 +++ .../find-medication-statement-search.json | 32 ++ .../provide-medication-statement-create.json | 32 ++ .../provide-medication-statement-update.json | 32 ++ 8 files changed, 515 insertions(+), 2 deletions(-) create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/medicationstatement/FindMedicationStatementTransactionIT.java create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/medicationstatement/ProvideMedicationStatementTransactionIT.java create mode 100644 src/test/resources/MedicationStatement/transactions/find-medication-statement-search.json create mode 100644 src/test/resources/MedicationStatement/transactions/provide-medication-statement-create.json create mode 100644 src/test/resources/MedicationStatement/transactions/provide-medication-statement-update.json diff --git a/config/postman/fhir-bridge.postman_collection.json b/config/postman/fhir-bridge.postman_collection.json index 867787704..43bad5722 100644 --- a/config/postman/fhir-bridge.postman_collection.json +++ b/config/postman/fhir-bridge.postman_collection.json @@ -1155,6 +1155,327 @@ } ] }, + { + "name": "MedicationStatement", + "item": [ + { + "name": "Provide Medication Statement - create", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"MedicationStatement\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pharmacological-therapy\"\r\n ]\r\n },\r\n \"status\": \"active\",\r\n \"medicationCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"413591007\",\r\n \"display\": \"Product containing atazanavir (medicinal product)\"\r\n },\r\n {\r\n \"system\": \"http://fhir.de/CodeSystem/dimdi/atc\",\r\n \"code\": \"J05AE08\",\r\n \"display\": \"Atazanavir\"\r\n }\r\n ],\r\n \"text\": \"Atazanavir\"\r\n },\r\n \"subject\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\",\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/MedicationStatement", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "MedicationStatement" + ] + } + }, + "response": [] + }, + { + "name": "Provide Medication Statement - update", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"MedicationStatement\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pharmacological-therapy\"\r\n ]\r\n },\r\n \"status\": \"on-hold\",\r\n \"medicationCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"413591007\",\r\n \"display\": \"Product containing atazanavir (medicinal product)\"\r\n },\r\n {\r\n \"system\": \"http://fhir.de/CodeSystem/dimdi/atc\",\r\n \"code\": \"J05AE08\",\r\n \"display\": \"Atazanavir\"\r\n }\r\n ],\r\n \"text\": \"Atazanavir\"\r\n },\r\n \"subject\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\",\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/MedicationStatement?subject.identifier={{patientId}}", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "MedicationStatement" + ], + "query": [ + { + "key": "subject.identifier", + "value": "{{patientId}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Find Medication Statement - read", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/fhir/MedicationStatement/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "MedicationStatement", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "2" + } + ] + } + }, + "response": [] + }, + { + "name": "Find Medication Statement - vread", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/fhir/DiagnosticReport/:id/_history/:vid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "DiagnosticReport", + ":id", + "_history", + ":vid" + ], + "variable": [ + { + "key": "id", + "value": "1" + }, + { + "key": "vid", + "value": "1" + } + ] + } + }, + "response": [] + }, + { + "name": "Find Medication Statement - search", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/fhir/MedicationStatement", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "MedicationStatement" + ], + "query": [ + { + "key": "_id", + "value": "2", + "disabled": true + }, + { + "key": "_language", + "value": null, + "disabled": true + }, + { + "key": "_profile", + "value": null, + "disabled": true + }, + { + "key": "_source", + "value": null, + "disabled": true + }, + { + "key": "_security", + "value": null, + "disabled": true + }, + { + "key": "_tag", + "value": null, + "disabled": true + }, + { + "key": "_content", + "value": null, + "disabled": true + }, + { + "key": "_text", + "value": null, + "disabled": true + }, + { + "key": "_filter", + "value": null, + "disabled": true + }, + { + "key": "based-on", + "value": null, + "disabled": true + }, + { + "key": "category", + "value": null, + "disabled": true + }, + { + "key": "code", + "value": null, + "disabled": true + }, + { + "key": "conclusion", + "value": null, + "disabled": true + }, + { + "key": "date", + "value": null, + "disabled": true + }, + { + "key": "encounter", + "value": null, + "disabled": true + }, + { + "key": "identifier", + "value": null, + "disabled": true + }, + { + "key": "issued", + "value": "test", + "disabled": true + }, + { + "key": "media", + "value": null, + "disabled": true + }, + { + "key": "patient", + "value": null, + "disabled": true + }, + { + "key": "performer", + "value": null, + "disabled": true + }, + { + "key": "result", + "value": null, + "disabled": true + }, + { + "key": "results-interpreter", + "value": null, + "disabled": true + }, + { + "key": "specimen", + "value": null, + "disabled": true + }, + { + "key": "status", + "value": "error", + "disabled": true + }, + { + "key": "subject", + "value": null, + "disabled": true + } + ] + } + }, + "response": [] + } + ] + }, { "name": "Observation", "item": [ diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/FindDiagnosticReportTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/FindDiagnosticReportTransactionIT.java index 90749dfc8..f6a233695 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/FindDiagnosticReportTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/FindDiagnosticReportTransactionIT.java @@ -9,7 +9,7 @@ import java.io.IOException; /** - * Integration Tests that validate "Find DiagnosticReport" transaction. + * Integration Tests that validate "Find Diagnostic Report" transaction. */ class FindDiagnosticReportTransactionIT extends AbstractTransactionIT { diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportTransactionIT.java index 3fe401029..a680dc809 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportTransactionIT.java @@ -7,7 +7,7 @@ import org.junit.jupiter.api.Test; /** - * Integration Tests that validate "Provide DiagnosticReport" transaction. + * Integration Tests that validate "Provide Diagnostic Report" transaction. */ class ProvideDiagnosticReportTransactionIT extends AbstractTransactionIT { diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/medicationstatement/FindMedicationStatementTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/medicationstatement/FindMedicationStatementTransactionIT.java new file mode 100644 index 000000000..ea4a51618 --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/medicationstatement/FindMedicationStatementTransactionIT.java @@ -0,0 +1,57 @@ +package org.ehrbase.fhirbridge.fhir.medicationstatement; + +import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.MedicationStatement; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import java.io.IOException; + +/** + * Integration Tests that validate "Find Medication Statement" transaction. + */ +class FindMedicationStatementTransactionIT extends AbstractTransactionIT { + + @Test + void findMedicationStatementRead() throws Exception { + var outcome = create("MedicationStatement/transactions/provide-medication-statement-create.json"); + var id = outcome.getId(); + + var medicationStatement = read(id.getIdPart(), MedicationStatement.class); + + Assertions.assertNotNull(medicationStatement); + Assertions.assertNotNull(medicationStatement.getId(), id.getIdPart()); + Assertions.assertEquals(PATIENT_ID, medicationStatement.getSubject().getIdentifier().getValue()); + } + + @Test + void findMedicationStatementVRead() throws Exception { + var outcome = create("MedicationStatement/transactions/provide-medication-statement-create.json"); + var id = outcome.getId(); + + var medicationStatement = vread(id.getIdPart(), id.getVersionIdPart(), MedicationStatement.class); + Assertions.assertNotNull(medicationStatement); + Assertions.assertNotNull(medicationStatement.getId(), id.getIdPart()); + Assertions.assertNotNull(medicationStatement.getMeta().getVersionId(), id.getVersionIdPart()); + Assertions.assertEquals(PATIENT_ID, medicationStatement.getSubject().getIdentifier().getValue()); + } + + @Test + void findMedicationStatementSearch() throws IOException { + create("MedicationStatement/transactions/find-medication-statement-search.json"); + create("MedicationStatement/transactions/find-medication-statement-search.json"); + create("MedicationStatement/transactions/find-medication-statement-search.json"); + + Bundle bundle = search("MedicationStatement?subject.identifier=" + PATIENT_ID + "&status=not-taken"); + + Assertions.assertEquals(3, bundle.getTotal()); + + bundle.getEntry().forEach(entry -> { + var medicationStatement = (MedicationStatement) entry.getResource(); + + Assertions.assertEquals(PATIENT_ID, medicationStatement.getSubject().getIdentifier().getValue()); + Assertions.assertEquals(MedicationStatement.MedicationStatementStatus.NOTTAKEN, medicationStatement.getStatus()); + }); + } +} diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/medicationstatement/ProvideMedicationStatementTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/medicationstatement/ProvideMedicationStatementTransactionIT.java new file mode 100644 index 000000000..6e65932bf --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/medicationstatement/ProvideMedicationStatementTransactionIT.java @@ -0,0 +1,39 @@ +package org.ehrbase.fhirbridge.fhir.medicationstatement; + +import ca.uhn.fhir.rest.api.MethodOutcome; +import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.r4.model.MedicationStatement; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +/** + * Integration Tests that validate "Provide Medication Statement" transaction. + */ +class ProvideMedicationStatementTransactionIT extends AbstractTransactionIT { + + @Test + void provideMedicationStatementCreate() throws Exception { + var outcome = create("MedicationStatement/transactions/provide-medication-statement-create.json"); + + Assertions.assertEquals(true, outcome.getCreated()); + Assertions.assertNotNull(outcome.getId().getValue()); + } + + @Test + void provideMedicationStatementConditionalUpdate() throws Exception { + MethodOutcome outcome; + + outcome = create("MedicationStatement/transactions/provide-medication-statement-create.json"); + var id = outcome.getId(); + + outcome = update("MedicationStatement/transactions/provide-medication-statement-update.json", "MedicationStatement?_id=" + id.getIdPart() + "&subject.identifier=" + PATIENT_ID); + + Assertions.assertEquals(id.getIdPart(), outcome.getId().getIdPart()); + Assertions.assertEquals(id.getVersionIdPartAsLong() + 1, outcome.getId().getVersionIdPartAsLong()); + + var medicationStatement = (MedicationStatement) outcome.getResource(); + + Assertions.assertEquals(PATIENT_ID, medicationStatement.getSubject().getIdentifier().getValue()); + Assertions.assertEquals(MedicationStatement.MedicationStatementStatus.ONHOLD, medicationStatement.getStatus()); + } +} diff --git a/src/test/resources/MedicationStatement/transactions/find-medication-statement-search.json b/src/test/resources/MedicationStatement/transactions/find-medication-statement-search.json new file mode 100644 index 000000000..488c8d769 --- /dev/null +++ b/src/test/resources/MedicationStatement/transactions/find-medication-statement-search.json @@ -0,0 +1,32 @@ +{ + "resourceType": "MedicationStatement", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pharmacological-therapy" + ] + }, + "status": "not-taken", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "413591007", + "display": "Product containing atazanavir (medicinal product)" + }, + { + "system": "http://fhir.de/CodeSystem/dimdi/atc", + "code": "J05AE08", + "display": "Atazanavir" + } + ], + "text": "Atazanavir" + }, + "subject": { + "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-10-19T08:43:33+02:00" +} \ No newline at end of file diff --git a/src/test/resources/MedicationStatement/transactions/provide-medication-statement-create.json b/src/test/resources/MedicationStatement/transactions/provide-medication-statement-create.json new file mode 100644 index 000000000..7ec04e46f --- /dev/null +++ b/src/test/resources/MedicationStatement/transactions/provide-medication-statement-create.json @@ -0,0 +1,32 @@ +{ + "resourceType": "MedicationStatement", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pharmacological-therapy" + ] + }, + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "413591007", + "display": "Product containing atazanavir (medicinal product)" + }, + { + "system": "http://fhir.de/CodeSystem/dimdi/atc", + "code": "J05AE08", + "display": "Atazanavir" + } + ], + "text": "Atazanavir" + }, + "subject": { + "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-10-19T08:43:33+02:00" +} \ No newline at end of file diff --git a/src/test/resources/MedicationStatement/transactions/provide-medication-statement-update.json b/src/test/resources/MedicationStatement/transactions/provide-medication-statement-update.json new file mode 100644 index 000000000..f6e72e567 --- /dev/null +++ b/src/test/resources/MedicationStatement/transactions/provide-medication-statement-update.json @@ -0,0 +1,32 @@ +{ + "resourceType": "MedicationStatement", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pharmacological-therapy" + ] + }, + "status": "on-hold", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "413591007", + "display": "Product containing atazanavir (medicinal product)" + }, + { + "system": "http://fhir.de/CodeSystem/dimdi/atc", + "code": "J05AE08", + "display": "Atazanavir" + } + ], + "text": "Atazanavir" + }, + "subject": { + "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-10-19T08:43:33+02:00" +} \ No newline at end of file From d235d72385a994b68ca35669533079a60faa7f29 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 28 May 2021 12:11:00 +0200 Subject: [PATCH 082/141] Add integration tests for Observation and update Postman collection --- .../fhir-bridge.postman_collection.json | 12 +++- .../FindObservationTransactionIT.java | 57 +++++++++++++++++++ .../ProvideObservationTransactionIT.java | 39 +++++++++++++ .../transactions/find-observation-search.json | 41 +++++++++++++ .../provide-observation-create.json | 41 +++++++++++++ .../provide-observation-update.json | 41 +++++++++++++ 6 files changed, 228 insertions(+), 3 deletions(-) create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/observation/FindObservationTransactionIT.java create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationTransactionIT.java create mode 100644 src/test/resources/Observation/transactions/find-observation-search.json create mode 100644 src/test/resources/Observation/transactions/provide-observation-create.json create mode 100644 src/test/resources/Observation/transactions/provide-observation-update.json diff --git a/config/postman/fhir-bridge.postman_collection.json b/config/postman/fhir-bridge.postman_collection.json index 43bad5722..a8aa73e55 100644 --- a/config/postman/fhir-bridge.postman_collection.json +++ b/config/postman/fhir-bridge.postman_collection.json @@ -2061,7 +2061,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-pressure\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"system\": \"urn:ietf:rfc:3986\",\r\n \"value\": \"urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281\"\r\n }\r\n ],\r\n \"basedOn\": [\r\n {\r\n \"identifier\": {\r\n \"system\": \"https://acme.org/identifiers\",\r\n \"value\": \"1234\"\r\n }\r\n }\r\n ],\r\n \"status\": \"unknown\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\",\r\n \"display\": \"Vital Signs\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"85354-9\",\r\n \"display\": \"Blood pressure panel with all children optional\"\r\n }\r\n ],\r\n \"text\": \"Blood pressure systolic & diastolic\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"07f602e0-579e-4fe3-95af-381728bf0d49\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2012-09-17\",\r\n \"performer\": [\r\n {\r\n \"reference\": \"http://external.fhir.server/Practitioner/example\"\r\n }\r\n ],\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"L\",\r\n \"display\": \"low\"\r\n }\r\n ],\r\n \"text\": \"Below low normal\"\r\n }\r\n ],\r\n \"bodySite\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"368209003\",\r\n \"display\": \"Right arm\"\r\n }\r\n ]\r\n },\r\n \"component\": [\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8480-6\",\r\n \"display\": \"Systolic blood pressure\"\r\n },\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"271649006\",\r\n \"display\": \"Systolic blood pressure\"\r\n },\r\n {\r\n \"system\": \"http://acme.org/devices/clinical-codes\",\r\n \"code\": \"bp-s\",\r\n \"display\": \"Systolic Blood pressure\"\r\n }\r\n ]\r\n },\r\n \"valueQuantity\": {\r\n \"value\": 107,\r\n \"unit\": \"mmHg\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"mm[Hg]\"\r\n },\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"N\",\r\n \"display\": \"normal\"\r\n }\r\n ],\r\n \"text\": \"Normal\"\r\n }\r\n ]\r\n },\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8462-4\",\r\n \"display\": \"Diastolic blood pressure\"\r\n }\r\n ]\r\n },\r\n \"valueQuantity\": {\r\n \"value\": 107,\r\n \"unit\": \"mmHg\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"mm[Hg]\"\r\n },\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"L\",\r\n \"display\": \"low\"\r\n }\r\n ],\r\n \"text\": \"Below low normal\"\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"http://hl7.org/fhir/StructureDefinition/bodytemp\"\r\n ]\r\n },\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8310-5\"\r\n }\r\n ]\r\n },\r\n \"subject\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\",\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-04-30T12:00:00+01:00\",\r\n \"valueQuantity\": {\r\n \"value\": 37.5,\r\n \"unit\": \"Cel\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"Cel\"\r\n }\r\n}", "options": { "raw": { "language": "json" @@ -2088,7 +2088,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-pressure\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"system\": \"urn:ietf:rfc:3986\",\r\n \"value\": \"urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281\"\r\n }\r\n ],\r\n \"basedOn\": [\r\n {\r\n \"identifier\": {\r\n \"system\": \"https://acme.org/identifiers\",\r\n \"value\": \"1234\"\r\n }\r\n }\r\n ],\r\n \"status\": \"unknown\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\",\r\n \"display\": \"Vital Signs\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"85354-9\",\r\n \"display\": \"Blood pressure panel with all children optional\"\r\n }\r\n ],\r\n \"text\": \"Blood pressure systolic & diastolic\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"07f602e0-579e-4fe3-95af-381728bf0d49\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2012-09-17\",\r\n \"performer\": [\r\n {\r\n \"reference\": \"http://external.fhir.server/Practitioner/example\"\r\n }\r\n ],\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"L\",\r\n \"display\": \"low\"\r\n }\r\n ],\r\n \"text\": \"Below low normal\"\r\n }\r\n ],\r\n \"bodySite\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"368209003\",\r\n \"display\": \"Right arm\"\r\n }\r\n ]\r\n },\r\n \"component\": [\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8480-6\",\r\n \"display\": \"Systolic blood pressure\"\r\n },\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"271649006\",\r\n \"display\": \"Systolic blood pressure\"\r\n },\r\n {\r\n \"system\": \"http://acme.org/devices/clinical-codes\",\r\n \"code\": \"bp-s\",\r\n \"display\": \"Systolic Blood pressure\"\r\n }\r\n ]\r\n },\r\n \"valueQuantity\": {\r\n \"value\": 107,\r\n \"unit\": \"mmHg\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"mm[Hg]\"\r\n },\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"N\",\r\n \"display\": \"normal\"\r\n }\r\n ],\r\n \"text\": \"Normal\"\r\n }\r\n ]\r\n },\r\n {\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8462-4\",\r\n \"display\": \"Diastolic blood pressure\"\r\n }\r\n ]\r\n },\r\n \"valueQuantity\": {\r\n \"value\": 107,\r\n \"unit\": \"mmHg\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"mm[Hg]\"\r\n },\r\n \"interpretation\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\r\n \"code\": \"L\",\r\n \"display\": \"low\"\r\n }\r\n ],\r\n \"text\": \"Below low normal\"\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"http://hl7.org/fhir/StructureDefinition/bodytemp\"\r\n ]\r\n },\r\n \"status\": \"corrected\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8310-5\"\r\n }\r\n ]\r\n },\r\n \"subject\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\",\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-04-30T12:00:00+01:00\",\r\n \"valueQuantity\": {\r\n \"value\": 37.5,\r\n \"unit\": \"Cel\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"Cel\"\r\n }\r\n}", "options": { "raw": { "language": "json" @@ -2096,13 +2096,19 @@ } }, "url": { - "raw": "{{baseUrl}}/fhir/Observation", + "raw": "{{baseUrl}}/fhir/Observation?subject.identifier={{patientId}}", "host": [ "{{baseUrl}}" ], "path": [ "fhir", "Observation" + ], + "query": [ + { + "key": "subject.identifier", + "value": "{{patientId}}" + } ] } }, diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/FindObservationTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/FindObservationTransactionIT.java new file mode 100644 index 000000000..c79c4c95d --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/FindObservationTransactionIT.java @@ -0,0 +1,57 @@ +package org.ehrbase.fhirbridge.fhir.observation; + +import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.Observation; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import java.io.IOException; + +/** + * Integration Tests that validate "Find Observation" transaction. + */ +class FindObservationTransactionIT extends AbstractTransactionIT { + + @Test + void findObservationRead() throws Exception { + var outcome = create("Observation/transactions/provide-observation-create.json"); + var id = outcome.getId(); + + var observation = read(id.getIdPart(), Observation.class); + + Assertions.assertNotNull(observation); + Assertions.assertNotNull(observation.getId(), id.getIdPart()); + Assertions.assertEquals(PATIENT_ID, observation.getSubject().getIdentifier().getValue()); + } + + @Test + void findObservationVRead() throws Exception { + var outcome = create("Observation/transactions/provide-observation-create.json"); + var id = outcome.getId(); + + var observation = vread(id.getIdPart(), id.getVersionIdPart(), Observation.class); + Assertions.assertNotNull(observation); + Assertions.assertNotNull(observation.getId(), id.getIdPart()); + Assertions.assertNotNull(observation.getMeta().getVersionId(), id.getVersionIdPart()); + Assertions.assertEquals(PATIENT_ID, observation.getSubject().getIdentifier().getValue()); + } + + @Test + void findObservationSearch() throws IOException { + create("Observation/transactions/find-observation-search.json"); + create("Observation/transactions/find-observation-search.json"); + create("Observation/transactions/find-observation-search.json"); + + Bundle bundle = search("Observation?subject.identifier=" + PATIENT_ID + "&status=preliminary"); + + Assertions.assertEquals(3, bundle.getTotal()); + + bundle.getEntry().forEach(entry -> { + var observation = (Observation) entry.getResource(); + + Assertions.assertEquals(PATIENT_ID, observation.getSubject().getIdentifier().getValue()); + Assertions.assertEquals(Observation.ObservationStatus.PRELIMINARY, observation.getStatus()); + }); + } +} diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationTransactionIT.java new file mode 100644 index 000000000..1aadb8103 --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationTransactionIT.java @@ -0,0 +1,39 @@ +package org.ehrbase.fhirbridge.fhir.observation; + +import ca.uhn.fhir.rest.api.MethodOutcome; +import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.r4.model.Observation; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +/** + * Integration Tests that validate "Provide Observation" transaction. + */ +class ProvideObservationTransactionIT extends AbstractTransactionIT { + + @Test + void provideObservationCreate() throws Exception { + var outcome = create("Observation/transactions/provide-observation-create.json"); + + Assertions.assertEquals(true, outcome.getCreated()); + Assertions.assertNotNull(outcome.getId().getValue()); + } + + @Test + void provideObservationConditionalUpdate() throws Exception { + MethodOutcome outcome; + + outcome = create("Observation/transactions/provide-observation-create.json"); + var id = outcome.getId(); + + outcome = update("Observation/transactions/provide-observation-update.json", "Observation?_id=" + id.getIdPart() + "&subject.identifier=" + PATIENT_ID); + + Assertions.assertEquals(id.getIdPart(), outcome.getId().getIdPart()); + Assertions.assertEquals(id.getVersionIdPartAsLong() + 1, outcome.getId().getVersionIdPartAsLong()); + + var observation = (Observation) outcome.getResource(); + + Assertions.assertEquals(PATIENT_ID, observation.getSubject().getIdentifier().getValue()); + Assertions.assertEquals(Observation.ObservationStatus.CORRECTED, observation.getStatus()); + } +} diff --git a/src/test/resources/Observation/transactions/find-observation-search.json b/src/test/resources/Observation/transactions/find-observation-search.json new file mode 100644 index 000000000..c8e7447e2 --- /dev/null +++ b/src/test/resources/Observation/transactions/find-observation-search.json @@ -0,0 +1,41 @@ +{ + "resourceType": "Observation", + "meta": { + "profile": [ + "http://hl7.org/fhir/StructureDefinition/bodytemp" + ] + }, + "status": "preliminary", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "vital-signs" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "8310-5" + } + ] + }, + "subject": { + "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-04-30T12:00:00+01:00", + "valueQuantity": { + "value": 37.5, + "unit": "Cel", + "system": "http://unitsofmeasure.org", + "code": "Cel" + } +} \ No newline at end of file diff --git a/src/test/resources/Observation/transactions/provide-observation-create.json b/src/test/resources/Observation/transactions/provide-observation-create.json new file mode 100644 index 000000000..ddb317fdc --- /dev/null +++ b/src/test/resources/Observation/transactions/provide-observation-create.json @@ -0,0 +1,41 @@ +{ + "resourceType": "Observation", + "meta": { + "profile": [ + "http://hl7.org/fhir/StructureDefinition/bodytemp" + ] + }, + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "vital-signs" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "8310-5" + } + ] + }, + "subject": { + "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-04-30T12:00:00+01:00", + "valueQuantity": { + "value": 37.5, + "unit": "Cel", + "system": "http://unitsofmeasure.org", + "code": "Cel" + } +} \ No newline at end of file diff --git a/src/test/resources/Observation/transactions/provide-observation-update.json b/src/test/resources/Observation/transactions/provide-observation-update.json new file mode 100644 index 000000000..4d99d40c2 --- /dev/null +++ b/src/test/resources/Observation/transactions/provide-observation-update.json @@ -0,0 +1,41 @@ +{ + "resourceType": "Observation", + "meta": { + "profile": [ + "http://hl7.org/fhir/StructureDefinition/bodytemp" + ] + }, + "status": "corrected", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "vital-signs" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "8310-5" + } + ] + }, + "subject": { + "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2020-04-30T12:00:00+01:00", + "valueQuantity": { + "value": 37.5, + "unit": "Cel", + "system": "http://unitsofmeasure.org", + "code": "Cel" + } +} \ No newline at end of file From baf75a12e8950b8dac80da03b0c4d4c8b351d899 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 28 May 2021 12:29:10 +0200 Subject: [PATCH 083/141] Add integration tests for Patient and update Postman collection --- .../fhir-bridge.postman_collection.json | 73 ++++++++++++++++--- .../patient/FindPatientTransactionIT.java | 60 +++++++++++++++ .../patient/ProvidePatientTransactionIT.java | 38 ++++++++++ .../transactions/find-patient-search.json | 43 +++++++++++ .../transactions/provide-patient-create.json | 43 +++++++++++ .../transactions/provide-patient-update.json | 43 +++++++++++ 6 files changed, 288 insertions(+), 12 deletions(-) create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/patient/FindPatientTransactionIT.java create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientTransactionIT.java create mode 100644 src/test/resources/Patient/transactions/find-patient-search.json create mode 100644 src/test/resources/Patient/transactions/provide-patient-create.json create mode 100644 src/test/resources/Patient/transactions/provide-patient-update.json diff --git a/config/postman/fhir-bridge.postman_collection.json b/config/postman/fhir-bridge.postman_collection.json index a8aa73e55..d5b967ecc 100644 --- a/config/postman/fhir-bridge.postman_collection.json +++ b/config/postman/fhir-bridge.postman_collection.json @@ -1176,7 +1176,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"resourceType\": \"MedicationStatement\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pharmacological-therapy\"\r\n ]\r\n },\r\n \"status\": \"active\",\r\n \"medicationCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"413591007\",\r\n \"display\": \"Product containing atazanavir (medicinal product)\"\r\n },\r\n {\r\n \"system\": \"http://fhir.de/CodeSystem/dimdi/atc\",\r\n \"code\": \"J05AE08\",\r\n \"display\": \"Atazanavir\"\r\n }\r\n ],\r\n \"text\": \"Atazanavir\"\r\n },\r\n \"subject\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\",\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\"\r\n}", + "raw": "{\r\n \"resourceType\": \"MedicationStatement\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pharmacological-therapy\"\r\n ]\r\n },\r\n \"status\": \"active\",\r\n \"medicationCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"413591007\",\r\n \"display\": \"Product containing atazanavir (medicinal product)\"\r\n },\r\n {\r\n \"system\": \"http://fhir.de/CodeSystem/dimdi/atc\",\r\n \"code\": \"J05AE08\",\r\n \"display\": \"Atazanavir\"\r\n }\r\n ],\r\n \"text\": \"Atazanavir\"\r\n },\r\n \"subject\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\",\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\"\r\n}", "options": { "raw": { "language": "json" @@ -1293,13 +1293,13 @@ "method": "GET", "header": [], "url": { - "raw": "{{baseUrl}}/fhir/DiagnosticReport/:id/_history/:vid", + "raw": "{{baseUrl}}/fhir/MedicationStatement/:id/_history/:vid", "host": [ "{{baseUrl}}" ], "path": [ "fhir", - "DiagnosticReport", + "MedicationStatement", ":id", "_history", ":vid" @@ -2464,7 +2464,50 @@ "name": "Patient", "item": [ { - "name": "Create Patient", + "name": "Profiles", + "item": [ + { + "name": "Provide Patient - Invalid", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Patient\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/Patient\"\r\n ]\r\n },\r\n \"extension\": [\r\n {\r\n \"url\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/ethnic-group\",\r\n \"valueCoding\": {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"186019001\",\r\n \"display\": \"Other ethnic, mixed origin\"\r\n }\r\n },\r\n {\r\n \"extension\": [\r\n {\r\n \"url\": \"dateTimeOfDocumentation\",\r\n \"valueDateTime\": \"2020-10-01\"\r\n },\r\n {\r\n \"url\": \"age\",\r\n \"valueAge\": {\r\n \"value\": 67,\r\n \"unit\": \"years\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"a\"\r\n }\r\n }\r\n ],\r\n \"url\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/age\"\r\n }\r\n ],\r\n \"identifier\": [\r\n {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n ],\r\n \"birthDate\": \"1953-09-30\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Patient", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Patient" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Provide Patient - create", "event": [ { "listen": "prerequest", @@ -2481,7 +2524,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Patient\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/Patient\"\r\n ]\r\n },\r\n \"extension\": [\r\n {\r\n \"url\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/ethnic-group\",\r\n \"valueCoding\": {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"186019001\",\r\n \"display\": \"Other ethnic, mixed origin\"\r\n }\r\n },\r\n {\r\n \"extension\": [\r\n {\r\n \"url\": \"dateTimeOfDocumentation\",\r\n \"valueDateTime\": \"2020-10-01\"\r\n },\r\n {\r\n \"url\": \"age\",\r\n \"valueAge\": {\r\n \"value\": 67,\r\n \"unit\": \"years\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"a\"\r\n }\r\n }\r\n ],\r\n \"url\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/age\"\r\n }\r\n ],\r\n \"identifier\": [\r\n {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n ]\r\n}\r\n", + "raw": "{\r\n \"resourceType\": \"Patient\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/Patient\"\r\n ]\r\n },\r\n \"extension\": [\r\n {\r\n \"url\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/ethnic-group\",\r\n \"valueCoding\": {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"186019001\",\r\n \"display\": \"Other ethnic, mixed origin\"\r\n }\r\n },\r\n {\r\n \"extension\": [\r\n {\r\n \"url\": \"dateTimeOfDocumentation\",\r\n \"valueDateTime\": \"2020-10-01\"\r\n },\r\n {\r\n \"url\": \"age\",\r\n \"valueAge\": {\r\n \"value\": 68,\r\n \"unit\": \"years\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"a\"\r\n }\r\n }\r\n ],\r\n \"url\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/age\"\r\n }\r\n ],\r\n \"identifier\": [\r\n {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n ],\r\n \"birthDate\": \"1952-09-30\"\r\n}", "options": { "raw": { "language": "json" @@ -2502,7 +2545,7 @@ "response": [] }, { - "name": "Provide Patient - Invalid", + "name": "Provide Patient - update", "event": [ { "listen": "prerequest", @@ -2515,11 +2558,11 @@ } ], "request": { - "method": "POST", + "method": "PUT", "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Patient\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/Patient\"\r\n ]\r\n },\r\n \"extension\": [\r\n {\r\n \"url\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/ethnic-group\",\r\n \"valueCoding\": {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"186019001\",\r\n \"display\": \"Other ethnic, mixed origin\"\r\n }\r\n },\r\n {\r\n \"extension\": [\r\n {\r\n \"url\": \"dateTimeOfDocumentation\",\r\n \"valueDateTime\": \"2020-10-01\"\r\n },\r\n {\r\n \"url\": \"age\",\r\n \"valueAge\": {\r\n \"value\": 67,\r\n \"unit\": \"years\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"a\"\r\n }\r\n }\r\n ],\r\n \"url\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/age\"\r\n }\r\n ],\r\n \"identifier\": [\r\n {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n ],\r\n \"birthDate\": \"1953-09-30\"\r\n}", + "raw": "{\r\n \"resourceType\": \"Patient\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/Patient\"\r\n ]\r\n },\r\n \"extension\": [\r\n {\r\n \"url\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/ethnic-group\",\r\n \"valueCoding\": {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"186019001\",\r\n \"display\": \"Other ethnic, mixed origin\"\r\n }\r\n },\r\n {\r\n \"extension\": [\r\n {\r\n \"url\": \"dateTimeOfDocumentation\",\r\n \"valueDateTime\": \"2020-10-01\"\r\n },\r\n {\r\n \"url\": \"age\",\r\n \"valueAge\": {\r\n \"value\": 67,\r\n \"unit\": \"years\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"a\"\r\n }\r\n }\r\n ],\r\n \"url\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/age\"\r\n }\r\n ],\r\n \"identifier\": [\r\n {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n ],\r\n \"birthDate\": \"1953-09-30\"\r\n}", "options": { "raw": { "language": "json" @@ -2527,20 +2570,26 @@ } }, "url": { - "raw": "{{baseUrl}}/fhir/Patient", + "raw": "{{baseUrl}}/fhir/Patient?identifier={{patientId}}", "host": [ "{{baseUrl}}" ], "path": [ "fhir", "Patient" + ], + "query": [ + { + "key": "identifier", + "value": "{{patientId}}" + } ] } }, "response": [] }, { - "name": "Find Patient: read", + "name": "Find Patient - read", "event": [ { "listen": "prerequest", @@ -2576,7 +2625,7 @@ "response": [] }, { - "name": "Find Patient: vread", + "name": "Find Patient - vread", "event": [ { "listen": "prerequest", @@ -2618,7 +2667,7 @@ "response": [] }, { - "name": "Find Patient: search", + "name": "Find Patient - Search", "event": [ { "listen": "prerequest", diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/patient/FindPatientTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/patient/FindPatientTransactionIT.java new file mode 100644 index 000000000..7e7419eab --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/patient/FindPatientTransactionIT.java @@ -0,0 +1,60 @@ +package org.ehrbase.fhirbridge.fhir.patient; + +import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.Patient; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import java.text.SimpleDateFormat; +import java.util.Date; + +/** + * Integration Tests that validate "Find Patient" transaction. + */ +class FindPatientTransactionIT extends AbstractTransactionIT { + + @Test + void findPatientRead() throws Exception { + var outcome = create("Patient/transactions/provide-patient-create.json"); + var id = outcome.getId(); + + var patient = read(id.getIdPart(), Patient.class); + + Assertions.assertNotNull(patient); + Assertions.assertNotNull(patient.getId(), id.getIdPart()); + Assertions.assertEquals(PATIENT_ID, patient.getIdentifier().get(0).getValue()); + } + + @Test + void findPatientVRead() throws Exception { + var outcome = create("Patient/transactions/provide-patient-create.json"); + var id = outcome.getId(); + + var patient = vread(id.getIdPart(), id.getVersionIdPart(), Patient.class); + Assertions.assertNotNull(patient); + Assertions.assertNotNull(patient.getId(), id.getIdPart()); + Assertions.assertNotNull(patient.getMeta().getVersionId(), id.getVersionIdPart()); + Assertions.assertEquals(PATIENT_ID, patient.getIdentifier().get(0).getValue()); + } + + @Test + void findPatientSearch() throws Exception { + create("Patient/transactions/find-patient-search.json"); + create("Patient/transactions/find-patient-search.json"); + create("Patient/transactions/find-patient-search.json"); + + Bundle bundle = search("Patient?identifier=" + PATIENT_ID + "&birthdate=2000-09-30"); + + Assertions.assertEquals(3, bundle.getTotal()); + + Date birthdate = new SimpleDateFormat("yyyy-MM-dd").parse("2000-09-30"); + + bundle.getEntry().forEach(entry -> { + var patient = (Patient) entry.getResource(); + + Assertions.assertEquals(PATIENT_ID, patient.getIdentifier().get(0).getValue()); + Assertions.assertEquals(birthdate, patient.getBirthDate()); + }); + } +} diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientTransactionIT.java new file mode 100644 index 000000000..e65157236 --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientTransactionIT.java @@ -0,0 +1,38 @@ +package org.ehrbase.fhirbridge.fhir.patient; + +import ca.uhn.fhir.rest.api.MethodOutcome; +import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.r4.model.Patient; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +/** + * Integration Tests that validate "Provide Patient" transaction. + */ +class ProvidePatientTransactionIT extends AbstractTransactionIT { + + @Test + void providePatientCreate() throws Exception { + var outcome = create("Patient/transactions/provide-patient-create.json"); + + Assertions.assertEquals(true, outcome.getCreated()); + Assertions.assertNotNull(outcome.getId().getValue()); + } + + @Test + void providePatientConditionalUpdate() throws Exception { + MethodOutcome outcome; + + outcome = create("Patient/transactions/provide-patient-create.json"); + var id = outcome.getId(); + + outcome = update("Patient/transactions/provide-patient-update.json", "Patient?_id=" + id.getIdPart() + "&identifier=" + PATIENT_ID); + + Assertions.assertEquals(id.getIdPart(), outcome.getId().getIdPart()); + Assertions.assertEquals(id.getVersionIdPartAsLong() + 1, outcome.getId().getVersionIdPartAsLong()); + + var patient = (Patient) outcome.getResource(); + + Assertions.assertEquals(PATIENT_ID, patient.getIdentifier().get(0).getValue()); + } +} diff --git a/src/test/resources/Patient/transactions/find-patient-search.json b/src/test/resources/Patient/transactions/find-patient-search.json new file mode 100644 index 000000000..5b701c152 --- /dev/null +++ b/src/test/resources/Patient/transactions/find-patient-search.json @@ -0,0 +1,43 @@ +{ + "resourceType": "Patient", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/Patient" + ] + }, + "extension": [ + { + "url": "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/ethnic-group", + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "186019001", + "display": "Other ethnic, mixed origin" + } + }, + { + "extension": [ + { + "url": "dateTimeOfDocumentation", + "valueDateTime": "2020-10-01" + }, + { + "url": "age", + "valueAge": { + "value": 20, + "unit": "years", + "system": "http://unitsofmeasure.org", + "code": "a" + } + } + ], + "url": "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/age" + } + ], + "identifier": [ + { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + ], + "birthDate": "2000-09-30" +} \ No newline at end of file diff --git a/src/test/resources/Patient/transactions/provide-patient-create.json b/src/test/resources/Patient/transactions/provide-patient-create.json new file mode 100644 index 000000000..09f48517c --- /dev/null +++ b/src/test/resources/Patient/transactions/provide-patient-create.json @@ -0,0 +1,43 @@ +{ + "resourceType": "Patient", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/Patient" + ] + }, + "extension": [ + { + "url": "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/ethnic-group", + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "186019001", + "display": "Other ethnic, mixed origin" + } + }, + { + "extension": [ + { + "url": "dateTimeOfDocumentation", + "valueDateTime": "2020-10-01" + }, + { + "url": "age", + "valueAge": { + "value": 68, + "unit": "years", + "system": "http://unitsofmeasure.org", + "code": "a" + } + } + ], + "url": "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/age" + } + ], + "identifier": [ + { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + ], + "birthDate": "1952-09-30" +} \ No newline at end of file diff --git a/src/test/resources/Patient/transactions/provide-patient-update.json b/src/test/resources/Patient/transactions/provide-patient-update.json new file mode 100644 index 000000000..89a03fc89 --- /dev/null +++ b/src/test/resources/Patient/transactions/provide-patient-update.json @@ -0,0 +1,43 @@ +{ + "resourceType": "Patient", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/Patient" + ] + }, + "extension": [ + { + "url": "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/ethnic-group", + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "186019001", + "display": "Other ethnic, mixed origin" + } + }, + { + "extension": [ + { + "url": "dateTimeOfDocumentation", + "valueDateTime": "2020-10-01" + }, + { + "url": "age", + "valueAge": { + "value": 67, + "unit": "years", + "system": "http://unitsofmeasure.org", + "code": "a" + } + } + ], + "url": "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/age" + } + ], + "identifier": [ + { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + ], + "birthDate": "1953-09-30" +} \ No newline at end of file From c2441728e9d5b9f056527e9f85fee9a62ac1bf56 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 28 May 2021 12:42:59 +0200 Subject: [PATCH 084/141] Add integration tests for Procedure and update Postman collection --- .../fhir-bridge.postman_collection.json | 52 ++++++++++++++++-- .../procedure/FindProcedureTransactionIT.java | 55 +++++++++++++++++++ .../ProvideProcedureTransactionIT.java | 39 +++++++++++++ .../transactions/find-procedure-search.json | 49 +++++++++++++++++ .../provide-procedure-create.json | 49 +++++++++++++++++ .../provide-procedure-update.json | 49 +++++++++++++++++ 6 files changed, 289 insertions(+), 4 deletions(-) create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/procedure/FindProcedureTransactionIT.java create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureTransactionIT.java create mode 100644 src/test/resources/Procedure/transactions/find-procedure-search.json create mode 100644 src/test/resources/Procedure/transactions/provide-procedure-create.json create mode 100644 src/test/resources/Procedure/transactions/provide-procedure-update.json diff --git a/config/postman/fhir-bridge.postman_collection.json b/config/postman/fhir-bridge.postman_collection.json index d5b967ecc..df4261a01 100644 --- a/config/postman/fhir-bridge.postman_collection.json +++ b/config/postman/fhir-bridge.postman_collection.json @@ -2862,7 +2862,7 @@ "name": "Procedure", "item": [ { - "name": "Create Procedure", + "name": "Provide Procedure - create", "event": [ { "listen": "prerequest", @@ -2900,7 +2900,51 @@ "response": [] }, { - "name": "Find Procedure: read", + "name": "Provide Procedure - update", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Procedure\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.medizininformatik-initiative.de/fhir/core/modul-prozedur/StructureDefinition/Procedure\"\r\n ]\r\n },\r\n \"status\": \"on-hold\",\r\n \"category\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"387713003\",\r\n \"display\": \"Surgical procedure (procedure)\"\r\n }\r\n ]\r\n },\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"80146002\",\r\n \"display\": \"Excision of appendix (procedure)\"\r\n },\r\n {\r\n \"system\": \"http://fhir.de/CodeSystem/dimdi/ops\",\r\n \"version\": \"2020\",\r\n \"code\": \"5-470\",\r\n \"display\": \"Appendektomie\"\r\n }\r\n ]\r\n },\r\n \"performedDateTime\": \"2020-04-23\",\r\n \"subject\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\",\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"note\": [\r\n {\r\n \"text\": \"This is a note about the procedure\"\r\n }\r\n ],\r\n \"recorder\": {\r\n \"reference\": \"http://external.fhir.server/Practitioner/f201\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Procedure?subject.identifier={{patientId}}", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Procedure" + ], + "query": [ + { + "key": "subject.identifier", + "value": "{{patientId}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Find Procedure - read", "event": [ { "listen": "prerequest", @@ -2936,7 +2980,7 @@ "response": [] }, { - "name": "Find Procedure: vread", + "name": "Find Procedure - vread", "event": [ { "listen": "prerequest", @@ -2978,7 +3022,7 @@ "response": [] }, { - "name": "Find Procedure: search", + "name": "Find Procedure - search", "event": [ { "listen": "prerequest", diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/FindProcedureTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/FindProcedureTransactionIT.java new file mode 100644 index 000000000..f93790597 --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/FindProcedureTransactionIT.java @@ -0,0 +1,55 @@ +package org.ehrbase.fhirbridge.fhir.procedure; + +import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.Procedure; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +/** + * Integration Tests that validate "Find Procedure" transaction. + */ +class FindProcedureTransactionIT extends AbstractTransactionIT { + + @Test + void findProcedureRead() throws Exception { + var outcome = create("Procedure/transactions/provide-procedure-create.json"); + var id = outcome.getId(); + + var procedure = read(id.getIdPart(), Procedure.class); + + Assertions.assertNotNull(procedure); + Assertions.assertNotNull(procedure.getId(), id.getIdPart()); + Assertions.assertEquals(PATIENT_ID, procedure.getSubject().getIdentifier().getValue()); + } + + @Test + void findProcedureVRead() throws Exception { + var outcome = create("Procedure/transactions/provide-procedure-create.json"); + var id = outcome.getId(); + + var procedure = vread(id.getIdPart(), id.getVersionIdPart(), Procedure.class); + Assertions.assertNotNull(procedure); + Assertions.assertNotNull(procedure.getId(), id.getIdPart()); + Assertions.assertNotNull(procedure.getMeta().getVersionId(), id.getVersionIdPart()); + Assertions.assertEquals(PATIENT_ID, procedure.getSubject().getIdentifier().getValue()); + } + + @Test + void findProcedureSearch() throws Exception { + create("Procedure/transactions/find-procedure-search.json"); + create("Procedure/transactions/find-procedure-search.json"); + create("Procedure/transactions/find-procedure-search.json"); + + Bundle bundle = search("Procedure?subject.identifier=" + PATIENT_ID + "&status=entered-in-error"); + + Assertions.assertEquals(3, bundle.getTotal()); + + bundle.getEntry().forEach(entry -> { + var procedure = (Procedure) entry.getResource(); + + Assertions.assertEquals(PATIENT_ID, procedure.getSubject().getIdentifier().getValue()); + Assertions.assertEquals(Procedure.ProcedureStatus.ENTEREDINERROR, procedure.getStatus()); + }); + } +} diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureTransactionIT.java new file mode 100644 index 000000000..35bf1c4dd --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureTransactionIT.java @@ -0,0 +1,39 @@ +package org.ehrbase.fhirbridge.fhir.procedure; + +import ca.uhn.fhir.rest.api.MethodOutcome; +import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.r4.model.Procedure; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +/** + * Integration Tests that validate "Provide Procedure" transaction. + */ +class ProvideProcedureTransactionIT extends AbstractTransactionIT { + + @Test + void provideProcedureCreate() throws Exception { + var outcome = create("Procedure/transactions/provide-procedure-create.json"); + + Assertions.assertEquals(true, outcome.getCreated()); + Assertions.assertNotNull(outcome.getId().getValue()); + } + + @Test + void provideProcedureConditionalUpdate() throws Exception { + MethodOutcome outcome; + + outcome = create("Procedure/transactions/provide-procedure-create.json"); + var id = outcome.getId(); + + outcome = update("Procedure/transactions/provide-procedure-update.json", "Procedure?_id=" + id.getIdPart() + "&subject.identifier=" + PATIENT_ID); + + Assertions.assertEquals(id.getIdPart(), outcome.getId().getIdPart()); + Assertions.assertEquals(id.getVersionIdPartAsLong() + 1, outcome.getId().getVersionIdPartAsLong()); + + var procedure = (Procedure) outcome.getResource(); + + Assertions.assertEquals(PATIENT_ID, procedure.getSubject().getIdentifier().getValue()); + Assertions.assertEquals(Procedure.ProcedureStatus.ONHOLD, procedure.getStatus()); + } +} diff --git a/src/test/resources/Procedure/transactions/find-procedure-search.json b/src/test/resources/Procedure/transactions/find-procedure-search.json new file mode 100644 index 000000000..5e38d462b --- /dev/null +++ b/src/test/resources/Procedure/transactions/find-procedure-search.json @@ -0,0 +1,49 @@ +{ + "resourceType": "Procedure", + "meta": { + "profile": [ + "https://www.medizininformatik-initiative.de/fhir/core/modul-prozedur/StructureDefinition/Procedure" + ] + }, + "status": "entered-in-error", + "category": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "387713003", + "display": "Surgical procedure (procedure)" + } + ] + }, + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "80146002", + "display": "Excision of appendix (procedure)" + }, + { + "system": "http://fhir.de/CodeSystem/dimdi/ops", + "version": "2020", + "code": "5-470", + "display": "Appendektomie" + } + ] + }, + "performedDateTime": "2020-04-23", + "subject": { + "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "note": [ + { + "text": "This is a note about the procedure" + } + ], + "recorder": { + "reference": "http://external.fhir.server/Practitioner/f201" + } +} \ No newline at end of file diff --git a/src/test/resources/Procedure/transactions/provide-procedure-create.json b/src/test/resources/Procedure/transactions/provide-procedure-create.json new file mode 100644 index 000000000..ec296ea4f --- /dev/null +++ b/src/test/resources/Procedure/transactions/provide-procedure-create.json @@ -0,0 +1,49 @@ +{ + "resourceType": "Procedure", + "meta": { + "profile": [ + "https://www.medizininformatik-initiative.de/fhir/core/modul-prozedur/StructureDefinition/Procedure" + ] + }, + "status": "completed", + "category": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "387713003", + "display": "Surgical procedure (procedure)" + } + ] + }, + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "80146002", + "display": "Excision of appendix (procedure)" + }, + { + "system": "http://fhir.de/CodeSystem/dimdi/ops", + "version": "2020", + "code": "5-470", + "display": "Appendektomie" + } + ] + }, + "performedDateTime": "2020-04-23", + "subject": { + "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "note": [ + { + "text": "This is a note about the procedure" + } + ], + "recorder": { + "reference": "http://external.fhir.server/Practitioner/f201" + } +} \ No newline at end of file diff --git a/src/test/resources/Procedure/transactions/provide-procedure-update.json b/src/test/resources/Procedure/transactions/provide-procedure-update.json new file mode 100644 index 000000000..0ce9fd622 --- /dev/null +++ b/src/test/resources/Procedure/transactions/provide-procedure-update.json @@ -0,0 +1,49 @@ +{ + "resourceType": "Procedure", + "meta": { + "profile": [ + "https://www.medizininformatik-initiative.de/fhir/core/modul-prozedur/StructureDefinition/Procedure" + ] + }, + "status": "on-hold", + "category": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "387713003", + "display": "Surgical procedure (procedure)" + } + ] + }, + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "80146002", + "display": "Excision of appendix (procedure)" + }, + { + "system": "http://fhir.de/CodeSystem/dimdi/ops", + "version": "2020", + "code": "5-470", + "display": "Appendektomie" + } + ] + }, + "performedDateTime": "2020-04-23", + "subject": { + "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "note": [ + { + "text": "This is a note about the procedure" + } + ], + "recorder": { + "reference": "http://external.fhir.server/Practitioner/f201" + } +} \ No newline at end of file From c6ac1bed3c4a6af06b998f1473527b37c8ee6175 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 28 May 2021 13:01:11 +0200 Subject: [PATCH 085/141] Add integration tests for QuestionnaireResponse and update Postman collection --- .../fhir-bridge.postman_collection.json | 107 +++-- ...indQuestionnaireResponseTransactionIT.java | 55 +++ ...ideQuestionnaireResponseTransactionIT.java | 39 ++ .../find-questionnaire-response-search.json | 400 ++++++++++++++++++ ...provide-questionnaire-response-create.json | 400 ++++++++++++++++++ ...provide-questionnaire-response-update.json | 400 ++++++++++++++++++ 6 files changed, 1371 insertions(+), 30 deletions(-) create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/FindQuestionnaireResponseTransactionIT.java create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseTransactionIT.java create mode 100644 src/test/resources/QuestionnaireResponse/transactions/find-questionnaire-response-search.json create mode 100644 src/test/resources/QuestionnaireResponse/transactions/provide-questionnaire-response-create.json create mode 100644 src/test/resources/QuestionnaireResponse/transactions/provide-questionnaire-response-update.json diff --git a/config/postman/fhir-bridge.postman_collection.json b/config/postman/fhir-bridge.postman_collection.json index df4261a01..5753d0482 100644 --- a/config/postman/fhir-bridge.postman_collection.json +++ b/config/postman/fhir-bridge.postman_collection.json @@ -1014,7 +1014,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{baseUrl}}/fhir/DiagnosticReport", + "raw": "{{baseUrl}}/fhir/DiagnosticReport?patient.identifier={{patientId}}", "host": [ "{{baseUrl}}" ], @@ -1147,6 +1147,10 @@ "key": "subject", "value": null, "disabled": true + }, + { + "key": "patient.identifier", + "value": "{{patientId}}" } ] } @@ -1335,7 +1339,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{baseUrl}}/fhir/MedicationStatement", + "raw": "{{baseUrl}}/fhir/MedicationStatement?patient.identifier={{patientId}}", "host": [ "{{baseUrl}}" ], @@ -1434,11 +1438,6 @@ "value": null, "disabled": true }, - { - "key": "patient", - "value": null, - "disabled": true - }, { "key": "performer", "value": null, @@ -1468,6 +1467,10 @@ "key": "subject", "value": null, "disabled": true + }, + { + "key": "patient.identifier", + "value": "{{patientId}}" } ] } @@ -2209,7 +2212,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{baseUrl}}/fhir/Observation", + "raw": "{{baseUrl}}/fhir/Observation?subject.identifier={{patientId}}", "host": [ "{{baseUrl}}" ], @@ -2452,6 +2455,10 @@ "key": "value-string", "value": null, "disabled": true + }, + { + "key": "subject.identifier", + "value": "{{patientId}}" } ] } @@ -2667,7 +2674,7 @@ "response": [] }, { - "name": "Find Patient - Search", + "name": "Find Patient - search", "event": [ { "listen": "prerequest", @@ -2683,7 +2690,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{baseUrl}}/fhir/Patient?_profile=https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/Patient", + "raw": "{{baseUrl}}/fhir/Patient?identifier={{patientId}}", "host": [ "{{baseUrl}}" ], @@ -2702,10 +2709,6 @@ "value": null, "disabled": true }, - { - "key": "_profile", - "value": "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/Patient" - }, { "key": "_source", "value": null, @@ -2850,6 +2853,10 @@ "key": "telecom", "value": null, "disabled": true + }, + { + "key": "identifier", + "value": "{{patientId}}" } ] } @@ -3038,7 +3045,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{baseUrl}}/fhir/Procedure?code=80146002", + "raw": "{{baseUrl}}/fhir/Procedure?subject.identifier={{patientId}}", "host": [ "{{baseUrl}}" ], @@ -3102,10 +3109,6 @@ "value": null, "disabled": true }, - { - "key": "code", - "value": "80146002" - }, { "key": "date", "value": null, @@ -3170,6 +3173,10 @@ "key": "subject", "value": null, "disabled": true + }, + { + "key": "subject.identifier", + "value": "{{patientId}}" } ] } @@ -3202,7 +3209,7 @@ "name": "QuestionnaireResponse", "item": [ { - "name": "Create QuestionnaireResponse", + "name": "Provide Questionnaire Response - create", "event": [ { "listen": "prerequest", @@ -3219,7 +3226,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"resourceType\": \"QuestionnaireResponse\",\r\n \"questionnaire\": \"http://fhir.data4life.care/covid-19/r4/Questionnaire/covid19-recommendation|3.0.0\",\r\n \"status\": \"completed\",\r\n \"authored\": \"2020-05-04T14:15:00-05:00\",\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"item\": [\r\n {\r\n \"linkId\": \"P\",\r\n \"text\": \"Persönliche Informationen\",\r\n \"item\": [\r\n {\r\n \"linkId\": \"P0\",\r\n \"text\": \"Wie alt sind Sie?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://fhir.data4life.care/covid-19/r4/CodeSystem/age-group\",\r\n \"code\": \"61-70\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"P1\",\r\n \"text\": \"Sind Sie älter oder gleich 65 Jahre alt?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"P2\",\r\n \"text\": \"Wie ist Ihre aktuelle Wohnsituation?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA6255-9\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"P3\",\r\n \"text\": \"Pflegen oder unterstützen Sie privat mindestens einmal pro Woche eine oder mehrere Personen mit altersbedingten Beschwerden, chronischen Erkrankungen oder Gebrechlichkeit?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"P4\",\r\n \"text\": \"Sind Sie in einem der folgenden Bereiche tätig?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://fhir.data4life.care/covid-19/r4/CodeSystem/occupation-class\",\r\n \"code\": \"community\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"P5\",\r\n \"text\": \"Rauchen Sie?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"P6\",\r\n \"text\": \"Sind Sie schwanger?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA26683-5\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"C\",\r\n \"text\": \"Kontakte zu COVID-19-Fällen\",\r\n \"item\": [\r\n {\r\n \"linkId\": \"C0\",\r\n \"text\": \"Hatten Sie engen Kontakt zu einem bestätigten Fall?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"CZ\",\r\n \"text\": \"An welchem Tag war der letzte Kontakt?\",\r\n \"answer\": [\r\n {\r\n \"valueDate\": \"2020-03-27\"\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S\",\r\n \"text\": \"Symptome\",\r\n \"item\": [\r\n {\r\n \"linkId\": \"S0\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Fieber (über 38°C)?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S1\",\r\n \"text\": \"Hatten Sie in den letzten 4 Tagen Fieber (über 38°C)?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S2\",\r\n \"text\": \"Wie hoch war die höchste Temperatur ca.?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://fhir.data4life.care/covid-19/r4/CodeSystem/fever-class\",\r\n \"code\": \"40C\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S3\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Schüttelfrost?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S4\",\r\n \"text\": \"Haben Sie sich in den letzten 24 Std. schlapp oder abgeschlagen gefühlt?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S5\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Gliederschmerzen?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S6\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. anhaltenden Husten?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S7\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Schnupfen?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S8\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Durchfall?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S9\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Halsschmerzen?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"SA\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Kopfschmerzen?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"SB\",\r\n \"text\": \"Sind Sie in den letzten 24 Std. schneller außer Atem als sonst?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"SC\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Geschmacks- und/oder Geruchsverlust?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"SZ\",\r\n \"text\": \"Bezogen auf alle Fragen zu Symptomen: Seit wann haben Sie die von Ihnen angegebenen Symptome?\",\r\n \"answer\": [\r\n {\r\n \"valueDate\": \"2020-03-30\"\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"D\",\r\n \"text\": \"Kronische Erkrankungen\",\r\n \"item\": [\r\n {\r\n \"linkId\": \"D0\",\r\n \"text\": \"Wurde bei Ihnen durch einen Arzt/eine Ärztin eine chronische Lungenerkrankung festgestellt?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"D1\",\r\n \"text\": \"Wurde bei Ihnen durch einen Arzt/eine Ärztin Diabetes festgestellt?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"D2\",\r\n \"text\": \"Wurde bei Ihnen durch einen Arzt/eine Ärztin eine Herzerkrankung festgestellt?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"D3\",\r\n \"text\": \"Wurde bei Ihnen durch einen Arzt/eine Ärztin Adipositas (Fettsucht) festgestellt?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"M\",\r\n \"text\": \"Medikation\",\r\n \"item\": [\r\n {\r\n \"linkId\": \"M0\",\r\n \"text\": \"Nehmen Sie aktuell Cortison ein (in Tablettenform)?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"M1\",\r\n \"text\": \"Nehmen Sie aktuell Immunsuppressiva?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"M2\",\r\n \"text\": \"Haben Sie sich im Zeitraum von Oktober 2019 bis heute gegen Grippe impfen lassen?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"language\": \"de\"\r\n}", + "raw": "{\r\n \"resourceType\": \"QuestionnaireResponse\",\r\n \"questionnaire\": \"http://fhir.data4life.care/covid-19/r4/Questionnaire/covid19-recommendation|3.0.0\",\r\n \"status\": \"completed\",\r\n \"authored\": \"2020-05-04T14:15:00-05:00\",\r\n \"subject\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\",\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"item\": [\r\n {\r\n \"linkId\": \"P\",\r\n \"text\": \"Persönliche Informationen\",\r\n \"item\": [\r\n {\r\n \"linkId\": \"P0\",\r\n \"text\": \"Wie alt sind Sie?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://fhir.data4life.care/covid-19/r4/CodeSystem/age-group\",\r\n \"code\": \"61-70\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"P1\",\r\n \"text\": \"Sind Sie älter oder gleich 65 Jahre alt?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"P2\",\r\n \"text\": \"Wie ist Ihre aktuelle Wohnsituation?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA6255-9\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"P3\",\r\n \"text\": \"Pflegen oder unterstützen Sie privat mindestens einmal pro Woche eine oder mehrere Personen mit altersbedingten Beschwerden, chronischen Erkrankungen oder Gebrechlichkeit?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"P4\",\r\n \"text\": \"Sind Sie in einem der folgenden Bereiche tätig?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://fhir.data4life.care/covid-19/r4/CodeSystem/occupation-class\",\r\n \"code\": \"community\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"P5\",\r\n \"text\": \"Rauchen Sie?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"P6\",\r\n \"text\": \"Sind Sie schwanger?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA26683-5\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"C\",\r\n \"text\": \"Kontakte zu COVID-19-Fällen\",\r\n \"item\": [\r\n {\r\n \"linkId\": \"C0\",\r\n \"text\": \"Hatten Sie engen Kontakt zu einem bestätigten Fall?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"CZ\",\r\n \"text\": \"An welchem Tag war der letzte Kontakt?\",\r\n \"answer\": [\r\n {\r\n \"valueDate\": \"2020-03-27\"\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S\",\r\n \"text\": \"Symptome\",\r\n \"item\": [\r\n {\r\n \"linkId\": \"S0\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Fieber (über 38°C)?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S1\",\r\n \"text\": \"Hatten Sie in den letzten 4 Tagen Fieber (über 38°C)?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S2\",\r\n \"text\": \"Wie hoch war die höchste Temperatur ca.?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://fhir.data4life.care/covid-19/r4/CodeSystem/fever-class\",\r\n \"code\": \"40C\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S3\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Schüttelfrost?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S4\",\r\n \"text\": \"Haben Sie sich in den letzten 24 Std. schlapp oder abgeschlagen gefühlt?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S5\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Gliederschmerzen?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S6\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. anhaltenden Husten?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S7\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Schnupfen?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S8\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Durchfall?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S9\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Halsschmerzen?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"SA\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Kopfschmerzen?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"SB\",\r\n \"text\": \"Sind Sie in den letzten 24 Std. schneller außer Atem als sonst?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"SC\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Geschmacks- und/oder Geruchsverlust?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"SZ\",\r\n \"text\": \"Bezogen auf alle Fragen zu Symptomen: Seit wann haben Sie die von Ihnen angegebenen Symptome?\",\r\n \"answer\": [\r\n {\r\n \"valueDate\": \"2020-03-30\"\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"D\",\r\n \"text\": \"Kronische Erkrankungen\",\r\n \"item\": [\r\n {\r\n \"linkId\": \"D0\",\r\n \"text\": \"Wurde bei Ihnen durch einen Arzt/eine Ärztin eine chronische Lungenerkrankung festgestellt?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"D1\",\r\n \"text\": \"Wurde bei Ihnen durch einen Arzt/eine Ärztin Diabetes festgestellt?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"D2\",\r\n \"text\": \"Wurde bei Ihnen durch einen Arzt/eine Ärztin eine Herzerkrankung festgestellt?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"D3\",\r\n \"text\": \"Wurde bei Ihnen durch einen Arzt/eine Ärztin Adipositas (Fettsucht) festgestellt?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"M\",\r\n \"text\": \"Medikation\",\r\n \"item\": [\r\n {\r\n \"linkId\": \"M0\",\r\n \"text\": \"Nehmen Sie aktuell Cortison ein (in Tablettenform)?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"M1\",\r\n \"text\": \"Nehmen Sie aktuell Immunsuppressiva?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"M2\",\r\n \"text\": \"Haben Sie sich im Zeitraum von Oktober 2019 bis heute gegen Grippe impfen lassen?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"language\": \"de\"\r\n}", "options": { "raw": { "language": "json" @@ -3239,6 +3246,50 @@ }, "response": [] }, + { + "name": "Provide Questionnaire Response - update", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"QuestionnaireResponse\",\r\n \"questionnaire\": \"http://fhir.data4life.care/covid-19/r4/Questionnaire/covid19-recommendation|3.0.0\",\r\n \"status\": \"amended\",\r\n \"authored\": \"2020-05-04T14:15:00-05:00\",\r\n \"subject\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\",\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"item\": [\r\n {\r\n \"linkId\": \"P\",\r\n \"text\": \"Persönliche Informationen\",\r\n \"item\": [\r\n {\r\n \"linkId\": \"P0\",\r\n \"text\": \"Wie alt sind Sie?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://fhir.data4life.care/covid-19/r4/CodeSystem/age-group\",\r\n \"code\": \"61-70\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"P1\",\r\n \"text\": \"Sind Sie älter oder gleich 65 Jahre alt?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"P2\",\r\n \"text\": \"Wie ist Ihre aktuelle Wohnsituation?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA6255-9\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"P3\",\r\n \"text\": \"Pflegen oder unterstützen Sie privat mindestens einmal pro Woche eine oder mehrere Personen mit altersbedingten Beschwerden, chronischen Erkrankungen oder Gebrechlichkeit?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"P4\",\r\n \"text\": \"Sind Sie in einem der folgenden Bereiche tätig?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://fhir.data4life.care/covid-19/r4/CodeSystem/occupation-class\",\r\n \"code\": \"community\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"P5\",\r\n \"text\": \"Rauchen Sie?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"P6\",\r\n \"text\": \"Sind Sie schwanger?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA26683-5\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"C\",\r\n \"text\": \"Kontakte zu COVID-19-Fällen\",\r\n \"item\": [\r\n {\r\n \"linkId\": \"C0\",\r\n \"text\": \"Hatten Sie engen Kontakt zu einem bestätigten Fall?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"CZ\",\r\n \"text\": \"An welchem Tag war der letzte Kontakt?\",\r\n \"answer\": [\r\n {\r\n \"valueDate\": \"2020-03-27\"\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S\",\r\n \"text\": \"Symptome\",\r\n \"item\": [\r\n {\r\n \"linkId\": \"S0\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Fieber (über 38°C)?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S1\",\r\n \"text\": \"Hatten Sie in den letzten 4 Tagen Fieber (über 38°C)?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S2\",\r\n \"text\": \"Wie hoch war die höchste Temperatur ca.?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://fhir.data4life.care/covid-19/r4/CodeSystem/fever-class\",\r\n \"code\": \"40C\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S3\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Schüttelfrost?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S4\",\r\n \"text\": \"Haben Sie sich in den letzten 24 Std. schlapp oder abgeschlagen gefühlt?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S5\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Gliederschmerzen?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S6\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. anhaltenden Husten?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S7\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Schnupfen?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S8\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Durchfall?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"S9\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Halsschmerzen?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"SA\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Kopfschmerzen?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"SB\",\r\n \"text\": \"Sind Sie in den letzten 24 Std. schneller außer Atem als sonst?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"SC\",\r\n \"text\": \"Hatten Sie in den letzten 24 Std. Geschmacks- und/oder Geruchsverlust?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"SZ\",\r\n \"text\": \"Bezogen auf alle Fragen zu Symptomen: Seit wann haben Sie die von Ihnen angegebenen Symptome?\",\r\n \"answer\": [\r\n {\r\n \"valueDate\": \"2020-03-30\"\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"D\",\r\n \"text\": \"Kronische Erkrankungen\",\r\n \"item\": [\r\n {\r\n \"linkId\": \"D0\",\r\n \"text\": \"Wurde bei Ihnen durch einen Arzt/eine Ärztin eine chronische Lungenerkrankung festgestellt?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"D1\",\r\n \"text\": \"Wurde bei Ihnen durch einen Arzt/eine Ärztin Diabetes festgestellt?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"D2\",\r\n \"text\": \"Wurde bei Ihnen durch einen Arzt/eine Ärztin eine Herzerkrankung festgestellt?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"D3\",\r\n \"text\": \"Wurde bei Ihnen durch einen Arzt/eine Ärztin Adipositas (Fettsucht) festgestellt?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"M\",\r\n \"text\": \"Medikation\",\r\n \"item\": [\r\n {\r\n \"linkId\": \"M0\",\r\n \"text\": \"Nehmen Sie aktuell Cortison ein (in Tablettenform)?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"M1\",\r\n \"text\": \"Nehmen Sie aktuell Immunsuppressiva?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA32-8\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"linkId\": \"M2\",\r\n \"text\": \"Haben Sie sich im Zeitraum von Oktober 2019 bis heute gegen Grippe impfen lassen?\",\r\n \"answer\": [\r\n {\r\n \"valueCoding\": {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"LA33-6\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"language\": \"de\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/QuestionnaireResponse?patient.identifier={{patientId}}", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "QuestionnaireResponse" + ], + "query": [ + { + "key": "patient.identifier", + "value": "{{patientId}}" + } + ] + } + }, + "response": [] + }, { "name": "Find QuestionnaireResponse: read", "event": [ @@ -3334,7 +3385,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{baseUrl}}/fhir/QuestionnaireResponse?_language=de&patient=07f602e0-579e-4fe3-95af-381728bf0d46", + "raw": "{{baseUrl}}/fhir/QuestionnaireResponse?patient.identifier={{patientId}}", "host": [ "{{baseUrl}}" ], @@ -3348,10 +3399,6 @@ "value": "12", "disabled": true }, - { - "key": "_language", - "value": "de" - }, { "key": "_profile", "value": "", @@ -3417,10 +3464,6 @@ "value": null, "disabled": true }, - { - "key": "patient", - "value": "07f602e0-579e-4fe3-95af-381728bf0d46" - }, { "key": "questionnaire", "value": null, @@ -3440,6 +3483,10 @@ "key": "subject.identifier", "value": "", "disabled": true + }, + { + "key": "patient.identifier", + "value": "{{patientId}}" } ] } diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/FindQuestionnaireResponseTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/FindQuestionnaireResponseTransactionIT.java new file mode 100644 index 000000000..615c4aa5f --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/FindQuestionnaireResponseTransactionIT.java @@ -0,0 +1,55 @@ +package org.ehrbase.fhirbridge.fhir.questionnaireresponse; + +import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.QuestionnaireResponse; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +/** + * Integration Tests that validate "Find Questionnaire Response" transaction. + */ +class FindQuestionnaireResponseTransactionIT extends AbstractTransactionIT { + + @Test + void findQuestionnaireResponseRead() throws Exception { + var outcome = create("QuestionnaireResponse/transactions/provide-questionnaire-response-create.json"); + var id = outcome.getId(); + + var questionnaireResponse = read(id.getIdPart(), QuestionnaireResponse.class); + + Assertions.assertNotNull(questionnaireResponse); + Assertions.assertNotNull(questionnaireResponse.getId(), id.getIdPart()); + Assertions.assertEquals(PATIENT_ID, questionnaireResponse.getSubject().getIdentifier().getValue()); + } + + @Test + void findQuestionnaireResponseVRead() throws Exception { + var outcome = create("QuestionnaireResponse/transactions/provide-questionnaire-response-create.json"); + var id = outcome.getId(); + + var questionnaireResponse = vread(id.getIdPart(), id.getVersionIdPart(), QuestionnaireResponse.class); + Assertions.assertNotNull(questionnaireResponse); + Assertions.assertNotNull(questionnaireResponse.getId(), id.getIdPart()); + Assertions.assertNotNull(questionnaireResponse.getMeta().getVersionId(), id.getVersionIdPart()); + Assertions.assertEquals(PATIENT_ID, questionnaireResponse.getSubject().getIdentifier().getValue()); + } + + @Test + void findQuestionnaireResponseSearch() throws Exception { + create("QuestionnaireResponse/transactions/find-questionnaire-response-search.json"); + create("QuestionnaireResponse/transactions/find-questionnaire-response-search.json"); + create("QuestionnaireResponse/transactions/find-questionnaire-response-search.json"); + + Bundle bundle = search("QuestionnaireResponse?patient.identifier=" + PATIENT_ID + "&status=entered-in-error"); + + Assertions.assertEquals(3, bundle.getTotal()); + + bundle.getEntry().forEach(entry -> { + var questionnaireResponse = (QuestionnaireResponse) entry.getResource(); + + Assertions.assertEquals(PATIENT_ID, questionnaireResponse.getSubject().getIdentifier().getValue()); + Assertions.assertEquals(QuestionnaireResponse.QuestionnaireResponseStatus.ENTEREDINERROR, questionnaireResponse.getStatus()); + }); + } +} diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseTransactionIT.java new file mode 100644 index 000000000..42014871e --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseTransactionIT.java @@ -0,0 +1,39 @@ +package org.ehrbase.fhirbridge.fhir.questionnaireresponse; + +import ca.uhn.fhir.rest.api.MethodOutcome; +import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.r4.model.QuestionnaireResponse; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +/** + * Integration Tests that validate "Provide Questionnaire Response" transaction. + */ +class ProvideQuestionnaireResponseTransactionIT extends AbstractTransactionIT { + + @Test + void provideQuestionnaireResponseCreate() throws Exception { + var outcome = create("QuestionnaireResponse/transactions/provide-questionnaire-response-create.json"); + + Assertions.assertEquals(true, outcome.getCreated()); + Assertions.assertNotNull(outcome.getId().getValue()); + } + + @Test + void provideQuestionnaireResponseConditionalUpdate() throws Exception { + MethodOutcome outcome; + + outcome = create("QuestionnaireResponse/transactions/provide-questionnaire-response-create.json"); + var id = outcome.getId(); + + outcome = update("QuestionnaireResponse/transactions/provide-questionnaire-response-update.json", "QuestionnaireResponse?_id=" + id.getIdPart() + "&patient.identifier=" + PATIENT_ID); + + Assertions.assertEquals(id.getIdPart(), outcome.getId().getIdPart()); + Assertions.assertEquals(id.getVersionIdPartAsLong() + 1, outcome.getId().getVersionIdPartAsLong()); + + var questionnaireResponse = (QuestionnaireResponse) outcome.getResource(); + + Assertions.assertEquals(PATIENT_ID, questionnaireResponse.getSubject().getIdentifier().getValue()); + Assertions.assertEquals(QuestionnaireResponse.QuestionnaireResponseStatus.AMENDED, questionnaireResponse.getStatus()); + } +} diff --git a/src/test/resources/QuestionnaireResponse/transactions/find-questionnaire-response-search.json b/src/test/resources/QuestionnaireResponse/transactions/find-questionnaire-response-search.json new file mode 100644 index 000000000..c55b5f7a6 --- /dev/null +++ b/src/test/resources/QuestionnaireResponse/transactions/find-questionnaire-response-search.json @@ -0,0 +1,400 @@ +{ + "resourceType": "QuestionnaireResponse", + "questionnaire": "http://fhir.data4life.care/covid-19/r4/Questionnaire/covid19-recommendation|3.0.0", + "status": "entered-in-error", + "authored": "2020-05-04T14:15:00-05:00", + "subject": { + "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "item": [ + { + "linkId": "P", + "text": "Persönliche Informationen", + "item": [ + { + "linkId": "P0", + "text": "Wie alt sind Sie?", + "answer": [ + { + "valueCoding": { + "system": "http://fhir.data4life.care/covid-19/r4/CodeSystem/age-group", + "code": "61-70" + } + } + ] + }, + { + "linkId": "P1", + "text": "Sind Sie älter oder gleich 65 Jahre alt?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + }, + { + "linkId": "P2", + "text": "Wie ist Ihre aktuelle Wohnsituation?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA6255-9" + } + } + ] + }, + { + "linkId": "P3", + "text": "Pflegen oder unterstützen Sie privat mindestens einmal pro Woche eine oder mehrere Personen mit altersbedingten Beschwerden, chronischen Erkrankungen oder Gebrechlichkeit?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "P4", + "text": "Sind Sie in einem der folgenden Bereiche tätig?", + "answer": [ + { + "valueCoding": { + "system": "http://fhir.data4life.care/covid-19/r4/CodeSystem/occupation-class", + "code": "community" + } + } + ] + }, + { + "linkId": "P5", + "text": "Rauchen Sie?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "P6", + "text": "Sind Sie schwanger?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA26683-5" + } + } + ] + } + ] + }, + { + "linkId": "C", + "text": "Kontakte zu COVID-19-Fällen", + "item": [ + { + "linkId": "C0", + "text": "Hatten Sie engen Kontakt zu einem bestätigten Fall?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + }, + { + "linkId": "CZ", + "text": "An welchem Tag war der letzte Kontakt?", + "answer": [ + { + "valueDate": "2020-03-27" + } + ] + } + ] + }, + { + "linkId": "S", + "text": "Symptome", + "item": [ + { + "linkId": "S0", + "text": "Hatten Sie in den letzten 24 Std. Fieber (über 38°C)?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "S1", + "text": "Hatten Sie in den letzten 4 Tagen Fieber (über 38°C)?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + }, + { + "linkId": "S2", + "text": "Wie hoch war die höchste Temperatur ca.?", + "answer": [ + { + "valueCoding": { + "system": "http://fhir.data4life.care/covid-19/r4/CodeSystem/fever-class", + "code": "40C" + } + } + ] + }, + { + "linkId": "S3", + "text": "Hatten Sie in den letzten 24 Std. Schüttelfrost?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "S4", + "text": "Haben Sie sich in den letzten 24 Std. schlapp oder abgeschlagen gefühlt?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + }, + { + "linkId": "S5", + "text": "Hatten Sie in den letzten 24 Std. Gliederschmerzen?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "S6", + "text": "Hatten Sie in den letzten 24 Std. anhaltenden Husten?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + }, + { + "linkId": "S7", + "text": "Hatten Sie in den letzten 24 Std. Schnupfen?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "S8", + "text": "Hatten Sie in den letzten 24 Std. Durchfall?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "S9", + "text": "Hatten Sie in den letzten 24 Std. Halsschmerzen?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + }, + { + "linkId": "SA", + "text": "Hatten Sie in den letzten 24 Std. Kopfschmerzen?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "SB", + "text": "Sind Sie in den letzten 24 Std. schneller außer Atem als sonst?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "SC", + "text": "Hatten Sie in den letzten 24 Std. Geschmacks- und/oder Geruchsverlust?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "SZ", + "text": "Bezogen auf alle Fragen zu Symptomen: Seit wann haben Sie die von Ihnen angegebenen Symptome?", + "answer": [ + { + "valueDate": "2020-03-30" + } + ] + } + ] + }, + { + "linkId": "D", + "text": "Kronische Erkrankungen", + "item": [ + { + "linkId": "D0", + "text": "Wurde bei Ihnen durch einen Arzt/eine Ärztin eine chronische Lungenerkrankung festgestellt?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "D1", + "text": "Wurde bei Ihnen durch einen Arzt/eine Ärztin Diabetes festgestellt?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + }, + { + "linkId": "D2", + "text": "Wurde bei Ihnen durch einen Arzt/eine Ärztin eine Herzerkrankung festgestellt?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "D3", + "text": "Wurde bei Ihnen durch einen Arzt/eine Ärztin Adipositas (Fettsucht) festgestellt?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + } + ] + }, + { + "linkId": "M", + "text": "Medikation", + "item": [ + { + "linkId": "M0", + "text": "Nehmen Sie aktuell Cortison ein (in Tablettenform)?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "M1", + "text": "Nehmen Sie aktuell Immunsuppressiva?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "M2", + "text": "Haben Sie sich im Zeitraum von Oktober 2019 bis heute gegen Grippe impfen lassen?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + } + ] + } + ], + "language": "de" +} \ No newline at end of file diff --git a/src/test/resources/QuestionnaireResponse/transactions/provide-questionnaire-response-create.json b/src/test/resources/QuestionnaireResponse/transactions/provide-questionnaire-response-create.json new file mode 100644 index 000000000..7f0fa732e --- /dev/null +++ b/src/test/resources/QuestionnaireResponse/transactions/provide-questionnaire-response-create.json @@ -0,0 +1,400 @@ +{ + "resourceType": "QuestionnaireResponse", + "questionnaire": "http://fhir.data4life.care/covid-19/r4/Questionnaire/covid19-recommendation|3.0.0", + "status": "completed", + "authored": "2020-05-04T14:15:00-05:00", + "subject": { + "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "item": [ + { + "linkId": "P", + "text": "Persönliche Informationen", + "item": [ + { + "linkId": "P0", + "text": "Wie alt sind Sie?", + "answer": [ + { + "valueCoding": { + "system": "http://fhir.data4life.care/covid-19/r4/CodeSystem/age-group", + "code": "61-70" + } + } + ] + }, + { + "linkId": "P1", + "text": "Sind Sie älter oder gleich 65 Jahre alt?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + }, + { + "linkId": "P2", + "text": "Wie ist Ihre aktuelle Wohnsituation?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA6255-9" + } + } + ] + }, + { + "linkId": "P3", + "text": "Pflegen oder unterstützen Sie privat mindestens einmal pro Woche eine oder mehrere Personen mit altersbedingten Beschwerden, chronischen Erkrankungen oder Gebrechlichkeit?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "P4", + "text": "Sind Sie in einem der folgenden Bereiche tätig?", + "answer": [ + { + "valueCoding": { + "system": "http://fhir.data4life.care/covid-19/r4/CodeSystem/occupation-class", + "code": "community" + } + } + ] + }, + { + "linkId": "P5", + "text": "Rauchen Sie?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "P6", + "text": "Sind Sie schwanger?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA26683-5" + } + } + ] + } + ] + }, + { + "linkId": "C", + "text": "Kontakte zu COVID-19-Fällen", + "item": [ + { + "linkId": "C0", + "text": "Hatten Sie engen Kontakt zu einem bestätigten Fall?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + }, + { + "linkId": "CZ", + "text": "An welchem Tag war der letzte Kontakt?", + "answer": [ + { + "valueDate": "2020-03-27" + } + ] + } + ] + }, + { + "linkId": "S", + "text": "Symptome", + "item": [ + { + "linkId": "S0", + "text": "Hatten Sie in den letzten 24 Std. Fieber (über 38°C)?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "S1", + "text": "Hatten Sie in den letzten 4 Tagen Fieber (über 38°C)?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + }, + { + "linkId": "S2", + "text": "Wie hoch war die höchste Temperatur ca.?", + "answer": [ + { + "valueCoding": { + "system": "http://fhir.data4life.care/covid-19/r4/CodeSystem/fever-class", + "code": "40C" + } + } + ] + }, + { + "linkId": "S3", + "text": "Hatten Sie in den letzten 24 Std. Schüttelfrost?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "S4", + "text": "Haben Sie sich in den letzten 24 Std. schlapp oder abgeschlagen gefühlt?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + }, + { + "linkId": "S5", + "text": "Hatten Sie in den letzten 24 Std. Gliederschmerzen?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "S6", + "text": "Hatten Sie in den letzten 24 Std. anhaltenden Husten?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + }, + { + "linkId": "S7", + "text": "Hatten Sie in den letzten 24 Std. Schnupfen?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "S8", + "text": "Hatten Sie in den letzten 24 Std. Durchfall?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "S9", + "text": "Hatten Sie in den letzten 24 Std. Halsschmerzen?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + }, + { + "linkId": "SA", + "text": "Hatten Sie in den letzten 24 Std. Kopfschmerzen?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "SB", + "text": "Sind Sie in den letzten 24 Std. schneller außer Atem als sonst?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "SC", + "text": "Hatten Sie in den letzten 24 Std. Geschmacks- und/oder Geruchsverlust?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "SZ", + "text": "Bezogen auf alle Fragen zu Symptomen: Seit wann haben Sie die von Ihnen angegebenen Symptome?", + "answer": [ + { + "valueDate": "2020-03-30" + } + ] + } + ] + }, + { + "linkId": "D", + "text": "Kronische Erkrankungen", + "item": [ + { + "linkId": "D0", + "text": "Wurde bei Ihnen durch einen Arzt/eine Ärztin eine chronische Lungenerkrankung festgestellt?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "D1", + "text": "Wurde bei Ihnen durch einen Arzt/eine Ärztin Diabetes festgestellt?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + }, + { + "linkId": "D2", + "text": "Wurde bei Ihnen durch einen Arzt/eine Ärztin eine Herzerkrankung festgestellt?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "D3", + "text": "Wurde bei Ihnen durch einen Arzt/eine Ärztin Adipositas (Fettsucht) festgestellt?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + } + ] + }, + { + "linkId": "M", + "text": "Medikation", + "item": [ + { + "linkId": "M0", + "text": "Nehmen Sie aktuell Cortison ein (in Tablettenform)?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "M1", + "text": "Nehmen Sie aktuell Immunsuppressiva?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "M2", + "text": "Haben Sie sich im Zeitraum von Oktober 2019 bis heute gegen Grippe impfen lassen?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + } + ] + } + ], + "language": "de" +} \ No newline at end of file diff --git a/src/test/resources/QuestionnaireResponse/transactions/provide-questionnaire-response-update.json b/src/test/resources/QuestionnaireResponse/transactions/provide-questionnaire-response-update.json new file mode 100644 index 000000000..2aae01596 --- /dev/null +++ b/src/test/resources/QuestionnaireResponse/transactions/provide-questionnaire-response-update.json @@ -0,0 +1,400 @@ +{ + "resourceType": "QuestionnaireResponse", + "questionnaire": "http://fhir.data4life.care/covid-19/r4/Questionnaire/covid19-recommendation|3.0.0", + "status": "amended", + "authored": "2020-05-04T14:15:00-05:00", + "subject": { + "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "item": [ + { + "linkId": "P", + "text": "Persönliche Informationen", + "item": [ + { + "linkId": "P0", + "text": "Wie alt sind Sie?", + "answer": [ + { + "valueCoding": { + "system": "http://fhir.data4life.care/covid-19/r4/CodeSystem/age-group", + "code": "61-70" + } + } + ] + }, + { + "linkId": "P1", + "text": "Sind Sie älter oder gleich 65 Jahre alt?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + }, + { + "linkId": "P2", + "text": "Wie ist Ihre aktuelle Wohnsituation?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA6255-9" + } + } + ] + }, + { + "linkId": "P3", + "text": "Pflegen oder unterstützen Sie privat mindestens einmal pro Woche eine oder mehrere Personen mit altersbedingten Beschwerden, chronischen Erkrankungen oder Gebrechlichkeit?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "P4", + "text": "Sind Sie in einem der folgenden Bereiche tätig?", + "answer": [ + { + "valueCoding": { + "system": "http://fhir.data4life.care/covid-19/r4/CodeSystem/occupation-class", + "code": "community" + } + } + ] + }, + { + "linkId": "P5", + "text": "Rauchen Sie?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "P6", + "text": "Sind Sie schwanger?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA26683-5" + } + } + ] + } + ] + }, + { + "linkId": "C", + "text": "Kontakte zu COVID-19-Fällen", + "item": [ + { + "linkId": "C0", + "text": "Hatten Sie engen Kontakt zu einem bestätigten Fall?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + }, + { + "linkId": "CZ", + "text": "An welchem Tag war der letzte Kontakt?", + "answer": [ + { + "valueDate": "2020-03-27" + } + ] + } + ] + }, + { + "linkId": "S", + "text": "Symptome", + "item": [ + { + "linkId": "S0", + "text": "Hatten Sie in den letzten 24 Std. Fieber (über 38°C)?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "S1", + "text": "Hatten Sie in den letzten 4 Tagen Fieber (über 38°C)?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + }, + { + "linkId": "S2", + "text": "Wie hoch war die höchste Temperatur ca.?", + "answer": [ + { + "valueCoding": { + "system": "http://fhir.data4life.care/covid-19/r4/CodeSystem/fever-class", + "code": "40C" + } + } + ] + }, + { + "linkId": "S3", + "text": "Hatten Sie in den letzten 24 Std. Schüttelfrost?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "S4", + "text": "Haben Sie sich in den letzten 24 Std. schlapp oder abgeschlagen gefühlt?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + }, + { + "linkId": "S5", + "text": "Hatten Sie in den letzten 24 Std. Gliederschmerzen?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "S6", + "text": "Hatten Sie in den letzten 24 Std. anhaltenden Husten?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + }, + { + "linkId": "S7", + "text": "Hatten Sie in den letzten 24 Std. Schnupfen?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "S8", + "text": "Hatten Sie in den letzten 24 Std. Durchfall?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "S9", + "text": "Hatten Sie in den letzten 24 Std. Halsschmerzen?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + }, + { + "linkId": "SA", + "text": "Hatten Sie in den letzten 24 Std. Kopfschmerzen?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "SB", + "text": "Sind Sie in den letzten 24 Std. schneller außer Atem als sonst?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "SC", + "text": "Hatten Sie in den letzten 24 Std. Geschmacks- und/oder Geruchsverlust?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "SZ", + "text": "Bezogen auf alle Fragen zu Symptomen: Seit wann haben Sie die von Ihnen angegebenen Symptome?", + "answer": [ + { + "valueDate": "2020-03-30" + } + ] + } + ] + }, + { + "linkId": "D", + "text": "Kronische Erkrankungen", + "item": [ + { + "linkId": "D0", + "text": "Wurde bei Ihnen durch einen Arzt/eine Ärztin eine chronische Lungenerkrankung festgestellt?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "D1", + "text": "Wurde bei Ihnen durch einen Arzt/eine Ärztin Diabetes festgestellt?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + }, + { + "linkId": "D2", + "text": "Wurde bei Ihnen durch einen Arzt/eine Ärztin eine Herzerkrankung festgestellt?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "D3", + "text": "Wurde bei Ihnen durch einen Arzt/eine Ärztin Adipositas (Fettsucht) festgestellt?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + } + ] + }, + { + "linkId": "M", + "text": "Medikation", + "item": [ + { + "linkId": "M0", + "text": "Nehmen Sie aktuell Cortison ein (in Tablettenform)?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "M1", + "text": "Nehmen Sie aktuell Immunsuppressiva?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA32-8" + } + } + ] + }, + { + "linkId": "M2", + "text": "Haben Sie sich im Zeitraum von Oktober 2019 bis heute gegen Grippe impfen lassen?", + "answer": [ + { + "valueCoding": { + "system": "http://loinc.org", + "code": "LA33-6" + } + } + ] + } + ] + } + ], + "language": "de" +} \ No newline at end of file From 54a3a3ccafec2bd706f73cf30bbe8e835e179949 Mon Sep 17 00:00:00 2001 From: zhu13 <yufei.zhu@med.uni-goettingen.de> Date: Mon, 31 May 2021 11:38:11 +0200 Subject: [PATCH 086/141] fix code smell & add test cases --- .../camel/route/EncounterRoutes.java | 2 +- .../config/ConversionConfiguration.java | 4 +- .../ehr/converter/ConversionService.java | 4 +- .../ehr/converter/generic/TimeConverter.java | 26 +- ...tientenAufenthaltCompositionConverter.java | 169 +++-------- ...sorgungsaufenthaltAdminEntryConverter.java | 103 +++++++ .../AufnahmedatenAdminEntryConverter.java | 77 +++++ .../EntlassungsdatenAdminEntryConverter.java | 50 ++++ ...erVersorgungsfallCompositionConverter.java | 83 +----- .../fhirbridge/fhir/common/Profile.java | 6 +- .../fhirbridge/fhir/support/Encounters.java | 35 ++- .../KontaktGesundheitAbteilingIT.java | 106 +++++++ .../KontaktGesundheitEinrichtungIT.java | 104 +++++++ ...alt-fachabteilungs-schluessel-invalid.json | 130 ++++++++ ...aufenthalt-kontakt-ebene-code-invalid.json | 130 ++++++++ ...alt-kontakt-ebene-code-system-invalid.json | 130 ++++++++ ...nten-aufenthalt-location-type-invalid.json | 130 ++++++++ .../create-patienten-aufenthalt.json | 130 ++++++++ ...ersorgungsfall-aufnahmeanlass-invalid.json | 88 ++++++ ...versorgungsfall-aufnahmegrund-invalid.json | 88 ++++++ ...at-versorgungsfall-entlassung-invalid.json | 88 ++++++ .../create-stationaer-versorgungsfall.json | 88 ++++++ .../paragon-patienten-aufenthalt.json | 232 +++++++++++++++ .../paragon-stat-versorgungsfall.json | 279 ++++++++++++++++++ 24 files changed, 2051 insertions(+), 231 deletions(-) create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/VersorgungsaufenthaltAdminEntryConverter.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/AufnahmedatenAdminEntryConverter.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/EntlassungsdatenAdminEntryConverter.java create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/encounter/KontaktGesundheitAbteilingIT.java create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/encounter/KontaktGesundheitEinrichtungIT.java create mode 100644 src/test/resources/Encounter/create-patienten-aufenthalt-fachabteilungs-schluessel-invalid.json create mode 100644 src/test/resources/Encounter/create-patienten-aufenthalt-kontakt-ebene-code-invalid.json create mode 100644 src/test/resources/Encounter/create-patienten-aufenthalt-kontakt-ebene-code-system-invalid.json create mode 100644 src/test/resources/Encounter/create-patienten-aufenthalt-location-type-invalid.json create mode 100644 src/test/resources/Encounter/create-patienten-aufenthalt.json create mode 100644 src/test/resources/Encounter/create-stat-versorgungsfall-aufnahmeanlass-invalid.json create mode 100644 src/test/resources/Encounter/create-stat-versorgungsfall-aufnahmegrund-invalid.json create mode 100644 src/test/resources/Encounter/create-stat-versorgungsfall-entlassung-invalid.json create mode 100644 src/test/resources/Encounter/create-stationaer-versorgungsfall.json create mode 100644 src/test/resources/Encounter/paragon-patienten-aufenthalt.json create mode 100644 src/test/resources/Encounter/paragon-stat-versorgungsfall.json diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java index 60edb2486..964a013f5 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java @@ -44,7 +44,7 @@ public void configure() throws Exception { .process("ehrIdLookupProcessor") .setHeader(FhirBridgeConstants.PROFILE, method(Encounters.class, "getProfileByKontaktEbene")) .choice() - .when(header(FhirBridgeConstants.PROFILE).isEqualTo(Profile.PATIENTEN_AUFENTHALT)) + .when(header(FhirBridgeConstants.PROFILE).isEqualTo(Profile.KONTAKT_GESUNDHEIT_ABTEILUNG)) .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") .to("ehr-composition:compositionEndpoint?operation=mergeCompositionEntity") .process("resourceResponseProcessor") diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java index 01773f856..1fe0d90f5 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java @@ -144,7 +144,7 @@ private void registerMedicationStatementConverter(ConversionService conversionSe } private void registerEncounterConverter(ConversionService conversionService) { - conversionService.registerConverter(Profile.STATIONAERER_VERSORGUNGSFALL, new StationaererVersorgungsfallCompositionConverter()); - conversionService.registerConverter(Profile.PATIENTEN_AUFENTHALT, new PatientenAufenthaltCompositionConverter()); + conversionService.registerConverter(Profile.KONTAKT_GESUNDHEIT_EINRICHTUNG, new StationaererVersorgungsfallCompositionConverter()); + conversionService.registerConverter(Profile.KONTAKT_GESUNDHEIT_ABTEILUNG, new PatientenAufenthaltCompositionConverter()); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/ConversionService.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/ConversionService.java index 43fe912e1..8ebe0dea7 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/ConversionService.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/ConversionService.java @@ -43,11 +43,11 @@ public Object convert(Profile profile, Resource resource) { public Object convertDefaultEncounter(Resource resource) { - if(!converters.containsKey(Profile.STATIONAERER_VERSORGUNGSFALL)) { + if(!converters.containsKey(Profile.KONTAKT_GESUNDHEIT_EINRICHTUNG)) { throw new ConversionException("No converter available for encounter with profile stationär Versorgungsfall" ); } - return converters.get(Profile.STATIONAERER_VERSORGUNGSFALL) + return converters.get(Profile.KONTAKT_GESUNDHEIT_EINRICHTUNG) .convert(resource); } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java index 04e2563b0..2e6a64057 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java @@ -145,11 +145,11 @@ public static TemporalAccessor convertAgeExtensionTime(Extension extension) { return dateTimeOfDocumentationDt.getValueAsCalendar().toZonedDateTime(); } - static TemporalAccessor convertEncounterTime(Encounter encounter) { + public static TemporalAccessor convertEncounterTime(Encounter encounter) { return OffsetDateTime.from(encounter.getPeriod().getStartElement().getValueAsCalendar().toZonedDateTime()); } - static Optional<TemporalAccessor> convertEncounterEndTime(Encounter encounter) { + public static Optional<TemporalAccessor> convertEncounterEndTime(Encounter encounter) { if (encounter.getPeriod().hasEndElement()) { return Optional.of(OffsetDateTime.from(encounter.getPeriod().getEndElement().getValueAsCalendar().toZonedDateTime())); @@ -157,4 +157,26 @@ static Optional<TemporalAccessor> convertEncounterEndTime(Encounter encounter) { return Optional.empty(); } } + + public static Optional<TemporalAccessor> convertEncounterLocationTime(Encounter.EncounterLocationComponent location) { + + if (location.getPeriod() == null) { + return Optional.empty(); + } + + return Optional.of(OffsetDateTime.from(location.getPeriod().getStartElement().getValueAsCalendar().toZonedDateTime())); + } + + public static Optional<TemporalAccessor> convertEncounterLocationEndTime(Encounter.EncounterLocationComponent location) { + + if (location.getPeriod() == null) { + return Optional.empty(); + } + + if (!location.getPeriod().hasEndElement()) { + return Optional.empty(); + } + + return Optional.of(OffsetDateTime.from(location.getPeriod().getEndElement().getValueAsCalendar().toZonedDateTime())); + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java index 521de9836..9108f83bd 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java @@ -1,171 +1,78 @@ package org.ehrbase.fhirbridge.ehr.converter.specific.patientenaufenthalt; +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.ehrbase.fhirbridge.ehr.converter.generic.EncounterToCompositionConverter; import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.PatientenaufenthaltComposition; import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.AbteilungsfallCluster; -import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.FachlicheOrganisationseinheitCluster; -import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.StandortCluster; -import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungsaufenthaltAdminEntry; import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungsfallCluster; import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungstellenkontaktCluster; -import org.ehrbase.fhirbridge.fhir.support.KontaktebeneDefiningCode; -import org.ehrbase.client.classgenerator.shareddefinition.Language; import static org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem.KONTAKT_EBENE; +import org.ehrbase.fhirbridge.fhir.support.Encounters; import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.Encounter; import org.hl7.fhir.r4.model.Identifier; import org.springframework.lang.NonNull; -import com.nedap.archie.rm.generic.PartySelf; - -import java.time.OffsetDateTime; -import java.util.ArrayList; public class PatientenAufenthaltCompositionConverter extends EncounterToCompositionConverter<PatientenaufenthaltComposition> { - private static final String FACH_ABTEILUNGS_SCHLUESSEL_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel"; - @Override public PatientenaufenthaltComposition convertInternal(@NonNull Encounter encounter) { PatientenaufenthaltComposition retVal = new PatientenaufenthaltComposition(); - if (encounter.getIdentifier() != null && encounter.getIdentifier().size() > 0) { - - Identifier encounterIdentifier = encounter.getIdentifier().get(0); - - if (encounter.getType() != null && encounter.getType().size() > 0 - && encounter.getType().get(0).getCoding().get(0).getSystem().equals(KONTAKT_EBENE.getUrl())) { - - String typeCode = encounter.getType().get(0).getCoding().get(0).getCode(); - - switch (typeCode) { - - case "Einrichtungskontakt": { - VersorgungsfallCluster versorgungsfallCluster = new VersorgungsfallCluster(); - versorgungsfallCluster.setZugehoerigerVersorgungsfallKennungValue(encounterIdentifier.getValue()); - retVal.setVersorgungsfall(versorgungsfallCluster); - break; - } - case "Abteilungskontakt": { - AbteilungsfallCluster abteilungsfallCluster = new AbteilungsfallCluster(); - abteilungsfallCluster.setZugehoerigerAbteilungsfallKennungValue(encounterIdentifier.getValue()); - retVal.setAbteilungsfall(abteilungsfallCluster); - break; - } - case "Versorgungsstellenkontakt": { - VersorgungstellenkontaktCluster versorgungstellenkontaktCluster = new VersorgungstellenkontaktCluster(); - versorgungstellenkontaktCluster.setZugehoerigerVersorgungsstellenkontaktKennungValue(encounterIdentifier.getValue()); - retVal.setVersorgungstellenkontakt(versorgungstellenkontaktCluster); - break; - } - default: { - throw new IllegalStateException("Invalid Code " + typeCode + - " or Code System as 'Kontaktebene', valid codes are einrichtungskontakt, abteilungskontakt, versorgungsstellenkontakt."); - } - } - } - } - - retVal.setVersorgungsaufenthalt(convertAdminEntry(encounter)); - - return retVal; - } - - private VersorgungsaufenthaltAdminEntry convertAdminEntry(Encounter encounter) { - - VersorgungsaufenthaltAdminEntry versorgungsaufenthaltAdminEntry = new VersorgungsaufenthaltAdminEntry(); - - versorgungsaufenthaltAdminEntry.setSubject(new PartySelf()); - versorgungsaufenthaltAdminEntry.setLanguage(Language.DE); + if (Encounters.isNotEmpty(encounter.getIdentifier())) { - if(encounter.getLocation() != null - && encounter.getLocation().size() > 0) { + if (Encounters.isNotEmpty(encounter.getType())) { - Encounter.EncounterLocationComponent location = encounter.getLocation().get(0); - - if (location.getPeriod() != null) { - OffsetDateTime begin = OffsetDateTime.from(location.getPeriod().getStartElement().getValueAsCalendar().toZonedDateTime()); - versorgungsaufenthaltAdminEntry.setBeginnValue(begin); - - if (location.getPeriod().hasEndElement()) { - OffsetDateTime end = OffsetDateTime.from(location.getPeriod().getEndElement().getValueAsCalendar().toZonedDateTime()); - versorgungsaufenthaltAdminEntry.setEndeValue(end); - } + setFallCluster(retVal, encounter); } - - versorgungsaufenthaltAdminEntry.setStandort(convertStandortCluster(location)); - - versorgungsaufenthaltAdminEntry.setKommentarValue(location.getLocation().getDisplay()); } - versorgungsaufenthaltAdminEntry.setFachlicheOrganisationseinheit(createFachlicheOrganisationseinheitClusterList(encounter)); - - return versorgungsaufenthaltAdminEntry; - } + retVal.setVersorgungsaufenthalt(new VersorgungsaufenthaltAdminEntryConverter().convert(encounter)); - private StandortCluster convertStandortCluster(Encounter.EncounterLocationComponent location) { - - // location physical type / name -> standort - String locationPhysicalType = location.getPhysicalType().getCoding().get(0).getCode(); - - String locationName = location.getPhysicalType().getText(); - StandortCluster standortCluster = new StandortCluster(); - - if (locationName != null && !locationName.isEmpty()) { - - switch (locationPhysicalType) { - case "si": - standortCluster.setCampusValue(locationName); - break; - case "bu": - standortCluster.setGebaeudegruppeValue(locationName); - break; - case "lvl": - standortCluster.setEbeneValue(locationName); - break; - case "wa": - standortCluster.setStationValue(locationName); - break; - case "ro": - standortCluster.setZimmerValue(locationName); - break; - case "bd": - standortCluster.setBettplatzValue(locationName); - break; - default: // other types aren't needed by EHR Composition - throw new IllegalStateException("unexpected location physical type " + locationPhysicalType + - " by EHR composition."); - } - } - - return standortCluster; + return retVal; } - private ArrayList<FachlicheOrganisationseinheitCluster> createFachlicheOrganisationseinheitClusterList(Encounter encounter) { + private void setFallCluster(PatientenaufenthaltComposition composition, Encounter encounter) { - ArrayList<FachlicheOrganisationseinheitCluster> retVal = new ArrayList<>(); + Coding coding = encounter.getType().get(0).getCoding().get(0); - if (encounter.getServiceType() != null - && encounter.getServiceType().getCoding() != null) { + if (!coding.getSystem().equals(KONTAKT_EBENE.getUrl())) { - for(Coding fachAbteilungsSchluessel : encounter.getServiceType().getCoding()) { + throw new UnprocessableEntityException("Invalid Code system " + coding.getSystem() + + " valid code system: " + KONTAKT_EBENE.getUrl()); + } - FachlicheOrganisationseinheitCluster fachlicheOrganisationseinheitCluster = new FachlicheOrganisationseinheitCluster(); + Identifier encounterIdentifier = encounter.getIdentifier().get(0); - if (fachAbteilungsSchluessel.getSystem().equals(FACH_ABTEILUNGS_SCHLUESSEL_CODE_SYSTEM) - && FachAbteilungsSchluesselDefiningCodeMap.getFachAbteilungsSchluesselMap().containsKey(fachAbteilungsSchluessel.getCode())) { + String typeCode = coding.getCode(); - fachlicheOrganisationseinheitCluster.setFachabteilungsschluesselDefiningCode(FachAbteilungsSchluesselDefiningCodeMap.getFachAbteilungsSchluesselMap().get(fachAbteilungsSchluessel.getCode())); - } else { - throw new IllegalStateException("Invalid Code " + fachAbteilungsSchluessel.getCode() + - " or Code System for 'Fachabteilungsschlüssel'."); - } + switch (typeCode) { - retVal.add(fachlicheOrganisationseinheitCluster); + case "einrichtungskontakt": { + VersorgungsfallCluster versorgungsfallCluster = new VersorgungsfallCluster(); + versorgungsfallCluster.setZugehoerigerVersorgungsfallKennungValue(encounterIdentifier.getValue()); + composition.setVersorgungsfall(versorgungsfallCluster); + break; + } + case "abteilungskontakt": { + AbteilungsfallCluster abteilungsfallCluster = new AbteilungsfallCluster(); + abteilungsfallCluster.setZugehoerigerAbteilungsfallKennungValue(encounterIdentifier.getValue()); + composition.setAbteilungsfall(abteilungsfallCluster); + break; + } + case "versorgungsstellenkontakt": { + VersorgungstellenkontaktCluster versorgungstellenkontaktCluster = new VersorgungstellenkontaktCluster(); + versorgungstellenkontaktCluster.setZugehoerigerVersorgungsstellenkontaktKennungValue(encounterIdentifier.getValue()); + composition.setVersorgungstellenkontakt(versorgungstellenkontaktCluster); + break; + } + default: { + throw new UnprocessableEntityException("Invalid Code " + typeCode + + " or Code System as 'Kontaktebene', valid codes are einrichtungskontakt, abteilungskontakt, versorgungsstellenkontakt."); } } - - return retVal; } + } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/VersorgungsaufenthaltAdminEntryConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/VersorgungsaufenthaltAdminEntryConverter.java new file mode 100644 index 000000000..532b6cde0 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/VersorgungsaufenthaltAdminEntryConverter.java @@ -0,0 +1,103 @@ +package org.ehrbase.fhirbridge.ehr.converter.specific.patientenaufenthalt; + +import org.ehrbase.fhirbridge.ehr.converter.generic.EntryEntityConverter; +import org.ehrbase.fhirbridge.ehr.converter.generic.TimeConverter; +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungsaufenthaltAdminEntry; +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.FachlicheOrganisationseinheitCluster; +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.StandortCluster; +import org.ehrbase.fhirbridge.fhir.support.Encounters; +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import org.hl7.fhir.r4.model.Encounter; +import org.hl7.fhir.r4.model.Coding; +import java.util.ArrayList; + +public class VersorgungsaufenthaltAdminEntryConverter extends EntryEntityConverter<Encounter, VersorgungsaufenthaltAdminEntry> { + + private static final String FACH_ABTEILUNGS_SCHLUESSEL_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel"; + + @Override + protected VersorgungsaufenthaltAdminEntry convertInternal(Encounter encounter) { + VersorgungsaufenthaltAdminEntry versorgungsaufenthaltAdminEntry = new VersorgungsaufenthaltAdminEntry(); + + if(Encounters.isNotEmpty(encounter.getLocation())) { + + Encounter.EncounterLocationComponent location = encounter.getLocation().get(0); + + TimeConverter.convertEncounterLocationTime(location).ifPresent(versorgungsaufenthaltAdminEntry::setBeginnValue); + TimeConverter.convertEncounterLocationEndTime(location).ifPresent(versorgungsaufenthaltAdminEntry::setEndeValue); + + versorgungsaufenthaltAdminEntry.setStandort(convertStandortCluster(location)); + + versorgungsaufenthaltAdminEntry.setKommentarValue(location.getLocation().getDisplay()); + } + + versorgungsaufenthaltAdminEntry.setFachlicheOrganisationseinheit(createFachlicheOrganisationseinheitClusterList(encounter)); + + return versorgungsaufenthaltAdminEntry; + } + + private StandortCluster convertStandortCluster(Encounter.EncounterLocationComponent location) { + + // location physical type / name -> standort + String locationPhysicalType = location.getPhysicalType().getCoding().get(0).getCode(); + + String locationName = location.getPhysicalType().getText(); + StandortCluster standortCluster = new StandortCluster(); + + if (locationName != null && !locationName.isEmpty()) { + + switch (locationPhysicalType) { + case "si": + standortCluster.setCampusValue(locationName); + break; + case "bu": + standortCluster.setGebaeudegruppeValue(locationName); + break; + case "lvl": + standortCluster.setEbeneValue(locationName); + break; + case "wa": + standortCluster.setStationValue(locationName); + break; + case "ro": + standortCluster.setZimmerValue(locationName); + break; + case "bd": + standortCluster.setBettplatzValue(locationName); + break; + default: // other types aren't needed by EHR Composition + throw new UnprocessableEntityException("unexpected location physical type " + locationPhysicalType + + " by EHR composition."); + } + } + + return standortCluster; + } + + private ArrayList<FachlicheOrganisationseinheitCluster> createFachlicheOrganisationseinheitClusterList(Encounter encounter) { + + ArrayList<FachlicheOrganisationseinheitCluster> retVal = new ArrayList<>(); + + if (encounter.getServiceType() != null + && encounter.getServiceType().getCoding() != null) { + + for(Coding fachAbteilungsSchluessel : encounter.getServiceType().getCoding()) { + + FachlicheOrganisationseinheitCluster fachlicheOrganisationseinheitCluster = new FachlicheOrganisationseinheitCluster(); + + if (fachAbteilungsSchluessel.getSystem().equals(FACH_ABTEILUNGS_SCHLUESSEL_CODE_SYSTEM) + && FachAbteilungsSchluesselDefiningCodeMap.getFachAbteilungsSchluesselMap().containsKey(fachAbteilungsSchluessel.getCode())) { + + fachlicheOrganisationseinheitCluster.setFachabteilungsschluesselDefiningCode(FachAbteilungsSchluesselDefiningCodeMap.getFachAbteilungsSchluesselMap().get(fachAbteilungsSchluessel.getCode())); + } else { + throw new UnprocessableEntityException("Invalid Code " + fachAbteilungsSchluessel.getCode() + + " or Code System for 'Fachabteilungsschlüssel'."); + } + + retVal.add(fachlicheOrganisationseinheitCluster); + } + } + + return retVal; + } +} \ No newline at end of file diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/AufnahmedatenAdminEntryConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/AufnahmedatenAdminEntryConverter.java new file mode 100644 index 000000000..f73374d88 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/AufnahmedatenAdminEntryConverter.java @@ -0,0 +1,77 @@ +package org.ehrbase.fhirbridge.ehr.converter.specific.stationaererversorgungsfall; + +import org.ehrbase.fhirbridge.ehr.converter.generic.EntryEntityConverter; +import org.ehrbase.fhirbridge.ehr.converter.generic.TimeConverter; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.AufnahmedatenAdminEntry; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.AufnahmeanlassDefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.AufnahmegrundDefiningCode; +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import org.hl7.fhir.r4.model.Encounter; +import org.hl7.fhir.r4.model.Coding; +import java.util.Optional; + + +public class AufnahmedatenAdminEntryConverter extends EntryEntityConverter<Encounter, AufnahmedatenAdminEntry> { + + private static final String AUFNAHME_GRUND_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund"; + private static final String AUFNAHME_ANLASS_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass"; + private static final String INVALID_CODE = "Invalid Code "; + + @Override + protected AufnahmedatenAdminEntry convertInternal(Encounter encounter) { + + AufnahmedatenAdminEntry aufnahmedatenAdminEntry = new AufnahmedatenAdminEntry(); + + aufnahmedatenAdminEntry.setDatumUhrzeitDerAufnahmeValue(TimeConverter.convertEncounterTime(encounter)); + + convertAufnahmegrundDefiningCode(encounter).ifPresent(aufnahmedatenAdminEntry::setAufnahmegrundDefiningCode); + + convertAufnahmeanlassDefiningCode(encounter).ifPresent(aufnahmedatenAdminEntry::setAufnahmeanlassDefiningCode); + + return aufnahmedatenAdminEntry; + } + + private Optional<AufnahmegrundDefiningCode> convertAufnahmegrundDefiningCode(Encounter encounter) { + + if (encounter.getReasonCode() == null) { + return Optional.empty(); + } + + if (encounter.getReasonCode().get(0).getCoding() == null) { + return Optional.empty(); + } + + Coding aufnahmeGrund = encounter.getReasonCode().get(0).getCoding().get(0); + + if (aufnahmeGrund.getSystem().equals(AUFNAHME_GRUND_CODE_SYSTEM) + && StationaererVersorgungsfallDefiningCodeMaps.getAufnahmeGrundMap().containsKey(aufnahmeGrund.getCode())) { + + return Optional.of(StationaererVersorgungsfallDefiningCodeMaps.getAufnahmeGrundMap().get(aufnahmeGrund.getCode())); + } else { + throw new UnprocessableEntityException(INVALID_CODE + aufnahmeGrund.getCode() + + " or Code System for mapping of 'Aufnahmegrund', valid codes are: 01, 02, 03, 04, 05, 06, 07, 08, 10."); + } + } + + private Optional<AufnahmeanlassDefiningCode> convertAufnahmeanlassDefiningCode(Encounter encounter) { + + if (encounter.getHospitalization() == null) { + return Optional.empty(); + } + + if (encounter.getHospitalization().getAdmitSource() == null) { + return Optional.empty(); + } + + Coding aufnahmeAnlass = encounter.getHospitalization().getAdmitSource().getCoding().get(0); + + if (aufnahmeAnlass.getSystem().equals(AUFNAHME_ANLASS_CODE_SYSTEM) + && StationaererVersorgungsfallDefiningCodeMaps.getAufnahmeAnlassMap().containsKey(aufnahmeAnlass.getCode())) { + + return Optional.of(StationaererVersorgungsfallDefiningCodeMaps.getAufnahmeAnlassMap().get(aufnahmeAnlass.getCode())); + } else { + throw new UnprocessableEntityException(INVALID_CODE + aufnahmeAnlass.getCode() + + " or Code System for mapping of 'Aufnahmeanlass', valid codes are: N, G, E, A, V, Z, B, R."); + } + } +} \ No newline at end of file diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/EntlassungsdatenAdminEntryConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/EntlassungsdatenAdminEntryConverter.java new file mode 100644 index 000000000..78d569810 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/EntlassungsdatenAdminEntryConverter.java @@ -0,0 +1,50 @@ +package org.ehrbase.fhirbridge.ehr.converter.specific.stationaererversorgungsfall; + +import org.ehrbase.fhirbridge.ehr.converter.generic.EntryEntityConverter; +import org.ehrbase.fhirbridge.ehr.converter.generic.TimeConverter; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.EntlassungsdatenAdminEntry; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.ArtDerEntlassungDefiningCode; +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import org.hl7.fhir.r4.model.Encounter; +import org.hl7.fhir.r4.model.Coding; +import java.util.Optional; + + +public class EntlassungsdatenAdminEntryConverter extends EntryEntityConverter<Encounter, EntlassungsdatenAdminEntry>{ + + private static final String ART_DER_ENTLASSUNG_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund"; + + @Override + protected EntlassungsdatenAdminEntry convertInternal(Encounter encounter) { + + EntlassungsdatenAdminEntry entlassungsdatenAdminEntry = new EntlassungsdatenAdminEntry(); + + TimeConverter.convertEncounterEndTime(encounter).ifPresent(entlassungsdatenAdminEntry::setDatumUhrzeitDerEntlassungValue); + + convertArtDerEntlassungDefiningCode(encounter).ifPresent(entlassungsdatenAdminEntry::setArtDerEntlassungDefiningCode); + + return entlassungsdatenAdminEntry; + } + + private Optional<ArtDerEntlassungDefiningCode> convertArtDerEntlassungDefiningCode(Encounter encounter) { + + if (encounter.getHospitalization() == null) { + return Optional.empty(); + } + + if (encounter.getHospitalization().getDischargeDisposition() == null) { + return Optional.empty(); + } + + Coding artDerEntlassung = encounter.getHospitalization().getDischargeDisposition().getCoding().get(0); + + if (artDerEntlassung.getSystem().equals(ART_DER_ENTLASSUNG_CODE_SYSTEM) + && StationaererVersorgungsfallDefiningCodeMaps.getArtDerEntlassungMap().containsKey(artDerEntlassung.getCode())) { + + return Optional.of(StationaererVersorgungsfallDefiningCodeMaps.getArtDerEntlassungMap().get(artDerEntlassung.getCode())); + } else { + throw new UnprocessableEntityException("Invalid Code " + artDerEntlassung.getCode() + + " or Code System for mapping of 'art der Entlassung'."); + } + } +} \ No newline at end of file diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallCompositionConverter.java index 0d8f825e3..d4f426fb5 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallCompositionConverter.java @@ -1,25 +1,13 @@ package org.ehrbase.fhirbridge.ehr.converter.specific.stationaererversorgungsfall; -import com.nedap.archie.rm.generic.PartySelf; import org.ehrbase.fhirbridge.ehr.converter.generic.EncounterToCompositionConverter; import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.StationaererVersorgungsfallComposition; -import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.AufnahmedatenAdminEntry; -import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.EntlassungsdatenAdminEntry; import org.ehrbase.fhirbridge.fhir.support.KontaktebeneDefiningCode; -import org.ehrbase.client.classgenerator.shareddefinition.Language; import org.hl7.fhir.r4.model.Encounter; -import org.hl7.fhir.r4.model.Coding; import org.springframework.lang.NonNull; -import java.time.OffsetDateTime; - public class StationaererVersorgungsfallCompositionConverter extends EncounterToCompositionConverter<StationaererVersorgungsfallComposition> { - private static final String AUFNAHME_GRUND_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund"; - private static final String AUFNAHME_ANLASS_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass"; - private static final String ART_DER_ENTLASSUNG_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund"; - private static final String INVALID_CODE = "Invalid Code "; - @Override public StationaererVersorgungsfallComposition convertInternal(@NonNull Encounter encounter) { @@ -37,81 +25,14 @@ public StationaererVersorgungsfallComposition convertInternal(@NonNull Encounter retVal.setFallstatusDefiningCode(StationaererVersorgungsfallDefiningCodeMaps.getFallStatusMap().get(encounter.getStatus())); retVal.setFallKennungValue(encounter.getIdentifier().get(0).getValue()); - retVal.setAufnahmedaten(createAufnahmedatenAdminEntry(encounter)); + retVal.setAufnahmedaten(new AufnahmedatenAdminEntryConverter().convert(encounter)); if (encounter.getPeriod().hasEndElement()) { - retVal.setEntlassungsdaten(createEntlassungsdatenAdminEntry(encounter)); + retVal.setEntlassungsdaten(new EntlassungsdatenAdminEntryConverter().convert(encounter)); } return retVal; } - private AufnahmedatenAdminEntry createAufnahmedatenAdminEntry(Encounter encounter) { - AufnahmedatenAdminEntry aufnahmedatenAdminEntry = new AufnahmedatenAdminEntry(); - - OffsetDateTime startDateTime = OffsetDateTime.from(encounter.getPeriod().getStartElement().getValueAsCalendar().toZonedDateTime()); - aufnahmedatenAdminEntry.setDatumUhrzeitDerAufnahmeValue(startDateTime); - - if (encounter.getReasonCode() != null - && encounter.getReasonCode().get(0).getCoding() != null) { - - Coding aufnahmeGrund = encounter.getReasonCode().get(0).getCoding().get(0); - if (aufnahmeGrund.getSystem().equals(AUFNAHME_GRUND_CODE_SYSTEM) - && StationaererVersorgungsfallDefiningCodeMaps.getAufnahmeGrundMap().containsKey(aufnahmeGrund.getCode())) { - - aufnahmedatenAdminEntry.setAufnahmegrundDefiningCode(StationaererVersorgungsfallDefiningCodeMaps.getAufnahmeGrundMap().get(aufnahmeGrund.getCode())); - } else { - throw new IllegalStateException(INVALID_CODE + aufnahmeGrund.getCode() + - " or Code System for mapping of 'Aufnahmegrund', valid codes are: 01, 02, 03, 04, 05, 06, 07, 08, 10."); - } - } - - if (encounter.getHospitalization() != null - && encounter.getHospitalization().getAdmitSource() != null) { - - Coding aufnahmeAnlass = encounter.getHospitalization().getAdmitSource().getCoding().get(0); - - if (aufnahmeAnlass.getSystem().equals(AUFNAHME_ANLASS_CODE_SYSTEM) - && StationaererVersorgungsfallDefiningCodeMaps.getAufnahmeAnlassMap().containsKey(aufnahmeAnlass.getCode())) { - - aufnahmedatenAdminEntry.setAufnahmeanlassDefiningCode(StationaererVersorgungsfallDefiningCodeMaps.getAufnahmeAnlassMap().get(aufnahmeAnlass.getCode())); - } else { - throw new IllegalStateException(INVALID_CODE + aufnahmeAnlass.getCode() + - " or Code System for mapping of 'Aufnahmeanlass', valid codes are: N, G, E, A, V, Z, B, R."); - } - } - aufnahmedatenAdminEntry.setSubject(new PartySelf()); - aufnahmedatenAdminEntry.setLanguage(Language.DE); - - return aufnahmedatenAdminEntry; - } - - private EntlassungsdatenAdminEntry createEntlassungsdatenAdminEntry(Encounter encounter) { - - EntlassungsdatenAdminEntry entlassungsdatenAdminEntry = new EntlassungsdatenAdminEntry(); - - OffsetDateTime endDateTime = OffsetDateTime.from(encounter.getPeriod().getEndElement().getValueAsCalendar().toZonedDateTime()); - entlassungsdatenAdminEntry.setDatumUhrzeitDerEntlassungValue(endDateTime); - - if (encounter.getHospitalization() != null - && encounter.getHospitalization().getDischargeDisposition() != null) { - - Coding artDerEntlassung = encounter.getHospitalization().getDischargeDisposition().getCoding().get(0); - - if (artDerEntlassung.getSystem().equals(ART_DER_ENTLASSUNG_CODE_SYSTEM) - && StationaererVersorgungsfallDefiningCodeMaps.getArtDerEntlassungMap().containsKey(artDerEntlassung.getCode())) { - - entlassungsdatenAdminEntry.setArtDerEntlassungDefiningCode(StationaererVersorgungsfallDefiningCodeMaps.getArtDerEntlassungMap().get(artDerEntlassung.getCode())); - } else { - throw new IllegalStateException(INVALID_CODE + artDerEntlassung.getCode() + - " or Code System for mapping of 'art der Entlassung'."); - } - } - - entlassungsdatenAdminEntry.setSubject(new PartySelf()); - entlassungsdatenAdminEntry.setLanguage(Language.DE); - - return entlassungsdatenAdminEntry; - } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java index e8d114cb8..070bff2fe 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java @@ -56,9 +56,11 @@ public enum Profile { PHARMACOLOGICAL_THERAPY_ACE_INHIBITORS(MedicationStatement.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pharmacological-therapy-ace-inhibitors"), PHARMACOLOGICAL_THERAPY_ANTICOAGULANTS(MedicationStatement.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pharmacological-therapy-anticoagulants"), PHARMACOLOGICAL_THERAPY_IMMUNOGLOBULINS(MedicationStatement.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pharmacological-therapy-immunoglobulins"), + // Encounter Profiles - STATIONAERER_VERSORGUNGSFALL(Encounter.class, null), // as default, has the same link like PATIENTEN_AUFENTHALT - PATIENTEN_AUFENTHALT(Encounter.class, "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/StructureDefinition/KontaktGesundheitseinrichtung"), + KONTAKT_GESUNDHEIT_EINRICHTUNG(Encounter.class, null), // as default, has the same link like KONTAKT_GESUNDHEIT_ABTEILUNG + + KONTAKT_GESUNDHEIT_ABTEILUNG(Encounter.class, "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/StructureDefinition/KontaktGesundheitseinrichtung"), // Observation Profiles diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Encounters.java b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Encounters.java index bda82cd11..f1aa50667 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Encounters.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Encounters.java @@ -3,6 +3,8 @@ import org.ehrbase.fhirbridge.fhir.common.Profile; import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.Encounter; +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import java.util.List; import static org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem.KONTAKT_EBENE; @@ -12,24 +14,37 @@ private Encounters() { throw new IllegalStateException("Utility class"); } + public static Boolean isNotEmpty(List list) { + + return list != null && list.size() > 0; + } + public static Profile getProfileByKontaktEbene(Encounter encounter) { - if (encounter.getType() != null && encounter.getType().size() > 0 ) { + if (isNotEmpty(encounter.getType())) { Coding coding = encounter.getType().get(0).getCoding().get(0); - if (coding.getSystem().equals(KONTAKT_EBENE.getUrl())) { - if (coding.getCode().equals(KontaktebeneDefiningCode.ABTEILUNGS_KONTAKT.getCode()) - || coding.getCode().equals(KontaktebeneDefiningCode.VERSORGUNGS_STELLEN_KONTAKT.getCode())) { + return getProfileByCoding(coding); + } + + return Profile.KONTAKT_GESUNDHEIT_EINRICHTUNG; + } + + private static Profile getProfileByCoding(Coding coding) { + + if (coding.getSystem().equals(KONTAKT_EBENE.getUrl())) { + + if (coding.getCode().equals(KontaktebeneDefiningCode.ABTEILUNGS_KONTAKT.getCode()) + || coding.getCode().equals(KontaktebeneDefiningCode.VERSORGUNGS_STELLEN_KONTAKT.getCode())) { - return Profile.PATIENTEN_AUFENTHALT; - } - } else { - throw new IllegalStateException("Invalid Code system " + coding.getSystem() + - " valid code system: " + KONTAKT_EBENE.getUrl()); + return Profile.KONTAKT_GESUNDHEIT_ABTEILUNG; } + } else { + throw new UnprocessableEntityException("Invalid Code system " + coding.getSystem() + + " valid code system: " + KONTAKT_EBENE.getUrl()); } - return Profile.STATIONAERER_VERSORGUNGSFALL; + return Profile.KONTAKT_GESUNDHEIT_EINRICHTUNG; } } diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/encounter/KontaktGesundheitAbteilingIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/encounter/KontaktGesundheitAbteilingIT.java new file mode 100644 index 000000000..72d94042a --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/encounter/KontaktGesundheitAbteilingIT.java @@ -0,0 +1,106 @@ +package org.ehrbase.fhirbridge.fhir.encounter; + +import org.ehrbase.fhirbridge.comparators.CustomTemporalAcessorComparator; +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.PatientenaufenthaltComposition; +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.*; +import org.ehrbase.fhirbridge.ehr.converter.specific.patientenaufenthalt.PatientenAufenthaltCompositionConverter; +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import org.ehrbase.fhirbridge.fhir.AbstractMappingTestSetupIT; +import org.hl7.fhir.r4.model.Encounter; +import org.javers.core.Javers; +import org.javers.core.JaversBuilder; +import org.javers.core.diff.Diff; +import org.javers.core.metamodel.clazz.ValueObjectDefinition; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.time.temporal.TemporalAccessor; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +/** + * Integration tests for {@link org.hl7.fhir.r4.model.Encounter Encounter} resource. + */ +public class KontaktGesundheitAbteilingIT extends AbstractMappingTestSetupIT { + + public KontaktGesundheitAbteilingIT() { + super("Encounter/", Encounter.class); + } + + @Test + void createPatientenAufenthalt() throws IOException { + create("create-patienten-aufenthalt.json"); + } + + // ##################################################################################### + // check payload + @Test + void mappingNormal() throws IOException { + testMapping("create-patienten-aufenthalt.json", + "paragon-patienten-aufenthalt.json"); + } + + // ##################################################################################### + // check exceptions + @Test + void createInvalidKontaktEbeneCodeSystem() throws IOException { + Exception exception = executeMappingException("create-patienten-aufenthalt-kontakt-ebene-code-system-invalid.json"); + assertEquals("Invalid Code system modul-fall/CodeSystem/Kontaktebene valid code system: https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Kontaktebene", exception.getMessage()); + } + + @Test + void createInvalidKontaktEbeneCode() throws IOException { + Exception exception = executeMappingException("create-patienten-aufenthalt-kontakt-ebene-code-invalid.json"); + assertEquals("Invalid Code abteilung or Code System as 'Kontaktebene', valid codes are einrichtungskontakt, abteilungskontakt, versorgungsstellenkontakt.", exception.getMessage()); + } + + @Test + void createInvalidLocationType() throws IOException { + Exception exception = executeMappingException("create-patienten-aufenthalt-location-type-invalid.json"); + assertEquals("unexpected location physical type YY by EHR composition.", exception.getMessage()); + } + + @Test + void createInvalidFachabteilungsSchluessel() throws IOException { + Exception exception = executeMappingException("create-patienten-aufenthalt-fachabteilungs-schluessel-invalid.json"); + assertEquals("Invalid Code XXXX or Code System for 'Fachabteilungsschlüssel'.", exception.getMessage()); + } + + // ##################################################################################### + // default + @Override + public Exception executeMappingException(String path) throws IOException { + Encounter encounter = (Encounter) testFileLoader.loadResource(path); + return assertThrows(UnprocessableEntityException.class, () -> { + new PatientenAufenthaltCompositionConverter().convert(encounter); + }); + } + + @Override + public void testMapping(String resourcePath, String paragonPath) throws IOException { + Encounter encounter = (Encounter) super.testFileLoader.loadResource(resourcePath); + PatientenAufenthaltCompositionConverter patientenAufenthaltCompositionConverter = new PatientenAufenthaltCompositionConverter(); + PatientenaufenthaltComposition mapped = patientenAufenthaltCompositionConverter.convert(encounter); + Diff diff = compareCompositions(getJavers(), paragonPath, mapped); + assertEquals(0, diff.getChanges().size()); + } + + + @Override + public Javers getJavers() { + return JaversBuilder.javers() + .registerValue(TemporalAccessor.class, new CustomTemporalAcessorComparator()) + .registerValueObject(new ValueObjectDefinition(PatientenaufenthaltComposition.class, List.of("location", "feederAudit"))) + .registerValueObject(AbteilungsfallCluster.class) + .registerValueObject(DetailsZumBettCluster.class) + .registerValueObject(FachabteilungsschluesselDefiningCode.class) + .registerValueObject(FachlicheOrganisationseinheitCluster.class) + .registerValueObject(StandortCluster.class) + .registerValueObject(VersorgungsaufenthaltAdminEntry.class) + .registerValueObject(VersorgungsfallCluster.class) + .registerValueObject(VersorgungstellenkontaktCluster.class) + .build(); + } +} \ No newline at end of file diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/encounter/KontaktGesundheitEinrichtungIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/encounter/KontaktGesundheitEinrichtungIT.java new file mode 100644 index 000000000..bd4d899d7 --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/encounter/KontaktGesundheitEinrichtungIT.java @@ -0,0 +1,104 @@ +package org.ehrbase.fhirbridge.fhir.encounter; + +import org.ehrbase.fhirbridge.comparators.CustomTemporalAcessorComparator; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.StationaererVersorgungsfallComposition; +import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.*; +import org.ehrbase.fhirbridge.ehr.converter.specific.stationaererversorgungsfall.StationaererVersorgungsfallCompositionConverter; +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import org.ehrbase.fhirbridge.fhir.AbstractMappingTestSetupIT; +import org.hl7.fhir.r4.model.Encounter; +import org.javers.core.Javers; +import org.javers.core.JaversBuilder; +import org.javers.core.diff.Diff; +import org.javers.core.metamodel.clazz.ValueObjectDefinition; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.time.temporal.TemporalAccessor; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +/** + * Integration tests for {@link org.hl7.fhir.r4.model.Encounter Encounter} resource. + */ +public class KontaktGesundheitEinrichtungIT extends AbstractMappingTestSetupIT { + + public KontaktGesundheitEinrichtungIT() { + super("Encounter/", Encounter.class); + } + + @Test + void createStationaerVersorgungsfallNormal() throws IOException { + create("create-stationaer-versorgungsfall.json"); + } + + // ##################################################################################### + // check payload + @Test + void mappingNormal() throws IOException { + testMapping("create-stationaer-versorgungsfall.json", + "paragon-stat-versorgungsfall.json"); + } + + // ##################################################################################### + // check exceptions + @Test + void createInvalidAufnahmegrundCode() throws IOException { + Exception exception = executeMappingException("create-stat-versorgungsfall-aufnahmegrund-invalid.json"); + assertEquals("Invalid Code 25 or Code System for mapping of 'Aufnahmegrund', valid codes are: 01, 02, 03, 04, 05, 06, 07, 08, 10.", exception.getMessage()); + } + + @Test + void createInvalidAufnahmeanlassCode() throws IOException { + Exception exception = executeMappingException("create-stat-versorgungsfall-aufnahmeanlass-invalid.json"); + assertEquals("Invalid Code 25 or Code System for mapping of 'Aufnahmeanlass', valid codes are: N, G, E, A, V, Z, B, R.", exception.getMessage()); + } + + @Test + void createInvalidEntlassungCode() throws IOException { + Exception exception = executeMappingException("create-stat-versorgungsfall-entlassung-invalid.json"); + assertEquals("Invalid Code XX or Code System for mapping of 'art der Entlassung'.", exception.getMessage()); + } + + // ##################################################################################### + // default + @Override + public Exception executeMappingException(String path) throws IOException { + Encounter encounter = (Encounter) testFileLoader.loadResource(path); + return assertThrows(UnprocessableEntityException.class, () -> { + new StationaererVersorgungsfallCompositionConverter().convert(encounter); + }); + } + + @Override + public void testMapping(String resourcePath, String paragonPath) throws IOException { + Encounter encounter = (Encounter) super.testFileLoader.loadResource(resourcePath); + StationaererVersorgungsfallCompositionConverter stationaererVersorgungsfallCompositionConverter = new StationaererVersorgungsfallCompositionConverter(); + StationaererVersorgungsfallComposition mapped = stationaererVersorgungsfallCompositionConverter.convert(encounter); + Diff diff = compareCompositions(getJavers(), paragonPath, mapped); + assertEquals(0, diff.getChanges().size()); + } + + @Override + public Javers getJavers() { + return JaversBuilder.javers() + .registerValue(TemporalAccessor.class, new CustomTemporalAcessorComparator()) + .registerValueObject(new ValueObjectDefinition(StationaererVersorgungsfallComposition.class, List.of("location", "feederAudit"))) + .registerValueObject(ArtDerEntlassungDefiningCode.class) + .registerValueObject(AufnahmeanlassDefiningCode.class) + .registerValueObject(AufnahmedatenAdminEntry.class) + .registerValueObject(AufnahmegrundDefiningCode.class) + .registerValueObject(EntlassungsdatenAdminEntry.class) + .registerValueObject(FachlicheOrganisationseinheitCluster.class) + .registerValueObject(FallstatusDefiningCode.class) + .registerValueObject(KlinischerZustandDesPatientenDefiningCode.class) + .registerValueObject(OrganisationsschluesselDefiningCode.class) + .registerValueObject(VorherigerPatientenstandortVorAufnahmeCluster.class) + .registerValueObject(VorherigeVerantwortlicheOrganisationseinheitVorAufnahmeCluster.class) + .registerValueObject(ZugewiesenerStandortBeiEntlassungCluster.class) + .registerValueObject(ZugewieseneVerantwortlicheOrganisationseinheitBeiEntlassungCluster.class) + .build(); + } + +} \ No newline at end of file diff --git a/src/test/resources/Encounter/create-patienten-aufenthalt-fachabteilungs-schluessel-invalid.json b/src/test/resources/Encounter/create-patienten-aufenthalt-fachabteilungs-schluessel-invalid.json new file mode 100644 index 000000000..7d6b929ff --- /dev/null +++ b/src/test/resources/Encounter/create-patienten-aufenthalt-fachabteilungs-schluessel-invalid.json @@ -0,0 +1,130 @@ +{ + "resourceType": "Encounter", + "id": "28436186-b5b3-4881-b000-8a89abf659b7", + "meta": { + "profile": [ + "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/StructureDefinition/KontaktGesundheitseinrichtung" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "VN" + } + ] + }, + "system": "http://medizininformatik-initiative.de/fhir/NamingSystem/Aufnahmenummer/MusterKrankenhaus", + "value": "F_0000001", + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + } + } + ], + "status": "finished", + "class": { + "system": "https://www.medizininformatik-initiative.de/fhir/core/CodeSystem/EncounterClassAdditionsDE", + "code": "operation", + "display": "Operation" + }, + "type": [ + { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Kontaktebene", + "code": "abteilungskontakt", + "display": "Abteilungskontakt", + "userSelected": false + } + ] + } + ], + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "diagnosis": [ + { + "condition": { + "reference": "Condition/e6b6895c-549b-47c5-a842-41100761385d" + } + } + ], + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + }, + "reasonCode": [ + { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund", + "code": "01", + "display": "Krankenhausbehandlung, vollstationär" + } + ] + } + ], + "hospitalization": { + "admitSource": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass", + "code": "E", + "display": "Einweisung durch einen Arzt" + } + ] + }, + "dischargeDisposition": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund", + "code": "019", + "display": "Behandlung regulär beendet, arbeitsfähig entlassen" + } + ] + } + }, + "location": [ + { + "location": { + "reference": "Location/FD7DF5FD052E1CBCF7F41B12804D596C71FFBE1958B58EF06401DD781B2A53D3" + }, + "status": "active", + "physicalType": { + "coding": [ + { + "system": "https://www.hl7.org/fhir/valueset-location-physical-type.html", + "code": "bd", + "userSelected": false + } + ], + "text": "Bett" + }, + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + } + } + ], + "serviceType": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel", + "code": "XXXX", + "userSelected": false + } + ] + }, + "serviceProvider": { + "identifier": { + "system": "http://medizininformatik-initiative.de/fhir/NamingSystem/Abteilungsidentifikator/MusterKrankenhaus", + "value": "1500_ACHI" + } + } +} \ No newline at end of file diff --git a/src/test/resources/Encounter/create-patienten-aufenthalt-kontakt-ebene-code-invalid.json b/src/test/resources/Encounter/create-patienten-aufenthalt-kontakt-ebene-code-invalid.json new file mode 100644 index 000000000..572874714 --- /dev/null +++ b/src/test/resources/Encounter/create-patienten-aufenthalt-kontakt-ebene-code-invalid.json @@ -0,0 +1,130 @@ +{ + "resourceType": "Encounter", + "id": "28436186-b5b3-4881-b000-8a89abf659b7", + "meta": { + "profile": [ + "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/StructureDefinition/KontaktGesundheitseinrichtung" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "VN" + } + ] + }, + "system": "http://medizininformatik-initiative.de/fhir/NamingSystem/Aufnahmenummer/MusterKrankenhaus", + "value": "F_0000001", + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + } + } + ], + "status": "finished", + "class": { + "system": "https://www.medizininformatik-initiative.de/fhir/core/CodeSystem/EncounterClassAdditionsDE", + "code": "operation", + "display": "Operation" + }, + "type": [ + { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Kontaktebene", + "code": "abteilung", + "display": "Abteilung", + "userSelected": false + } + ] + } + ], + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "diagnosis": [ + { + "condition": { + "reference": "Condition/e6b6895c-549b-47c5-a842-41100761385d" + } + } + ], + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + }, + "reasonCode": [ + { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund", + "code": "01", + "display": "Krankenhausbehandlung, vollstationär" + } + ] + } + ], + "hospitalization": { + "admitSource": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass", + "code": "E", + "display": "Einweisung durch einen Arzt" + } + ] + }, + "dischargeDisposition": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund", + "code": "019", + "display": "Behandlung regulär beendet, arbeitsfähig entlassen" + } + ] + } + }, + "location": [ + { + "location": { + "reference": "Location/FD7DF5FD052E1CBCF7F41B12804D596C71FFBE1958B58EF06401DD781B2A53D3" + }, + "status": "active", + "physicalType": { + "coding": [ + { + "system": "https://www.hl7.org/fhir/valueset-location-physical-type.html", + "code": "bd", + "userSelected": false + } + ], + "text": "Bett" + }, + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + } + } + ], + "serviceType": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel", + "code": "3700", + "userSelected": false + } + ] + }, + "serviceProvider": { + "identifier": { + "system": "http://medizininformatik-initiative.de/fhir/NamingSystem/Abteilungsidentifikator/MusterKrankenhaus", + "value": "1500_ACHI" + } + } +} \ No newline at end of file diff --git a/src/test/resources/Encounter/create-patienten-aufenthalt-kontakt-ebene-code-system-invalid.json b/src/test/resources/Encounter/create-patienten-aufenthalt-kontakt-ebene-code-system-invalid.json new file mode 100644 index 000000000..6eacb18a9 --- /dev/null +++ b/src/test/resources/Encounter/create-patienten-aufenthalt-kontakt-ebene-code-system-invalid.json @@ -0,0 +1,130 @@ +{ + "resourceType": "Encounter", + "id": "28436186-b5b3-4881-b000-8a89abf659b7", + "meta": { + "profile": [ + "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/StructureDefinition/KontaktGesundheitseinrichtung" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "VN" + } + ] + }, + "system": "http://medizininformatik-initiative.de/fhir/NamingSystem/Aufnahmenummer/MusterKrankenhaus", + "value": "F_0000001", + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + } + } + ], + "status": "finished", + "class": { + "system": "https://www.medizininformatik-initiative.de/fhir/core/CodeSystem/EncounterClassAdditionsDE", + "code": "operation", + "display": "Operation" + }, + "type": [ + { + "coding": [ + { + "system": "modul-fall/CodeSystem/Kontaktebene", + "code": "abteilungskontakt", + "display": "Abteilungskontakt", + "userSelected": false + } + ] + } + ], + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "diagnosis": [ + { + "condition": { + "reference": "Condition/e6b6895c-549b-47c5-a842-41100761385d" + } + } + ], + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + }, + "reasonCode": [ + { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund", + "code": "01", + "display": "Krankenhausbehandlung, vollstationär" + } + ] + } + ], + "hospitalization": { + "admitSource": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass", + "code": "E", + "display": "Einweisung durch einen Arzt" + } + ] + }, + "dischargeDisposition": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund", + "code": "019", + "display": "Behandlung regulär beendet, arbeitsfähig entlassen" + } + ] + } + }, + "location": [ + { + "location": { + "reference": "Location/FD7DF5FD052E1CBCF7F41B12804D596C71FFBE1958B58EF06401DD781B2A53D3" + }, + "status": "active", + "physicalType": { + "coding": [ + { + "system": "https://www.hl7.org/fhir/valueset-location-physical-type.html", + "code": "bd", + "userSelected": false + } + ], + "text": "Bett" + }, + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + } + } + ], + "serviceType": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel", + "code": "3700", + "userSelected": false + } + ] + }, + "serviceProvider": { + "identifier": { + "system": "http://medizininformatik-initiative.de/fhir/NamingSystem/Abteilungsidentifikator/MusterKrankenhaus", + "value": "1500_ACHI" + } + } +} \ No newline at end of file diff --git a/src/test/resources/Encounter/create-patienten-aufenthalt-location-type-invalid.json b/src/test/resources/Encounter/create-patienten-aufenthalt-location-type-invalid.json new file mode 100644 index 000000000..ee832d0b5 --- /dev/null +++ b/src/test/resources/Encounter/create-patienten-aufenthalt-location-type-invalid.json @@ -0,0 +1,130 @@ +{ + "resourceType": "Encounter", + "id": "28436186-b5b3-4881-b000-8a89abf659b7", + "meta": { + "profile": [ + "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/StructureDefinition/KontaktGesundheitseinrichtung" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "VN" + } + ] + }, + "system": "http://medizininformatik-initiative.de/fhir/NamingSystem/Aufnahmenummer/MusterKrankenhaus", + "value": "F_0000001", + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + } + } + ], + "status": "finished", + "class": { + "system": "https://www.medizininformatik-initiative.de/fhir/core/CodeSystem/EncounterClassAdditionsDE", + "code": "operation", + "display": "Operation" + }, + "type": [ + { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Kontaktebene", + "code": "abteilungskontakt", + "display": "Abteilungskontakt", + "userSelected": false + } + ] + } + ], + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "diagnosis": [ + { + "condition": { + "reference": "Condition/e6b6895c-549b-47c5-a842-41100761385d" + } + } + ], + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + }, + "reasonCode": [ + { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund", + "code": "01", + "display": "Krankenhausbehandlung, vollstationär" + } + ] + } + ], + "hospitalization": { + "admitSource": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass", + "code": "E", + "display": "Einweisung durch einen Arzt" + } + ] + }, + "dischargeDisposition": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund", + "code": "019", + "display": "Behandlung regulär beendet, arbeitsfähig entlassen" + } + ] + } + }, + "location": [ + { + "location": { + "reference": "Location/FD7DF5FD052E1CBCF7F41B12804D596C71FFBE1958B58EF06401DD781B2A53D3" + }, + "status": "active", + "physicalType": { + "coding": [ + { + "system": "https://www.hl7.org/fhir/valueset-location-physical-type.html", + "code": "YY", + "userSelected": false + } + ], + "text": "Bett" + }, + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + } + } + ], + "serviceType": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel", + "code": "3700", + "userSelected": false + } + ] + }, + "serviceProvider": { + "identifier": { + "system": "http://medizininformatik-initiative.de/fhir/NamingSystem/Abteilungsidentifikator/MusterKrankenhaus", + "value": "1500_ACHI" + } + } +} \ No newline at end of file diff --git a/src/test/resources/Encounter/create-patienten-aufenthalt.json b/src/test/resources/Encounter/create-patienten-aufenthalt.json new file mode 100644 index 000000000..2c1e25dc4 --- /dev/null +++ b/src/test/resources/Encounter/create-patienten-aufenthalt.json @@ -0,0 +1,130 @@ +{ + "resourceType": "Encounter", + "id": "28436186-b5b3-4881-b000-8a89abf659b7", + "meta": { + "profile": [ + "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/StructureDefinition/KontaktGesundheitseinrichtung" + ] + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "VN" + } + ] + }, + "system": "http://medizininformatik-initiative.de/fhir/NamingSystem/Aufnahmenummer/MusterKrankenhaus", + "value": "F_0000001", + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + } + } + ], + "status": "finished", + "class": { + "system": "https://www.medizininformatik-initiative.de/fhir/core/CodeSystem/EncounterClassAdditionsDE", + "code": "operation", + "display": "Operation" + }, + "type": [ + { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Kontaktebene", + "code": "abteilungskontakt", + "display": "Abteilungskontakt", + "userSelected": false + } + ] + } + ], + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "diagnosis": [ + { + "condition": { + "reference": "Condition/e6b6895c-549b-47c5-a842-41100761385d" + } + } + ], + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + }, + "reasonCode": [ + { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund", + "code": "01", + "display": "Krankenhausbehandlung, vollstationär" + } + ] + } + ], + "hospitalization": { + "admitSource": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass", + "code": "E", + "display": "Einweisung durch einen Arzt" + } + ] + }, + "dischargeDisposition": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund", + "code": "019", + "display": "Behandlung regulär beendet, arbeitsfähig entlassen" + } + ] + } + }, + "location": [ + { + "location": { + "reference": "Location/FD7DF5FD052E1CBCF7F41B12804D596C71FFBE1958B58EF06401DD781B2A53D3" + }, + "status": "active", + "physicalType": { + "coding": [ + { + "system": "https://www.hl7.org/fhir/valueset-location-physical-type.html", + "code": "bd", + "userSelected": false + } + ], + "text": "Bett" + }, + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + } + } + ], + "serviceType": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel", + "code": "3700", + "userSelected": false + } + ] + }, + "serviceProvider": { + "identifier": { + "system": "http://medizininformatik-initiative.de/fhir/NamingSystem/Abteilungsidentifikator/MusterKrankenhaus", + "value": "1500_ACHI" + } + } +} \ No newline at end of file diff --git a/src/test/resources/Encounter/create-stat-versorgungsfall-aufnahmeanlass-invalid.json b/src/test/resources/Encounter/create-stat-versorgungsfall-aufnahmeanlass-invalid.json new file mode 100644 index 000000000..676190700 --- /dev/null +++ b/src/test/resources/Encounter/create-stat-versorgungsfall-aufnahmeanlass-invalid.json @@ -0,0 +1,88 @@ +{ + "resourceType": "Encounter", + "id": "5844e89b-c8f3-4e26-bc0f-502e00293874", + "status": "finished", + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "VN" + } + ] + }, + "system": "http://medizininformatik-initiative.de/fhir/NamingSystem/Aufnahmenummer/MusterKrankenhaus", + "value": "F_0000002", + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + } + } + ], + "class": { + "code": "IMP", + "display": "stationär", + "system": "http://hl7.org/fhir/v3/ActCode/cs.html" + }, + "serviceType": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel", + "code": "3700", + "userSelected": false + } + ] + }, + "serviceProvider": { + "identifier": { + "system": "http://medizininformatik-initiative.de/fhir/NamingSystem/Einrichtungsidentifikator/MusterKrankenhaus", + "value": "260123451_MusterKrankenhaus" + } + }, + "diagnosis": [ + { + "condition": { + "reference": "Condition/e6b6895c-549b-47c5-a842-41100761385d" + } + } + ], + "hospitalization": { + "admitSource": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass", + "code": "25" + } + ] + }, + "dischargeDisposition": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund", + "code": "12" + } + ] + } + }, + "reasonCode": [ + { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund", + "code": "07" + } + ] + } + ], + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + } +} \ No newline at end of file diff --git a/src/test/resources/Encounter/create-stat-versorgungsfall-aufnahmegrund-invalid.json b/src/test/resources/Encounter/create-stat-versorgungsfall-aufnahmegrund-invalid.json new file mode 100644 index 000000000..c2dcd9b15 --- /dev/null +++ b/src/test/resources/Encounter/create-stat-versorgungsfall-aufnahmegrund-invalid.json @@ -0,0 +1,88 @@ +{ + "resourceType": "Encounter", + "id": "5844e89b-c8f3-4e26-bc0f-502e00293874", + "status": "finished", + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "VN" + } + ] + }, + "system": "http://medizininformatik-initiative.de/fhir/NamingSystem/Aufnahmenummer/MusterKrankenhaus", + "value": "F_0000002", + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + } + } + ], + "class": { + "code": "IMP", + "display": "stationär", + "system": "http://hl7.org/fhir/v3/ActCode/cs.html" + }, + "serviceType": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel", + "code": "3700", + "userSelected": false + } + ] + }, + "serviceProvider": { + "identifier": { + "system": "http://medizininformatik-initiative.de/fhir/NamingSystem/Einrichtungsidentifikator/MusterKrankenhaus", + "value": "260123451_MusterKrankenhaus" + } + }, + "diagnosis": [ + { + "condition": { + "reference": "Condition/e6b6895c-549b-47c5-a842-41100761385d" + } + } + ], + "hospitalization": { + "admitSource": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass", + "code": "N" + } + ] + }, + "dischargeDisposition": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund", + "code": "12" + } + ] + } + }, + "reasonCode": [ + { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund", + "code": "25" + } + ] + } + ], + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + } +} \ No newline at end of file diff --git a/src/test/resources/Encounter/create-stat-versorgungsfall-entlassung-invalid.json b/src/test/resources/Encounter/create-stat-versorgungsfall-entlassung-invalid.json new file mode 100644 index 000000000..bf70848da --- /dev/null +++ b/src/test/resources/Encounter/create-stat-versorgungsfall-entlassung-invalid.json @@ -0,0 +1,88 @@ +{ + "resourceType": "Encounter", + "id": "5844e89b-c8f3-4e26-bc0f-502e00293874", + "status": "finished", + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "VN" + } + ] + }, + "system": "http://medizininformatik-initiative.de/fhir/NamingSystem/Aufnahmenummer/MusterKrankenhaus", + "value": "F_0000002", + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + } + } + ], + "class": { + "code": "IMP", + "display": "stationär", + "system": "http://hl7.org/fhir/v3/ActCode/cs.html" + }, + "serviceType": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel", + "code": "3700", + "userSelected": false + } + ] + }, + "serviceProvider": { + "identifier": { + "system": "http://medizininformatik-initiative.de/fhir/NamingSystem/Einrichtungsidentifikator/MusterKrankenhaus", + "value": "260123451_MusterKrankenhaus" + } + }, + "diagnosis": [ + { + "condition": { + "reference": "Condition/e6b6895c-549b-47c5-a842-41100761385d" + } + } + ], + "hospitalization": { + "admitSource": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass", + "code": "N" + } + ] + }, + "dischargeDisposition": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund", + "code": "XX" + } + ] + } + }, + "reasonCode": [ + { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund", + "code": "07" + } + ] + } + ], + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + } +} \ No newline at end of file diff --git a/src/test/resources/Encounter/create-stationaer-versorgungsfall.json b/src/test/resources/Encounter/create-stationaer-versorgungsfall.json new file mode 100644 index 000000000..f6f065aac --- /dev/null +++ b/src/test/resources/Encounter/create-stationaer-versorgungsfall.json @@ -0,0 +1,88 @@ +{ + "resourceType": "Encounter", + "id": "5844e89b-c8f3-4e26-bc0f-502e00293874", + "status": "finished", + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "VN" + } + ] + }, + "system": "http://medizininformatik-initiative.de/fhir/NamingSystem/Aufnahmenummer/MusterKrankenhaus", + "value": "F_0000002", + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + } + } + ], + "class": { + "code": "IMP", + "display": "stationär", + "system": "http://hl7.org/fhir/v3/ActCode/cs.html" + }, + "serviceType": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel", + "code": "3700", + "userSelected": false + } + ] + }, + "serviceProvider": { + "identifier": { + "system": "http://medizininformatik-initiative.de/fhir/NamingSystem/Einrichtungsidentifikator/MusterKrankenhaus", + "value": "260123451_MusterKrankenhaus" + } + }, + "diagnosis": [ + { + "condition": { + "reference": "Condition/e6b6895c-549b-47c5-a842-41100761385d" + } + } + ], + "hospitalization": { + "admitSource": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass", + "code": "N" + } + ] + }, + "dischargeDisposition": { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund", + "code": "12" + } + ] + } + }, + "reasonCode": [ + { + "coding": [ + { + "system": "https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund", + "code": "07" + } + ] + } + ], + "period": { + "start": "2021-02-13T03:04:00+01:00", + "end": "2021-03-01T20:42:00+01:00" + } +} \ No newline at end of file diff --git a/src/test/resources/Encounter/paragon-patienten-aufenthalt.json b/src/test/resources/Encounter/paragon-patienten-aufenthalt.json new file mode 100644 index 000000000..79b8ab303 --- /dev/null +++ b/src/test/resources/Encounter/paragon-patienten-aufenthalt.json @@ -0,0 +1,232 @@ +{ + "_type": "COMPOSITION", + "name": { + "_type": "DV_TEXT", + "value": "Patientenaufenthalt" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-COMPOSITION.event_summary.v0" + }, + "template_id": { + "value": "Patientenaufenthalt" + }, + "rm_version": "1.0.4" + }, + "feeder_audit": { + "_type": "FEEDER_AUDIT", + "originating_system_item_ids": [ + { + "_type": "DV_IDENTIFIER", + "id": "Encounter/3/_history/1", + "type": "fhir_logical_id" + } + ], + "originating_system_audit": { + "_type": "FEEDER_AUDIT_DETAILS", + "system_id": "FHIR-Bridge" + } + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "de" + }, + "territory": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_3166-1" + }, + "code_string": "DE" + }, + "category": { + "_type": "DV_CODED_TEXT", + "value": "event", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "openehr" + }, + "code_string": "433" + } + }, + "composer": { + "_type": "PARTY_SELF" + }, + "context": { + "_type": "EVENT_CONTEXT", + "start_time": { + "_type": "DV_DATE_TIME", + "value": "2021-02-13T02:04:00+01:00" + }, + "end_time": { + "_type": "DV_DATE_TIME", + "value": "2021-03-01T19:42:00+01:00" + }, + "setting": { + "_type": "DV_CODED_TEXT", + "value": "secondary medical care", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "openehr" + }, + "code_string": "232" + } + }, + "other_context": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Tree" + }, + "items": [ + { + "_type": "CLUSTER", + "name": { + "_type": "DV_TEXT", + "value": "Abteilungsfall" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Zugehöriger Abteilungsfall (Kennung)" + }, + "value": { + "_type": "DV_TEXT", + "value": "F_0000001" + }, + "archetype_node_id": "at0001" + } + ], + "archetype_node_id": "openEHR-EHR-CLUSTER.case_identification.v0" + } + ], + "archetype_node_id": "at0001" + } + }, + "content": [ + { + "_type": "ADMIN_ENTRY", + "name": { + "_type": "DV_TEXT", + "value": "Versorgungsaufenthalt" + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "de" + }, + "encoding": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "IANA_character-sets" + }, + "code_string": "UTF-8" + }, + "subject": { + "_type": "PARTY_SELF" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Baum" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Beginn" + }, + "value": { + "_type": "DV_DATE_TIME", + "value": "2021-02-13T03:04:00+01:00" + }, + "archetype_node_id": "at0004" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Ende" + }, + "value": { + "_type": "DV_DATE_TIME", + "value": "2021-03-01T20:42:00+01:00" + }, + "archetype_node_id": "at0005" + }, + { + "_type": "CLUSTER", + "name": { + "_type": "DV_TEXT", + "value": "Standort" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Bettplatz" + }, + "value": { + "_type": "DV_TEXT", + "value": "Bett" + }, + "archetype_node_id": "at0034" + } + ], + "archetype_node_id": "openEHR-EHR-CLUSTER.location.v1" + }, + { + "_type": "CLUSTER", + "name": { + "_type": "DV_TEXT", + "value": "Fachliche Organisationseinheit" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Fachabteilungsschlüssel" + }, + "value": { + "_type": "DV_CODED_TEXT", + "value": "Sonstige Fachabteilung", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "Anhang 1 der BPflV (31.12.2003)" + }, + "code_string": "3700" + } + }, + "archetype_node_id": "at0024" + } + ], + "archetype_node_id": "openEHR-EHR-CLUSTER.organization.v0" + } + ], + "archetype_node_id": "at0001" + }, + "archetype_node_id": "openEHR-EHR-ADMIN_ENTRY.hospitalization.v0" + } + ], + "archetype_node_id": "openEHR-EHR-COMPOSITION.event_summary.v0" +} \ No newline at end of file diff --git a/src/test/resources/Encounter/paragon-stat-versorgungsfall.json b/src/test/resources/Encounter/paragon-stat-versorgungsfall.json new file mode 100644 index 000000000..891840f41 --- /dev/null +++ b/src/test/resources/Encounter/paragon-stat-versorgungsfall.json @@ -0,0 +1,279 @@ +{ + "_type": "COMPOSITION", + "name": { + "_type": "DV_TEXT", + "value": "Stationärer Versorgungsfall" + }, + "archetype_details": { + "archetype_id": { + "value": "openEHR-EHR-COMPOSITION.fall.v1" + }, + "template_id": { + "value": "Stationärer Versorgungsfall" + }, + "rm_version": "1.0.4" + }, + "feeder_audit": { + "_type": "FEEDER_AUDIT", + "originating_system_item_ids": [ + { + "_type": "DV_IDENTIFIER", + "id": "Encounter/2/_history/1", + "type": "fhir_logical_id" + } + ], + "originating_system_audit": { + "_type": "FEEDER_AUDIT_DETAILS", + "system_id": "FHIR-Bridge" + } + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "de" + }, + "territory": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_3166-1" + }, + "code_string": "DE" + }, + "category": { + "_type": "DV_CODED_TEXT", + "value": "event", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "openehr" + }, + "code_string": "433" + } + }, + "composer": { + "_type": "PARTY_SELF" + }, + "context": { + "_type": "EVENT_CONTEXT", + "start_time": { + "_type": "DV_DATE_TIME", + "value": "2021-02-13T02:04:00+01:00" + }, + "end_time": { + "_type": "DV_DATE_TIME", + "value": "2021-03-01T19:42:00+01:00" + }, + "setting": { + "_type": "DV_CODED_TEXT", + "value": "secondary medical care", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "openehr" + }, + "code_string": "232" + } + }, + "other_context": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Baum" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Fall-Kennung" + }, + "value": { + "_type": "DV_TEXT", + "value": "F_0000002" + }, + "archetype_node_id": "at0003" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Falltyp" + }, + "value": { + "_type": "DV_TEXT", + "value": "Einrichtungskontakt" + }, + "archetype_node_id": "at0005" + } + ], + "archetype_node_id": "at0001" + } + }, + "content": [ + { + "_type": "ADMIN_ENTRY", + "name": { + "_type": "DV_TEXT", + "value": "Aufnahmedaten" + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "de" + }, + "encoding": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "IANA_character-sets" + }, + "code_string": "UTF-8" + }, + "subject": { + "_type": "PARTY_SELF" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Tree" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Aufnahmegrund" + }, + "value": { + "_type": "DV_CODED_TEXT", + "value": "Wiederaufnahme wegen Komplikationen (Fallpauschale) nach KFPV 2003", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "§21 KHEntgG" + }, + "code_string": "07" + } + }, + "archetype_node_id": "at0013" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Aufnahmeanlass" + }, + "value": { + "_type": "DV_CODED_TEXT", + "value": "Notfall", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "§21 KHEntgG" + }, + "code_string": "N" + } + }, + "archetype_node_id": "at0049" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Datum/Uhrzeit der Aufnahme" + }, + "value": { + "_type": "DV_DATE_TIME", + "value": "2021-02-13T03:04:00+01:00" + }, + "archetype_node_id": "at0071" + } + ], + "archetype_node_id": "at0001" + }, + "archetype_node_id": "openEHR-EHR-ADMIN_ENTRY.admission.v0" + }, + { + "_type": "ADMIN_ENTRY", + "name": { + "_type": "DV_TEXT", + "value": "Entlassungsdaten" + }, + "language": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "ISO_639-1" + }, + "code_string": "de" + }, + "encoding": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "IANA_character-sets" + }, + "code_string": "UTF-8" + }, + "subject": { + "_type": "PARTY_SELF" + }, + "data": { + "_type": "ITEM_TREE", + "name": { + "_type": "DV_TEXT", + "value": "Tree" + }, + "items": [ + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Datum/Uhrzeit der Entlassung" + }, + "value": { + "_type": "DV_DATE_TIME", + "value": "2021-03-01T20:42:00+01:00" + }, + "archetype_node_id": "at0011" + }, + { + "_type": "ELEMENT", + "name": { + "_type": "DV_TEXT", + "value": "Art der Entlassung" + }, + "value": { + "_type": "DV_CODED_TEXT", + "value": "interne Verlegung", + "defining_code": { + "_type": "CODE_PHRASE", + "terminology_id": { + "_type": "TERMINOLOGY_ID", + "value": "§21 KHEntgG" + }, + "code_string": "12" + } + }, + "archetype_node_id": "at0040" + } + ], + "archetype_node_id": "at0001" + }, + "archetype_node_id": "openEHR-EHR-ADMIN_ENTRY.discharge_summary.v0" + } + ], + "archetype_node_id": "openEHR-EHR-COMPOSITION.fall.v1" +} \ No newline at end of file From 336b3870a65e7e079a8cc1b7ee2892d510a58232 Mon Sep 17 00:00:00 2001 From: zhu13 <yufei.zhu@med.uni-goettingen.de> Date: Mon, 31 May 2021 17:25:56 +0200 Subject: [PATCH 087/141] fix time value in test case --- .../resources/Encounter/paragon-patienten-aufenthalt.json | 4 ++-- .../resources/Encounter/paragon-stat-versorgungsfall.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/resources/Encounter/paragon-patienten-aufenthalt.json b/src/test/resources/Encounter/paragon-patienten-aufenthalt.json index 79b8ab303..c1cad94e8 100644 --- a/src/test/resources/Encounter/paragon-patienten-aufenthalt.json +++ b/src/test/resources/Encounter/paragon-patienten-aufenthalt.json @@ -62,11 +62,11 @@ "_type": "EVENT_CONTEXT", "start_time": { "_type": "DV_DATE_TIME", - "value": "2021-02-13T02:04:00+01:00" + "value": "2021-02-13T03:04:00+01:00" }, "end_time": { "_type": "DV_DATE_TIME", - "value": "2021-03-01T19:42:00+01:00" + "value": "2021-03-01T20:42:00+01:00" }, "setting": { "_type": "DV_CODED_TEXT", diff --git a/src/test/resources/Encounter/paragon-stat-versorgungsfall.json b/src/test/resources/Encounter/paragon-stat-versorgungsfall.json index 891840f41..7cb1a5114 100644 --- a/src/test/resources/Encounter/paragon-stat-versorgungsfall.json +++ b/src/test/resources/Encounter/paragon-stat-versorgungsfall.json @@ -62,11 +62,11 @@ "_type": "EVENT_CONTEXT", "start_time": { "_type": "DV_DATE_TIME", - "value": "2021-02-13T02:04:00+01:00" + "value": "2021-02-13T03:04:00+01:00" }, "end_time": { "_type": "DV_DATE_TIME", - "value": "2021-03-01T19:42:00+01:00" + "value": "2021-03-01T20:42:00+01:00" }, "setting": { "_type": "DV_CODED_TEXT", From c0dbe6841c9adb06774ca0ff851dcaf114e6549a Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 1 Jun 2021 08:35:33 +0200 Subject: [PATCH 088/141] Fix SonarQube issues: - Dedicated Exception - Remove duplicate literal --- .../fhir/condition/FindConditionTransactionIT.java | 10 +++++----- .../condition/ProvideConditionTransactionIT.java | 6 ++++-- .../fhir/consent/FindConsentTransactionIT.java | 10 +++++----- .../fhir/consent/ProvideConsentTransactionIT.java | 6 ++++-- .../FindDiagnosticReportTransactionIT.java | 10 +++++----- .../ProvideDiagnosticReportTransactionIT.java | 6 ++++-- .../FindMedicationStatementTransactionIT.java | 10 +++++----- .../ProvideMedicationStatementTransactionIT.java | 6 ++++-- .../observation/FindObservationTransactionIT.java | 10 +++++----- .../ProvideObservationTransactionIT.java | 6 ++++-- .../fhir/patient/FindPatientTransactionIT.java | 14 ++++++++------ .../fhir/patient/ProvidePatientTransactionIT.java | 6 ++++-- .../fhir/procedure/FindProcedureTransactionIT.java | 14 ++++++++------ .../procedure/ProvideProcedureTransactionIT.java | 6 ++++-- .../FindQuestionnaireResponseTransactionIT.java | 14 ++++++++------ .../ProvideQuestionnaireResponseTransactionIT.java | 6 ++++-- 16 files changed, 81 insertions(+), 59 deletions(-) diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/condition/FindConditionTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/condition/FindConditionTransactionIT.java index f304c2a7a..fdfce9fe6 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/condition/FindConditionTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/condition/FindConditionTransactionIT.java @@ -14,7 +14,7 @@ class FindConditionTransactionIT extends AbstractTransactionIT { @Test - void findConditionRead() throws Exception { + void findConditionRead() throws IOException { var outcome = create("Condition/transactions/provide-condition-create.json"); var id = outcome.getId(); @@ -26,7 +26,7 @@ void findConditionRead() throws Exception { } @Test - void findConditionVRead() throws Exception { + void findConditionVRead() throws IOException { var outcome = create("Condition/transactions/provide-condition-create.json"); var id = outcome.getId(); @@ -39,9 +39,9 @@ void findConditionVRead() throws Exception { @Test void findConditionSearch() throws IOException { - create("Condition/transactions/find-condition-search.json"); - create("Condition/transactions/find-condition-search.json"); - create("Condition/transactions/find-condition-search.json"); + for (int i = 0; i < 3; i++) { + create("Condition/transactions/find-condition-search.json"); + } Bundle bundle = search("Condition?subject.identifier=" + PATIENT_ID + "&clinical-status=recurrence&verification-status=refuted"); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionTransactionIT.java index f761c03f2..54af3708d 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionTransactionIT.java @@ -6,13 +6,15 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import java.io.IOException; + /** * Integration Tests that validate "Provide Condition" transaction. */ class ProvideConditionTransactionIT extends AbstractTransactionIT { @Test - void provideConditionCreate() throws Exception { + void provideConditionCreate() throws IOException { var outcome = create("Condition/transactions/provide-condition-create.json"); Assertions.assertEquals(true, outcome.getCreated()); @@ -20,7 +22,7 @@ void provideConditionCreate() throws Exception { } @Test - void provideConditionConditionalUpdate() throws Exception { + void provideConditionConditionalUpdate() throws IOException { MethodOutcome outcome; outcome = create("Condition/transactions/provide-condition-create.json"); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentTransactionIT.java index 993f3f183..0cb47b1a9 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentTransactionIT.java @@ -16,7 +16,7 @@ class FindConsentTransactionIT extends AbstractTransactionIT { @Disabled("Converter not yet implemented") @Test - void findConsentRead() throws Exception { + void findConsentRead() throws IOException { var outcome = create("Consent/transactions/provide-consent-create.json"); var id = outcome.getId(); @@ -29,7 +29,7 @@ void findConsentRead() throws Exception { @Disabled("Converter not yet implemented") @Test - void findConsentVRead() throws Exception { + void findConsentVRead() throws IOException { var outcome = create("Consent/transactions/provide-consent-create.json"); var id = outcome.getId(); @@ -43,9 +43,9 @@ void findConsentVRead() throws Exception { @Disabled("Converter not yet implemented") @Test void findConsentSearch() throws IOException { - create("Consent/transactions/find-consent-search.json"); - create("Consent/transactions/find-consent-search.json"); - create("Consent/transactions/find-consent-search.json"); + for (int i = 0; i < 3; i++) { + create("Consent/transactions/find-consent-search.json"); + } Bundle bundle = search("Consent?patient.identifier=" + PATIENT_ID + "&status=rejected"); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentTransactionIT.java index 1be49cea1..b586e6b4a 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentTransactionIT.java @@ -7,6 +7,8 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import java.io.IOException; + /** * Integration Tests that validate "Provide Consent" transaction. */ @@ -14,7 +16,7 @@ class ProvideConsentTransactionIT extends AbstractTransactionIT { @Disabled("Converter not yet implemented") @Test - void provideConsentCreate() throws Exception { + void provideConsentCreate() throws IOException { var outcome = create("Consent/transactions/provide-consent-create.json"); Assertions.assertEquals(true, outcome.getCreated()); @@ -23,7 +25,7 @@ void provideConsentCreate() throws Exception { @Disabled("Converter not yet implemented") @Test - void provideConsentConditionalUpdate() throws Exception { + void provideConsentConditionalUpdate() throws IOException { MethodOutcome outcome; outcome = create("Consent/transactions/provide-consent-create.json"); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/FindDiagnosticReportTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/FindDiagnosticReportTransactionIT.java index f6a233695..97f67610d 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/FindDiagnosticReportTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/FindDiagnosticReportTransactionIT.java @@ -14,7 +14,7 @@ class FindDiagnosticReportTransactionIT extends AbstractTransactionIT { @Test - void findDiagnosticReportRead() throws Exception { + void findDiagnosticReportRead() throws IOException { var outcome = create("DiagnosticReport/transactions/provide-diagnostic-report-create.json"); var id = outcome.getId(); @@ -26,7 +26,7 @@ void findDiagnosticReportRead() throws Exception { } @Test - void findDiagnosticReportVRead() throws Exception { + void findDiagnosticReportVRead() throws IOException { var outcome = create("DiagnosticReport/transactions/provide-diagnostic-report-create.json"); var id = outcome.getId(); @@ -39,9 +39,9 @@ void findDiagnosticReportVRead() throws Exception { @Test void findDiagnosticReportSearch() throws IOException { - create("DiagnosticReport/transactions/find-diagnostic-report-search.json"); - create("DiagnosticReport/transactions/find-diagnostic-report-search.json"); - create("DiagnosticReport/transactions/find-diagnostic-report-search.json"); + for (int i = 0; i < 3; i++) { + create("DiagnosticReport/transactions/find-diagnostic-report-search.json"); + } Bundle bundle = search("DiagnosticReport?subject.identifier=" + PATIENT_ID + "&status=registered"); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportTransactionIT.java index a680dc809..22eb05c73 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportTransactionIT.java @@ -6,13 +6,15 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import java.io.IOException; + /** * Integration Tests that validate "Provide Diagnostic Report" transaction. */ class ProvideDiagnosticReportTransactionIT extends AbstractTransactionIT { @Test - void provideDiagnosticReportCreate() throws Exception { + void provideDiagnosticReportCreate() throws IOException { var outcome = create("DiagnosticReport/transactions/provide-diagnostic-report-create.json"); Assertions.assertEquals(true, outcome.getCreated()); @@ -20,7 +22,7 @@ void provideDiagnosticReportCreate() throws Exception { } @Test - void provideDiagnosticReportConditionalUpdate() throws Exception { + void provideDiagnosticReportConditionalUpdate() throws IOException { MethodOutcome outcome; outcome = create("DiagnosticReport/transactions/provide-diagnostic-report-create.json"); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/medicationstatement/FindMedicationStatementTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/medicationstatement/FindMedicationStatementTransactionIT.java index ea4a51618..ea30e8dc0 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/medicationstatement/FindMedicationStatementTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/medicationstatement/FindMedicationStatementTransactionIT.java @@ -14,7 +14,7 @@ class FindMedicationStatementTransactionIT extends AbstractTransactionIT { @Test - void findMedicationStatementRead() throws Exception { + void findMedicationStatementRead() throws IOException { var outcome = create("MedicationStatement/transactions/provide-medication-statement-create.json"); var id = outcome.getId(); @@ -26,7 +26,7 @@ void findMedicationStatementRead() throws Exception { } @Test - void findMedicationStatementVRead() throws Exception { + void findMedicationStatementVRead() throws IOException { var outcome = create("MedicationStatement/transactions/provide-medication-statement-create.json"); var id = outcome.getId(); @@ -39,9 +39,9 @@ void findMedicationStatementVRead() throws Exception { @Test void findMedicationStatementSearch() throws IOException { - create("MedicationStatement/transactions/find-medication-statement-search.json"); - create("MedicationStatement/transactions/find-medication-statement-search.json"); - create("MedicationStatement/transactions/find-medication-statement-search.json"); + for (int i = 0; i < 3; i++) { + create("MedicationStatement/transactions/find-medication-statement-search.json"); + } Bundle bundle = search("MedicationStatement?subject.identifier=" + PATIENT_ID + "&status=not-taken"); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/medicationstatement/ProvideMedicationStatementTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/medicationstatement/ProvideMedicationStatementTransactionIT.java index 6e65932bf..92db60e5c 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/medicationstatement/ProvideMedicationStatementTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/medicationstatement/ProvideMedicationStatementTransactionIT.java @@ -6,13 +6,15 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import java.io.IOException; + /** * Integration Tests that validate "Provide Medication Statement" transaction. */ class ProvideMedicationStatementTransactionIT extends AbstractTransactionIT { @Test - void provideMedicationStatementCreate() throws Exception { + void provideMedicationStatementCreate() throws IOException { var outcome = create("MedicationStatement/transactions/provide-medication-statement-create.json"); Assertions.assertEquals(true, outcome.getCreated()); @@ -20,7 +22,7 @@ void provideMedicationStatementCreate() throws Exception { } @Test - void provideMedicationStatementConditionalUpdate() throws Exception { + void provideMedicationStatementConditionalUpdate() throws IOException { MethodOutcome outcome; outcome = create("MedicationStatement/transactions/provide-medication-statement-create.json"); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/FindObservationTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/FindObservationTransactionIT.java index c79c4c95d..0ec6f44d5 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/FindObservationTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/FindObservationTransactionIT.java @@ -14,7 +14,7 @@ class FindObservationTransactionIT extends AbstractTransactionIT { @Test - void findObservationRead() throws Exception { + void findObservationRead() throws IOException { var outcome = create("Observation/transactions/provide-observation-create.json"); var id = outcome.getId(); @@ -26,7 +26,7 @@ void findObservationRead() throws Exception { } @Test - void findObservationVRead() throws Exception { + void findObservationVRead() throws IOException { var outcome = create("Observation/transactions/provide-observation-create.json"); var id = outcome.getId(); @@ -39,9 +39,9 @@ void findObservationVRead() throws Exception { @Test void findObservationSearch() throws IOException { - create("Observation/transactions/find-observation-search.json"); - create("Observation/transactions/find-observation-search.json"); - create("Observation/transactions/find-observation-search.json"); + for (int i = 0; i < 3; i++) { + create("Observation/transactions/find-observation-search.json"); + } Bundle bundle = search("Observation?subject.identifier=" + PATIENT_ID + "&status=preliminary"); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationTransactionIT.java index 1aadb8103..bc15c88f8 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/ProvideObservationTransactionIT.java @@ -6,13 +6,15 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import java.io.IOException; + /** * Integration Tests that validate "Provide Observation" transaction. */ class ProvideObservationTransactionIT extends AbstractTransactionIT { @Test - void provideObservationCreate() throws Exception { + void provideObservationCreate() throws IOException { var outcome = create("Observation/transactions/provide-observation-create.json"); Assertions.assertEquals(true, outcome.getCreated()); @@ -20,7 +22,7 @@ void provideObservationCreate() throws Exception { } @Test - void provideObservationConditionalUpdate() throws Exception { + void provideObservationConditionalUpdate() throws IOException { MethodOutcome outcome; outcome = create("Observation/transactions/provide-observation-create.json"); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/patient/FindPatientTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/patient/FindPatientTransactionIT.java index 7e7419eab..aef993eaf 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/patient/FindPatientTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/patient/FindPatientTransactionIT.java @@ -6,6 +6,8 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import java.io.IOException; +import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; @@ -15,7 +17,7 @@ class FindPatientTransactionIT extends AbstractTransactionIT { @Test - void findPatientRead() throws Exception { + void findPatientRead() throws IOException { var outcome = create("Patient/transactions/provide-patient-create.json"); var id = outcome.getId(); @@ -27,7 +29,7 @@ void findPatientRead() throws Exception { } @Test - void findPatientVRead() throws Exception { + void findPatientVRead() throws IOException { var outcome = create("Patient/transactions/provide-patient-create.json"); var id = outcome.getId(); @@ -39,10 +41,10 @@ void findPatientVRead() throws Exception { } @Test - void findPatientSearch() throws Exception { - create("Patient/transactions/find-patient-search.json"); - create("Patient/transactions/find-patient-search.json"); - create("Patient/transactions/find-patient-search.json"); + void findPatientSearch() throws IOException, ParseException { + for (int i = 0; i < 3; i++) { + create("Patient/transactions/find-patient-search.json"); + } Bundle bundle = search("Patient?identifier=" + PATIENT_ID + "&birthdate=2000-09-30"); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientTransactionIT.java index e65157236..41539ba1b 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientTransactionIT.java @@ -6,13 +6,15 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import java.io.IOException; + /** * Integration Tests that validate "Provide Patient" transaction. */ class ProvidePatientTransactionIT extends AbstractTransactionIT { @Test - void providePatientCreate() throws Exception { + void providePatientCreate() throws IOException { var outcome = create("Patient/transactions/provide-patient-create.json"); Assertions.assertEquals(true, outcome.getCreated()); @@ -20,7 +22,7 @@ void providePatientCreate() throws Exception { } @Test - void providePatientConditionalUpdate() throws Exception { + void providePatientConditionalUpdate() throws IOException { MethodOutcome outcome; outcome = create("Patient/transactions/provide-patient-create.json"); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/FindProcedureTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/FindProcedureTransactionIT.java index f93790597..425d302cf 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/FindProcedureTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/FindProcedureTransactionIT.java @@ -6,13 +6,15 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import java.io.IOException; + /** * Integration Tests that validate "Find Procedure" transaction. */ class FindProcedureTransactionIT extends AbstractTransactionIT { @Test - void findProcedureRead() throws Exception { + void findProcedureRead() throws IOException { var outcome = create("Procedure/transactions/provide-procedure-create.json"); var id = outcome.getId(); @@ -24,7 +26,7 @@ void findProcedureRead() throws Exception { } @Test - void findProcedureVRead() throws Exception { + void findProcedureVRead() throws IOException { var outcome = create("Procedure/transactions/provide-procedure-create.json"); var id = outcome.getId(); @@ -36,10 +38,10 @@ void findProcedureVRead() throws Exception { } @Test - void findProcedureSearch() throws Exception { - create("Procedure/transactions/find-procedure-search.json"); - create("Procedure/transactions/find-procedure-search.json"); - create("Procedure/transactions/find-procedure-search.json"); + void findProcedureSearch() throws IOException { + for (int i = 0; i < 3; i++) { + create("Procedure/transactions/find-procedure-search.json"); + } Bundle bundle = search("Procedure?subject.identifier=" + PATIENT_ID + "&status=entered-in-error"); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureTransactionIT.java index 35bf1c4dd..c15ae6794 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureTransactionIT.java @@ -6,13 +6,15 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import java.io.IOException; + /** * Integration Tests that validate "Provide Procedure" transaction. */ class ProvideProcedureTransactionIT extends AbstractTransactionIT { @Test - void provideProcedureCreate() throws Exception { + void provideProcedureCreate() throws IOException { var outcome = create("Procedure/transactions/provide-procedure-create.json"); Assertions.assertEquals(true, outcome.getCreated()); @@ -20,7 +22,7 @@ void provideProcedureCreate() throws Exception { } @Test - void provideProcedureConditionalUpdate() throws Exception { + void provideProcedureConditionalUpdate() throws IOException { MethodOutcome outcome; outcome = create("Procedure/transactions/provide-procedure-create.json"); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/FindQuestionnaireResponseTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/FindQuestionnaireResponseTransactionIT.java index 615c4aa5f..c06497b84 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/FindQuestionnaireResponseTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/FindQuestionnaireResponseTransactionIT.java @@ -6,13 +6,15 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import java.io.IOException; + /** * Integration Tests that validate "Find Questionnaire Response" transaction. */ class FindQuestionnaireResponseTransactionIT extends AbstractTransactionIT { @Test - void findQuestionnaireResponseRead() throws Exception { + void findQuestionnaireResponseRead() throws IOException { var outcome = create("QuestionnaireResponse/transactions/provide-questionnaire-response-create.json"); var id = outcome.getId(); @@ -24,7 +26,7 @@ void findQuestionnaireResponseRead() throws Exception { } @Test - void findQuestionnaireResponseVRead() throws Exception { + void findQuestionnaireResponseVRead() throws IOException { var outcome = create("QuestionnaireResponse/transactions/provide-questionnaire-response-create.json"); var id = outcome.getId(); @@ -36,10 +38,10 @@ void findQuestionnaireResponseVRead() throws Exception { } @Test - void findQuestionnaireResponseSearch() throws Exception { - create("QuestionnaireResponse/transactions/find-questionnaire-response-search.json"); - create("QuestionnaireResponse/transactions/find-questionnaire-response-search.json"); - create("QuestionnaireResponse/transactions/find-questionnaire-response-search.json"); + void findQuestionnaireResponseSearch() throws IOException { + for (int i = 0; i < 3; i++) { + create("QuestionnaireResponse/transactions/find-questionnaire-response-search.json"); + } Bundle bundle = search("QuestionnaireResponse?patient.identifier=" + PATIENT_ID + "&status=entered-in-error"); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseTransactionIT.java index 42014871e..af582720c 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseTransactionIT.java @@ -6,13 +6,15 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import java.io.IOException; + /** * Integration Tests that validate "Provide Questionnaire Response" transaction. */ class ProvideQuestionnaireResponseTransactionIT extends AbstractTransactionIT { @Test - void provideQuestionnaireResponseCreate() throws Exception { + void provideQuestionnaireResponseCreate() throws IOException { var outcome = create("QuestionnaireResponse/transactions/provide-questionnaire-response-create.json"); Assertions.assertEquals(true, outcome.getCreated()); @@ -20,7 +22,7 @@ void provideQuestionnaireResponseCreate() throws Exception { } @Test - void provideQuestionnaireResponseConditionalUpdate() throws Exception { + void provideQuestionnaireResponseConditionalUpdate() throws IOException { MethodOutcome outcome; outcome = create("QuestionnaireResponse/transactions/provide-questionnaire-response-create.json"); From 17d8ad5c88cdf89d4b118aad4405693534030fcb Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 1 Jun 2021 09:14:02 +0200 Subject: [PATCH 089/141] Add a configuration property to enable the modification of existing templates --- pom.xml | 15 ++++-- .../{ => ehrbase}/EhrbaseConfiguration.java | 24 ++++++++-- .../{ => ehrbase}/EhrbaseProperties.java | 32 ++++++++++++- .../EhrbaseTemplateInitializer.java | 46 ++++++++++++++----- src/main/resources/application.yml | 1 + 5 files changed, 96 insertions(+), 22 deletions(-) rename src/main/java/org/ehrbase/fhirbridge/config/{ => ehrbase}/EhrbaseConfiguration.java (74%) rename src/main/java/org/ehrbase/fhirbridge/config/{ => ehrbase}/EhrbaseProperties.java (69%) rename src/main/java/org/ehrbase/fhirbridge/config/{ => ehrbase}/EhrbaseTemplateInitializer.java (66%) diff --git a/pom.xml b/pom.xml index 238e0bf68..5d49ab8fb 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,8 @@ <profile> <id>circleci</id> <properties> - <commandLineArguments>--logging.level.root=error --logging.level.org.apache.camel=off</commandLineArguments> + <commandLineArguments>--logging.level.root=error --logging.level.org.apache.camel=off + </commandLineArguments> </properties> </profile> </profiles> @@ -214,10 +215,6 @@ </plugins> </build> <dependencies> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-web</artifactId> - </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> @@ -234,6 +231,14 @@ <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-web</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-webflux</artifactId> + </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> diff --git a/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseConfiguration.java similarity index 74% rename from src/main/java/org/ehrbase/fhirbridge/config/EhrbaseConfiguration.java rename to src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseConfiguration.java index bb8ede1f9..aaf86b91a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseConfiguration.java @@ -1,4 +1,20 @@ -package org.ehrbase.fhirbridge.config; +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.config.ehrbase; import org.apache.http.auth.AuthScope; import org.apache.http.auth.UsernamePasswordCredentials; @@ -19,7 +35,9 @@ import java.net.URISyntaxException; /** - * {@link Configuration} for EHRbase SDK. + * {@link Configuration} for EHRbase. + * + * @since 1.0.0 */ @Configuration @EnableConfigurationProperties(EhrbaseProperties.class) @@ -48,7 +66,7 @@ public DefaultRestClient openEhrClient(OpenEhrClientConfig restClientConfig, Tem } private HttpClient httpClient() { - HttpClientBuilder builder = HttpClientBuilder.create(); + var builder = HttpClientBuilder.create(); EhrbaseProperties.Security security = properties.getSecurity(); if (security.getType() == EhrbaseProperties.AuthorizationType.BASIC_AUTH) { diff --git a/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseProperties.java b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseProperties.java similarity index 69% rename from src/main/java/org/ehrbase/fhirbridge/config/EhrbaseProperties.java rename to src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseProperties.java index 090297e00..033498e16 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseProperties.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseProperties.java @@ -1,9 +1,27 @@ -package org.ehrbase.fhirbridge.config; +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.config.ehrbase; import org.springframework.boot.context.properties.ConfigurationProperties; /** - * {@link ConfigurationProperties ConfigurationProperties} to configure EHRbase SDK. + * {@link ConfigurationProperties ConfigurationProperties} to configure EHRbase. + * + * @since 1.0.0 */ @ConfigurationProperties(prefix = "fhir-bridge.ehrbase") public class EhrbaseProperties { @@ -87,6 +105,8 @@ public static class Template { private String prefix; + private boolean forceUpdate; + public String getPrefix() { return prefix; } @@ -94,6 +114,14 @@ public String getPrefix() { public void setPrefix(String prefix) { this.prefix = prefix; } + + public boolean isForceUpdate() { + return forceUpdate; + } + + public void setForceUpdate(boolean forceUpdate) { + this.forceUpdate = forceUpdate; + } } public enum AuthorizationType { diff --git a/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseTemplateInitializer.java b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseTemplateInitializer.java similarity index 66% rename from src/main/java/org/ehrbase/fhirbridge/config/EhrbaseTemplateInitializer.java rename to src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseTemplateInitializer.java index c47a69c02..05a612d91 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/EhrbaseTemplateInitializer.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseTemplateInitializer.java @@ -1,8 +1,23 @@ -package org.ehrbase.fhirbridge.config; +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.config.ehrbase; import org.apache.xmlbeans.XmlOptions; import org.ehrbase.client.openehrclient.OpenEhrClient; -import org.ehrbase.fhirbridge.config.ehrbase.AuthorizationType; import org.ehrbase.fhirbridge.ehr.ResourceTemplateProvider; import org.openehr.schemas.v1.OPERATIONALTEMPLATE; import org.slf4j.Logger; @@ -15,9 +30,13 @@ import org.springframework.web.util.UriComponentsBuilder; import javax.xml.namespace.QName; -import java.net.URI; import java.util.Optional; +/** + * {@link InitializingBean} used to trigger template initialization in the remote EHRbase instance. + * + * @since 1.0.0 + */ public class EhrbaseTemplateInitializer implements InitializingBean { private static final Logger LOG = LoggerFactory.getLogger(EhrbaseTemplateInitializer.class); @@ -39,32 +58,35 @@ public EhrbaseTemplateInitializer(EhrbaseProperties properties, ResourceTemplate @Override public void afterPropertiesSet() { + LOG.info("Initializing templates..."); + for (String templateId : templateProvider.getTemplateIds()) { - LOG.info("Initializing template '{}'", templateId); Optional<OPERATIONALTEMPLATE> ehrbaseTemplate = openEhrClient.templateEndpoint() .findTemplate(templateId); if (ehrbaseTemplate.isEmpty()) { createTemplate(templateId); - } else { + } else if (properties.getTemplate().isForceUpdate()) { updateTemplate(templateId); } } } private void createTemplate(String templateId) { + LOG.info("Create template '{}'", templateId); openEhrClient.templateEndpoint().ensureExistence(templateId); } private void updateTemplate(String templateId) { + LOG.info("Update template '{}'", templateId); OPERATIONALTEMPLATE fhirBridgeTemplate = templateProvider.find(templateId) .orElseThrow(() -> new IllegalStateException("Failed to load template with id " + templateId)); - XmlOptions options = new XmlOptions(); + var options = new XmlOptions(); options.setSaveSyntheticDocumentElement(new QName("http://schemas.openehr.org/v1", "template")); - URI uri = UriComponentsBuilder.fromHttpUrl(properties.getBaseUrl()) + var uri = UriComponentsBuilder.fromHttpUrl(properties.getBaseUrl()) .path("/admin/template/{templateId}") .build(templateId); @@ -82,13 +104,13 @@ private void updateTemplate(String templateId) { } private WebClient adminWebClient() { - WebClient.Builder builder = WebClient.builder(); + var webClientBuilder = WebClient.builder(); - EhrbaseProperties.Security security = properties.getSecurity(); - if (security.getType() == AuthorizationType.BASIC_AUTH) { - builder.filter(ExchangeFilterFunctions.basicAuthentication(security.getAdminUser(), security.getAdminPassword())); + var security = properties.getSecurity(); + if (security.getType() == EhrbaseProperties.AuthorizationType.BASIC_AUTH) { + webClientBuilder.filter(ExchangeFilterFunctions.basicAuthentication(security.getAdminUser(), security.getAdminPassword())); } - return builder.build(); + return webClientBuilder.build(); } } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 0fc4fd46a..cf370b9e9 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -25,6 +25,7 @@ fhir-bridge: admin-password: mySuperAwesomePassword123 template: prefix: classpath:/opt/ +# force-update: false # Security Properties security: authentication-type: none From 003bfc402325755d4f3ffe10334eaab54cb27332 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 1 Jun 2021 12:17:55 +0200 Subject: [PATCH 090/141] Fix remaining SonarQube issues + revert 'var' usage --- .../camel/processor/FhirProfileValidator.java | 83 +++++++++++-------- .../ProvideResourceAuditHandler.java | 6 +- .../ProvideResourcePersistenceProcessor.java | 4 +- .../ProvideResourceResponseProcessor.java | 6 +- .../fhir/AbstractTransactionIT.java | 8 +- .../condition/FindConditionTransactionIT.java | 14 ++-- .../consent/FindConsentTransactionIT.java | 14 ++-- .../consent/ProvideConsentTransactionIT.java | 10 ++- .../FindDiagnosticReportTransactionIT.java | 16 ++-- .../ProvideDiagnosticReportTransactionIT.java | 7 +- .../FindObservationTransactionIT.java | 16 ++-- .../patient/ProvidePatientTransactionIT.java | 7 +- .../procedure/FindProcedureTransactionIT.java | 16 ++-- .../ProvideProcedureTransactionIT.java | 7 +- ...ideQuestionnaireResponseTransactionIT.java | 7 +- 15 files changed, 126 insertions(+), 95 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirProfileValidator.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirProfileValidator.java index 3a064a05d..857119fa6 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirProfileValidator.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirProfileValidator.java @@ -40,50 +40,63 @@ public FhirProfileValidator(FhirContext fhirContext) { public void process(Exchange exchange) { Resource resource = exchange.getIn().getBody(Resource.class); - LOG.debug("Start validating {} resource...", resource.getResourceType()); - - OperationOutcome operationOutcome = new OperationOutcome(); - Class<? extends Resource> resourceType = resource.getClass(); + LOG.debug("Validating {} resource...", resource.getResourceType()); List<String> profiles = Resources.getProfileUris(resource); if (profiles.isEmpty()) { - Profile defaultProfile = Profile.getDefaultProfile(resourceType); - if (defaultProfile == null) { - operationOutcome.addIssue(new OperationOutcomeIssueComponent() - .setSeverity(IssueSeverity.FATAL) - .setCode(IssueType.VALUE) - .setDiagnostics(messages.getMessage("validation.profile.defaultNotSupported", new Object[]{resource.getResourceType(), Profile.getSupportedProfiles(resourceType)})) - .addExpression(resource.getResourceType() + ".meta.profile[]")); - throw new UnprocessableEntityException(fhirContext, operationOutcome); - } - - exchange.getMessage().setHeader(CamelConstants.PROFILE, defaultProfile); + validateDefault(resource, exchange); } else { - Set<Profile> supportedProfiles = Profile.resolveAll(resource); - if (supportedProfiles.isEmpty()) { - operationOutcome.addIssue(new OperationOutcomeIssueComponent() - .setSeverity(IssueSeverity.FATAL) - .setCode(IssueType.VALUE) - .setDiagnostics(messages.getMessage("validation.profile.missingSupported", new Object[]{resourceType, Profile.getSupportedProfiles(resourceType)})) - .addExpression(resource.getResourceType() + ".meta.profile[]")); - } else if (supportedProfiles.size() > 1) { - operationOutcome.addIssue(new OperationOutcomeIssueComponent() - .setSeverity(IssueSeverity.FATAL) - .setCode(IssueType.VALUE) - .setDiagnostics(messages.getMessage("validation.profile.moreThanOneSupported")) - .addExpression(resource.getResourceType() + ".meta.profile[]")); - } - - if (operationOutcome.hasIssue()) { - throw new UnprocessableEntityException(fhirContext, operationOutcome); - } - - exchange.getMessage().setHeader(CamelConstants.PROFILE, supportedProfiles.iterator().next()); + validateProfiles(resource, exchange); } LOG.info("{} resource validated", resource.getResourceType()); } + private void validateDefault(Resource resource, Exchange exchange) { + Class<? extends Resource> clazz = resource.getClass(); + Profile profile = Profile.getDefaultProfile(clazz); + + if (profile == null) { + OperationOutcome outcome = new OperationOutcome() + .addIssue(new OperationOutcomeIssueComponent() + .setSeverity(IssueSeverity.FATAL) + .setCode(IssueType.VALUE) + .setDiagnostics(messages.getMessage("validation.profile.defaultNotSupported", new Object[]{resource.getResourceType(), Profile.getSupportedProfiles(clazz)})) + .addExpression(profileExpression(resource))); + throw new UnprocessableEntityException(fhirContext, outcome); + } + exchange.getMessage().setHeader(CamelConstants.PROFILE, profile); + } + + private void validateProfiles(Resource resource, Exchange exchange) { + Set<Profile> supportedProfiles = Profile.resolveAll(resource); + Class<? extends Resource> resourceType = resource.getClass(); + + OperationOutcome outcome = new OperationOutcome(); + if (supportedProfiles.isEmpty()) { + outcome.addIssue(new OperationOutcomeIssueComponent() + .setSeverity(IssueSeverity.FATAL) + .setCode(IssueType.VALUE) + .setDiagnostics(messages.getMessage("validation.profile.missingSupported", new Object[]{resourceType, Profile.getSupportedProfiles(resourceType)})) + .addExpression(profileExpression(resource))); + } else if (supportedProfiles.size() > 1) { + outcome.addIssue(new OperationOutcomeIssueComponent() + .setSeverity(IssueSeverity.FATAL) + .setCode(IssueType.VALUE) + .setDiagnostics(messages.getMessage("validation.profile.moreThanOneSupported")) + .addExpression(profileExpression(resource))); + } + + if (outcome.hasIssue()) { + throw new UnprocessableEntityException(fhirContext, outcome); + } + exchange.getMessage().setHeader(CamelConstants.PROFILE, supportedProfiles.iterator().next()); + } + + private String profileExpression(Resource resource) { + return resource.getResourceType() + ".meta.profile[]"; + } + @Override public void setMessageSource(@NonNull MessageSource messageSource) { this.messages = new MessageSourceAccessor(messageSource); diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceAuditHandler.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceAuditHandler.java index 3c02a9381..31e9c689f 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceAuditHandler.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceAuditHandler.java @@ -30,7 +30,7 @@ public ProvideResourceAuditHandler(IFhirResourceDao<AuditEvent> auditEventDao) { @Override public void process(Exchange exchange) throws Exception { - var auditEvent = new AuditEvent() + AuditEvent auditEvent = new AuditEvent() .setType(new Coding("http://terminology.hl7.org/CodeSystem/audit-event-type", "rest", "RESTful Operation")) .addSubtype(new Coding("http://hl7.org/fhir/restful-interaction", "create", "create")) .setAction(AuditEvent.AuditEventAction.C) @@ -63,8 +63,8 @@ private AuditEvent.AuditEventSourceComponent source() { } private AuditEvent.AuditEventEntityComponent entity(Exchange exchange) { - var outcome = exchange.getProperty(CamelConstants.METHOD_OUTCOME, MethodOutcome.class); - var requestDetails = exchange.getIn().getHeader(Constants.FHIR_REQUEST_DETAILS, RequestDetails.class); + MethodOutcome outcome = exchange.getProperty(CamelConstants.METHOD_OUTCOME, MethodOutcome.class); + RequestDetails requestDetails = exchange.getIn().getHeader(Constants.FHIR_REQUEST_DETAILS, RequestDetails.class); return new AuditEvent.AuditEventEntityComponent() .setWhat(new Reference(outcome.getId())) diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourcePersistenceProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourcePersistenceProcessor.java index 7898b1d53..692f8a448 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourcePersistenceProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourcePersistenceProcessor.java @@ -53,8 +53,8 @@ public ProvideResourcePersistenceProcessor(IFhirResourceDao<T> resourceDao, Clas public void process(Exchange exchange) throws Exception { LOG.trace("Processing..."); - var resource = exchange.getIn().getBody(resourceType); - var requestDetails = exchange.getIn().getHeader(Constants.FHIR_REQUEST_DETAILS, RequestDetails.class); + T resource = exchange.getIn().getBody(resourceType); + RequestDetails requestDetails = exchange.getIn().getHeader(Constants.FHIR_REQUEST_DETAILS, RequestDetails.class); MethodOutcome outcome; switch (requestDetails.getRestOperationType()) { diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java index 454162c95..24ceca635 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java @@ -48,10 +48,10 @@ public ProvideResourceResponseProcessor(ResourceMapRepository resourceMapReposit public void process(Exchange exchange) throws Exception { LOG.trace("Processing exchange..."); - var composition = exchange.getIn().getMandatoryBody(CompositionEntity.class); - var resourceId = exchange.getIn().getHeader(CamelConstants.RESOURCE_ID, String.class); + CompositionEntity composition = exchange.getIn().getMandatoryBody(CompositionEntity.class); + String resourceId = exchange.getIn().getHeader(CamelConstants.RESOURCE_ID, String.class); - var resourceMap = resourceMapRepository.findById(resourceId) + ResourceMap resourceMap = resourceMapRepository.findById(resourceId) .orElse(new ResourceMap(resourceId)); resourceMap.setCompositionVersionUid(composition.getVersionUid().toString()); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/AbstractTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/AbstractTransactionIT.java index 0502bb3d8..34fb77235 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/AbstractTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/AbstractTransactionIT.java @@ -1,6 +1,7 @@ package org.ehrbase.fhirbridge.fhir; import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.gclient.IUpdateTyped; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.r4.model.Bundle; import org.springframework.core.io.ClassPathResource; @@ -8,6 +9,7 @@ import java.io.IOException; import java.io.InputStreamReader; +import java.io.Reader; import java.nio.charset.StandardCharsets; public class AbstractTransactionIT extends AbstractSetupIT { @@ -23,7 +25,7 @@ protected MethodOutcome update(String resourceLocation) throws IOException { } protected MethodOutcome update(String resourceLocation, String conditionalUrl) throws IOException { - var update = client.update() + IUpdateTyped update = client.update() .resource(getResourceAsString(resourceLocation)); if (conditionalUrl != null) { @@ -54,8 +56,8 @@ protected Bundle search(String searchUrl) { } private String getResourceAsString(String resourceLocation) throws IOException { - var reader = new InputStreamReader(new ClassPathResource(resourceLocation).getInputStream(), StandardCharsets.UTF_8); - var resource = FileCopyUtils.copyToString(reader); + Reader reader = new InputStreamReader(new ClassPathResource(resourceLocation).getInputStream(), StandardCharsets.UTF_8); + String resource = FileCopyUtils.copyToString(reader); return resource.replaceAll(PATIENT_ID_TOKEN, PATIENT_ID); } } diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/condition/FindConditionTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/condition/FindConditionTransactionIT.java index fdfce9fe6..a9d530a45 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/condition/FindConditionTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/condition/FindConditionTransactionIT.java @@ -1,6 +1,8 @@ package org.ehrbase.fhirbridge.fhir.condition; +import ca.uhn.fhir.rest.api.MethodOutcome; import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.Condition; import org.junit.jupiter.api.Assertions; @@ -15,10 +17,10 @@ class FindConditionTransactionIT extends AbstractTransactionIT { @Test void findConditionRead() throws IOException { - var outcome = create("Condition/transactions/provide-condition-create.json"); - var id = outcome.getId(); + MethodOutcome outcome = create("Condition/transactions/provide-condition-create.json"); + IIdType id = outcome.getId(); - var condition = read(id.getIdPart(), Condition.class); + Condition condition = read(id.getIdPart(), Condition.class); Assertions.assertNotNull(condition); Assertions.assertNotNull(condition.getId(), id.getIdPart()); @@ -27,10 +29,10 @@ void findConditionRead() throws IOException { @Test void findConditionVRead() throws IOException { - var outcome = create("Condition/transactions/provide-condition-create.json"); - var id = outcome.getId(); + MethodOutcome outcome = create("Condition/transactions/provide-condition-create.json"); + IIdType id = outcome.getId(); - var condition = vread(id.getIdPart(), id.getVersionIdPart(), Condition.class); + Condition condition = vread(id.getIdPart(), id.getVersionIdPart(), Condition.class); Assertions.assertNotNull(condition); Assertions.assertNotNull(condition.getId(), id.getIdPart()); Assertions.assertNotNull(condition.getMeta().getVersionId(), id.getVersionIdPart()); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentTransactionIT.java index 0cb47b1a9..3b43be9bb 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/FindConsentTransactionIT.java @@ -1,6 +1,8 @@ package org.ehrbase.fhirbridge.fhir.consent; +import ca.uhn.fhir.rest.api.MethodOutcome; import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.Consent; import org.junit.jupiter.api.Assertions; @@ -17,10 +19,10 @@ class FindConsentTransactionIT extends AbstractTransactionIT { @Disabled("Converter not yet implemented") @Test void findConsentRead() throws IOException { - var outcome = create("Consent/transactions/provide-consent-create.json"); - var id = outcome.getId(); + MethodOutcome outcome = create("Consent/transactions/provide-consent-create.json"); + IIdType id = outcome.getId(); - var consent = read(id.getIdPart(), Consent.class); + Consent consent = read(id.getIdPart(), Consent.class); Assertions.assertNotNull(consent); Assertions.assertNotNull(consent.getId(), id.getIdPart()); @@ -30,10 +32,10 @@ void findConsentRead() throws IOException { @Disabled("Converter not yet implemented") @Test void findConsentVRead() throws IOException { - var outcome = create("Consent/transactions/provide-consent-create.json"); - var id = outcome.getId(); + MethodOutcome outcome = create("Consent/transactions/provide-consent-create.json"); + IIdType id = outcome.getId(); - var consent = vread(id.getIdPart(), id.getVersionIdPart(), Consent.class); + Consent consent = vread(id.getIdPart(), id.getVersionIdPart(), Consent.class); Assertions.assertNotNull(consent); Assertions.assertNotNull(consent.getId(), id.getIdPart()); Assertions.assertNotNull(consent.getMeta().getVersionId(), id.getVersionIdPart()); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentTransactionIT.java index b586e6b4a..d8893032a 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/ProvideConsentTransactionIT.java @@ -2,6 +2,8 @@ import ca.uhn.fhir.rest.api.MethodOutcome; import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.r4.model.CodeableConcept; import org.hl7.fhir.r4.model.Consent; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; @@ -17,7 +19,7 @@ class ProvideConsentTransactionIT extends AbstractTransactionIT { @Disabled("Converter not yet implemented") @Test void provideConsentCreate() throws IOException { - var outcome = create("Consent/transactions/provide-consent-create.json"); + MethodOutcome outcome = create("Consent/transactions/provide-consent-create.json"); Assertions.assertEquals(true, outcome.getCreated()); Assertions.assertNotNull(outcome.getId().getValue()); @@ -29,16 +31,16 @@ void provideConsentConditionalUpdate() throws IOException { MethodOutcome outcome; outcome = create("Consent/transactions/provide-consent-create.json"); - var id = outcome.getId(); + IIdType id = outcome.getId(); outcome = update("Consent/transactions/provide-consent-update.json", "Consent?_id=" + id.getIdPart() + "&patient.identifier=" + PATIENT_ID); Assertions.assertEquals(id.getIdPart(), outcome.getId().getIdPart()); Assertions.assertEquals(id.getVersionIdPartAsLong() + 1, outcome.getId().getVersionIdPartAsLong()); - var consent = (Consent) outcome.getResource(); + Consent consent = (Consent) outcome.getResource(); - var scope = consent.getScope(); + CodeableConcept scope = consent.getScope(); Assertions.assertEquals("research", scope.getCodingFirstRep().getCode()); Assertions.assertEquals(PATIENT_ID, consent.getPatient().getIdentifier().getValue()); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/FindDiagnosticReportTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/FindDiagnosticReportTransactionIT.java index 97f67610d..0f35150fc 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/FindDiagnosticReportTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/FindDiagnosticReportTransactionIT.java @@ -1,6 +1,8 @@ package org.ehrbase.fhirbridge.fhir.diagnosticreport; +import ca.uhn.fhir.rest.api.MethodOutcome; import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.DiagnosticReport; import org.junit.jupiter.api.Assertions; @@ -15,10 +17,10 @@ class FindDiagnosticReportTransactionIT extends AbstractTransactionIT { @Test void findDiagnosticReportRead() throws IOException { - var outcome = create("DiagnosticReport/transactions/provide-diagnostic-report-create.json"); - var id = outcome.getId(); + MethodOutcome outcome = create("DiagnosticReport/transactions/provide-diagnostic-report-create.json"); + IIdType id = outcome.getId(); - var diagnosticReport = read(id.getIdPart(), DiagnosticReport.class); + DiagnosticReport diagnosticReport = read(id.getIdPart(), DiagnosticReport.class); Assertions.assertNotNull(diagnosticReport); Assertions.assertNotNull(diagnosticReport.getId(), id.getIdPart()); @@ -27,10 +29,10 @@ void findDiagnosticReportRead() throws IOException { @Test void findDiagnosticReportVRead() throws IOException { - var outcome = create("DiagnosticReport/transactions/provide-diagnostic-report-create.json"); - var id = outcome.getId(); + MethodOutcome outcome = create("DiagnosticReport/transactions/provide-diagnostic-report-create.json"); + IIdType id = outcome.getId(); - var diagnosticReport = vread(id.getIdPart(), id.getVersionIdPart(), DiagnosticReport.class); + DiagnosticReport diagnosticReport = vread(id.getIdPart(), id.getVersionIdPart(), DiagnosticReport.class); Assertions.assertNotNull(diagnosticReport); Assertions.assertNotNull(diagnosticReport.getId(), id.getIdPart()); Assertions.assertNotNull(diagnosticReport.getMeta().getVersionId(), id.getVersionIdPart()); @@ -48,7 +50,7 @@ void findDiagnosticReportSearch() throws IOException { Assertions.assertEquals(3, bundle.getTotal()); bundle.getEntry().forEach(entry -> { - var diagnosticReport = (DiagnosticReport) entry.getResource(); + DiagnosticReport diagnosticReport = (DiagnosticReport) entry.getResource(); Assertions.assertEquals(PATIENT_ID, diagnosticReport.getSubject().getIdentifier().getValue()); Assertions.assertEquals(DiagnosticReport.DiagnosticReportStatus.REGISTERED, diagnosticReport.getStatus()); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportTransactionIT.java index 22eb05c73..c8ad0da3f 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/ProvideDiagnosticReportTransactionIT.java @@ -2,6 +2,7 @@ import ca.uhn.fhir.rest.api.MethodOutcome; import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.DiagnosticReport; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; @@ -15,7 +16,7 @@ class ProvideDiagnosticReportTransactionIT extends AbstractTransactionIT { @Test void provideDiagnosticReportCreate() throws IOException { - var outcome = create("DiagnosticReport/transactions/provide-diagnostic-report-create.json"); + MethodOutcome outcome = create("DiagnosticReport/transactions/provide-diagnostic-report-create.json"); Assertions.assertEquals(true, outcome.getCreated()); Assertions.assertNotNull(outcome.getId().getValue()); @@ -26,14 +27,14 @@ void provideDiagnosticReportConditionalUpdate() throws IOException { MethodOutcome outcome; outcome = create("DiagnosticReport/transactions/provide-diagnostic-report-create.json"); - var id = outcome.getId(); + IIdType id = outcome.getId(); outcome = update("DiagnosticReport/transactions/provide-diagnostic-report-update.json", "DiagnosticReport?_id=" + id.getIdPart() + "&subject.identifier=" + PATIENT_ID); Assertions.assertEquals(id.getIdPart(), outcome.getId().getIdPart()); Assertions.assertEquals(id.getVersionIdPartAsLong() + 1, outcome.getId().getVersionIdPartAsLong()); - var diagnosticReport = (DiagnosticReport) outcome.getResource(); + DiagnosticReport diagnosticReport = (DiagnosticReport) outcome.getResource(); Assertions.assertEquals(PATIENT_ID, diagnosticReport.getSubject().getIdentifier().getValue()); Assertions.assertEquals("http://external.fhir.server/ServiceRequest/987", diagnosticReport.getBasedOn().get(0).getReference()); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/FindObservationTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/FindObservationTransactionIT.java index 0ec6f44d5..553c63a97 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/FindObservationTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/FindObservationTransactionIT.java @@ -1,6 +1,8 @@ package org.ehrbase.fhirbridge.fhir.observation; +import ca.uhn.fhir.rest.api.MethodOutcome; import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.Observation; import org.junit.jupiter.api.Assertions; @@ -15,10 +17,10 @@ class FindObservationTransactionIT extends AbstractTransactionIT { @Test void findObservationRead() throws IOException { - var outcome = create("Observation/transactions/provide-observation-create.json"); - var id = outcome.getId(); + MethodOutcome outcome = create("Observation/transactions/provide-observation-create.json"); + IIdType id = outcome.getId(); - var observation = read(id.getIdPart(), Observation.class); + Observation observation = read(id.getIdPart(), Observation.class); Assertions.assertNotNull(observation); Assertions.assertNotNull(observation.getId(), id.getIdPart()); @@ -27,10 +29,10 @@ void findObservationRead() throws IOException { @Test void findObservationVRead() throws IOException { - var outcome = create("Observation/transactions/provide-observation-create.json"); - var id = outcome.getId(); + MethodOutcome outcome = create("Observation/transactions/provide-observation-create.json"); + IIdType id = outcome.getId(); - var observation = vread(id.getIdPart(), id.getVersionIdPart(), Observation.class); + Observation observation = vread(id.getIdPart(), id.getVersionIdPart(), Observation.class); Assertions.assertNotNull(observation); Assertions.assertNotNull(observation.getId(), id.getIdPart()); Assertions.assertNotNull(observation.getMeta().getVersionId(), id.getVersionIdPart()); @@ -48,7 +50,7 @@ void findObservationSearch() throws IOException { Assertions.assertEquals(3, bundle.getTotal()); bundle.getEntry().forEach(entry -> { - var observation = (Observation) entry.getResource(); + Observation observation = (Observation) entry.getResource(); Assertions.assertEquals(PATIENT_ID, observation.getSubject().getIdentifier().getValue()); Assertions.assertEquals(Observation.ObservationStatus.PRELIMINARY, observation.getStatus()); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientTransactionIT.java index 41539ba1b..a27b2562a 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/patient/ProvidePatientTransactionIT.java @@ -2,6 +2,7 @@ import ca.uhn.fhir.rest.api.MethodOutcome; import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.Patient; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; @@ -15,7 +16,7 @@ class ProvidePatientTransactionIT extends AbstractTransactionIT { @Test void providePatientCreate() throws IOException { - var outcome = create("Patient/transactions/provide-patient-create.json"); + MethodOutcome outcome = create("Patient/transactions/provide-patient-create.json"); Assertions.assertEquals(true, outcome.getCreated()); Assertions.assertNotNull(outcome.getId().getValue()); @@ -26,14 +27,14 @@ void providePatientConditionalUpdate() throws IOException { MethodOutcome outcome; outcome = create("Patient/transactions/provide-patient-create.json"); - var id = outcome.getId(); + IIdType id = outcome.getId(); outcome = update("Patient/transactions/provide-patient-update.json", "Patient?_id=" + id.getIdPart() + "&identifier=" + PATIENT_ID); Assertions.assertEquals(id.getIdPart(), outcome.getId().getIdPart()); Assertions.assertEquals(id.getVersionIdPartAsLong() + 1, outcome.getId().getVersionIdPartAsLong()); - var patient = (Patient) outcome.getResource(); + Patient patient = (Patient) outcome.getResource(); Assertions.assertEquals(PATIENT_ID, patient.getIdentifier().get(0).getValue()); } diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/FindProcedureTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/FindProcedureTransactionIT.java index 425d302cf..19c94e3fb 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/FindProcedureTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/FindProcedureTransactionIT.java @@ -1,6 +1,8 @@ package org.ehrbase.fhirbridge.fhir.procedure; +import ca.uhn.fhir.rest.api.MethodOutcome; import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.Procedure; import org.junit.jupiter.api.Assertions; @@ -15,10 +17,10 @@ class FindProcedureTransactionIT extends AbstractTransactionIT { @Test void findProcedureRead() throws IOException { - var outcome = create("Procedure/transactions/provide-procedure-create.json"); - var id = outcome.getId(); + MethodOutcome outcome = create("Procedure/transactions/provide-procedure-create.json"); + IIdType id = outcome.getId(); - var procedure = read(id.getIdPart(), Procedure.class); + Procedure procedure = read(id.getIdPart(), Procedure.class); Assertions.assertNotNull(procedure); Assertions.assertNotNull(procedure.getId(), id.getIdPart()); @@ -27,10 +29,10 @@ void findProcedureRead() throws IOException { @Test void findProcedureVRead() throws IOException { - var outcome = create("Procedure/transactions/provide-procedure-create.json"); - var id = outcome.getId(); + MethodOutcome outcome = create("Procedure/transactions/provide-procedure-create.json"); + IIdType id = outcome.getId(); - var procedure = vread(id.getIdPart(), id.getVersionIdPart(), Procedure.class); + Procedure procedure = vread(id.getIdPart(), id.getVersionIdPart(), Procedure.class); Assertions.assertNotNull(procedure); Assertions.assertNotNull(procedure.getId(), id.getIdPart()); Assertions.assertNotNull(procedure.getMeta().getVersionId(), id.getVersionIdPart()); @@ -48,7 +50,7 @@ void findProcedureSearch() throws IOException { Assertions.assertEquals(3, bundle.getTotal()); bundle.getEntry().forEach(entry -> { - var procedure = (Procedure) entry.getResource(); + Procedure procedure = (Procedure) entry.getResource(); Assertions.assertEquals(PATIENT_ID, procedure.getSubject().getIdentifier().getValue()); Assertions.assertEquals(Procedure.ProcedureStatus.ENTEREDINERROR, procedure.getStatus()); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureTransactionIT.java index c15ae6794..49afa3d78 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/ProvideProcedureTransactionIT.java @@ -2,6 +2,7 @@ import ca.uhn.fhir.rest.api.MethodOutcome; import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.Procedure; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; @@ -15,7 +16,7 @@ class ProvideProcedureTransactionIT extends AbstractTransactionIT { @Test void provideProcedureCreate() throws IOException { - var outcome = create("Procedure/transactions/provide-procedure-create.json"); + MethodOutcome outcome = create("Procedure/transactions/provide-procedure-create.json"); Assertions.assertEquals(true, outcome.getCreated()); Assertions.assertNotNull(outcome.getId().getValue()); @@ -26,14 +27,14 @@ void provideProcedureConditionalUpdate() throws IOException { MethodOutcome outcome; outcome = create("Procedure/transactions/provide-procedure-create.json"); - var id = outcome.getId(); + IIdType id = outcome.getId(); outcome = update("Procedure/transactions/provide-procedure-update.json", "Procedure?_id=" + id.getIdPart() + "&subject.identifier=" + PATIENT_ID); Assertions.assertEquals(id.getIdPart(), outcome.getId().getIdPart()); Assertions.assertEquals(id.getVersionIdPartAsLong() + 1, outcome.getId().getVersionIdPartAsLong()); - var procedure = (Procedure) outcome.getResource(); + Procedure procedure = (Procedure) outcome.getResource(); Assertions.assertEquals(PATIENT_ID, procedure.getSubject().getIdentifier().getValue()); Assertions.assertEquals(Procedure.ProcedureStatus.ONHOLD, procedure.getStatus()); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseTransactionIT.java index af582720c..347666cce 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/questionnaireresponse/ProvideQuestionnaireResponseTransactionIT.java @@ -2,6 +2,7 @@ import ca.uhn.fhir.rest.api.MethodOutcome; import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; +import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.QuestionnaireResponse; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; @@ -15,7 +16,7 @@ class ProvideQuestionnaireResponseTransactionIT extends AbstractTransactionIT { @Test void provideQuestionnaireResponseCreate() throws IOException { - var outcome = create("QuestionnaireResponse/transactions/provide-questionnaire-response-create.json"); + MethodOutcome outcome = create("QuestionnaireResponse/transactions/provide-questionnaire-response-create.json"); Assertions.assertEquals(true, outcome.getCreated()); Assertions.assertNotNull(outcome.getId().getValue()); @@ -26,14 +27,14 @@ void provideQuestionnaireResponseConditionalUpdate() throws IOException { MethodOutcome outcome; outcome = create("QuestionnaireResponse/transactions/provide-questionnaire-response-create.json"); - var id = outcome.getId(); + IIdType id = outcome.getId(); outcome = update("QuestionnaireResponse/transactions/provide-questionnaire-response-update.json", "QuestionnaireResponse?_id=" + id.getIdPart() + "&patient.identifier=" + PATIENT_ID); Assertions.assertEquals(id.getIdPart(), outcome.getId().getIdPart()); Assertions.assertEquals(id.getVersionIdPartAsLong() + 1, outcome.getId().getVersionIdPartAsLong()); - var questionnaireResponse = (QuestionnaireResponse) outcome.getResource(); + QuestionnaireResponse questionnaireResponse = (QuestionnaireResponse) outcome.getResource(); Assertions.assertEquals(PATIENT_ID, questionnaireResponse.getSubject().getIdentifier().getValue()); Assertions.assertEquals(QuestionnaireResponse.QuestionnaireResponseStatus.AMENDED, questionnaireResponse.getStatus()); From 40c0e4d310d0f6861265417380133a73e74329a2 Mon Sep 17 00:00:00 2001 From: zhu13 <yufei.zhu@med.uni-goettingen.de> Date: Tue, 1 Jun 2021 14:03:32 +0200 Subject: [PATCH 091/141] Refactoring: rename packages virologisherBefund ->geccoVirologischerbefund; DnrAnordnung -> dnranordnung --- .../org/ehrbase/fhirbridge/config/ConversionConfiguration.java | 2 +- .../DnrAnordnungCompositionConverter.java | 2 +- .../PCRCompositionConverter.java | 2 +- .../PCRObservationConverter.java | 2 +- src/test/java/org/ehrbase/fhirbridge/fhir/consent/DnrIT.java | 2 +- .../java/org/ehrbase/fhirbridge/fhir/observation/PCRIT.java | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) rename src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/{DnrAnordnung => dnranordnung}/DnrAnordnungCompositionConverter.java (98%) rename src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/{virologischerBefund => geccoVirologischerbefund}/PCRCompositionConverter.java (97%) rename src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/{virologischerBefund => geccoVirologischerbefund}/PCRObservationConverter.java (97%) diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java index cd5cb70da..7dab7de07 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java @@ -32,7 +32,7 @@ import org.ehrbase.fhirbridge.ehr.converter.specific.sofascore.SofaScoreCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.symptom.SymptomCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.therapy.TherapyCompositionConverter; -import org.ehrbase.fhirbridge.ehr.converter.specific.virologischerBefund.PCRCompositionConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.geccoVirologischerbefund.PCRCompositionConverter; import org.ehrbase.fhirbridge.fhir.common.Profile; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/DnrAnordnung/DnrAnordnungCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/dnranordnung/DnrAnordnungCompositionConverter.java similarity index 98% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/DnrAnordnung/DnrAnordnungCompositionConverter.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/dnranordnung/DnrAnordnungCompositionConverter.java index a80dc94f9..17de78979 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/DnrAnordnung/DnrAnordnungCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/dnranordnung/DnrAnordnungCompositionConverter.java @@ -1,4 +1,4 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.DnrAnordnung; +package org.ehrbase.fhirbridge.ehr.converter.specific.dnranordnung; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import com.nedap.archie.rm.generic.PartySelf; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/virologischerBefund/PCRCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoVirologischerbefund/PCRCompositionConverter.java similarity index 97% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/virologischerBefund/PCRCompositionConverter.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoVirologischerbefund/PCRCompositionConverter.java index 535a8e9ac..26d34fd26 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/virologischerBefund/PCRCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoVirologischerbefund/PCRCompositionConverter.java @@ -1,4 +1,4 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.virologischerBefund; +package org.ehrbase.fhirbridge.ehr.converter.specific.geccoVirologischerbefund; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.ehrbase.fhirbridge.ehr.converter.generic.ObservationToCompositionConverter; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/virologischerBefund/PCRObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoVirologischerbefund/PCRObservationConverter.java similarity index 97% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/virologischerBefund/PCRObservationConverter.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoVirologischerbefund/PCRObservationConverter.java index 29008a6cd..1b4c4978a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/virologischerBefund/PCRObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoVirologischerbefund/PCRObservationConverter.java @@ -1,4 +1,4 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.virologischerBefund; +package org.ehrbase.fhirbridge.ehr.converter.specific.geccoVirologischerbefund; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import com.nedap.archie.rm.archetyped.FeederAudit; diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/consent/DnrIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/DnrIT.java index 6f6c5a74c..0eb8a3cd8 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/consent/DnrIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/consent/DnrIT.java @@ -2,7 +2,7 @@ import org.ehrbase.fhirbridge.comparators.CustomTemporalAcessorComparator; import org.ehrbase.fhirbridge.ehr.converter.ConversionException; -import org.ehrbase.fhirbridge.ehr.converter.specific.DnrAnordnung.DnrAnordnungCompositionConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.dnranordnung.DnrAnordnungCompositionConverter; import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.DNRAnordnungComposition; import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.DnrAnordnungEvaluation; import org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.definition.DnrAnordnungKategorieElement; diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/PCRIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/PCRIT.java index 66a1ee2b2..5c7437b56 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/PCRIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/PCRIT.java @@ -2,7 +2,7 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.ehrbase.fhirbridge.comparators.CustomTemporalAcessorComparator; -import org.ehrbase.fhirbridge.ehr.converter.specific.virologischerBefund.PCRCompositionConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.geccoVirologischerbefund.PCRCompositionConverter; import org.ehrbase.fhirbridge.ehr.opt.geccovirologischerbefundcomposition.GECCOVirologischerBefundComposition; import org.ehrbase.fhirbridge.ehr.opt.geccovirologischerbefundcomposition.definition.*; import org.ehrbase.fhirbridge.fhir.AbstractMappingTestSetupIT; From 3776fc223c7ed0a88ee857304f7453393d27e14f Mon Sep 17 00:00:00 2001 From: zhu13 <yufei.zhu@med.uni-goettingen.de> Date: Tue, 1 Jun 2021 16:33:15 +0200 Subject: [PATCH 092/141] Refactoring for review requests --- .../EncounterToAdminEntryConverter.java | 78 +++++++++++++++++++ .../ehr/converter/generic/TimeConverter.java | 16 ++-- ...tientenAufenthaltCompositionConverter.java | 7 +- ...sorgungsaufenthaltAdminEntryConverter.java | 39 +++++----- .../AufnahmedatenAdminEntryConverter.java | 11 +-- .../EntlassungsdatenAdminEntryConverter.java | 9 +-- 6 files changed, 113 insertions(+), 47 deletions(-) create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java new file mode 100644 index 000000000..ba90ca8b8 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java @@ -0,0 +1,78 @@ +package org.ehrbase.fhirbridge.ehr.converter.generic; + +import org.ehrbase.client.classgenerator.interfaces.EntryEntity; +import org.hl7.fhir.r4.model.Encounter; +import org.springframework.lang.NonNull; +import org.ehrbase.fhirbridge.fhir.support.Encounters; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.time.temporal.TemporalAccessor; + +public abstract class EncounterToAdminEntryConverter <E extends EntryEntity> extends EntryEntityConverter<Encounter, E> { + + @Override + public E convert(@NonNull Encounter resource) { + E entryEntity = super.convert(resource); + invokeTimeValues(entryEntity, resource); + return entryEntity; + } + + public void invokeTimeValues(E entryEntity, Encounter resource) { + if(Encounters.isNotEmpty(resource.getLocation())) { + invokeSetBeginEndValue(entryEntity, resource); + } + + invokeSetAufnahmeValue(entryEntity, resource); + invokeSetEntlassungValue(entryEntity, resource); + } + + public void invokeSetBeginEndValue(E entryEntity, Encounter resource){ + + try { + Encounter.EncounterLocationComponent location = resource.getLocation().get(0); + + Method setBeginnValue = entryEntity.getClass().getMethod("setBeginnValue", TemporalAccessor.class); + + if (TimeConverter.convertEncounterLocationTime(location).isPresent()) { + setBeginnValue.invoke(entryEntity, TimeConverter.convertEncounterLocationTime(location).get()); + } + + Method setEndValue = entryEntity.getClass().getMethod("setEndeValue", TemporalAccessor.class); + + if (TimeConverter.convertEncounterLocationEndTime(location).isPresent()) { + + setEndValue.invoke(entryEntity, TimeConverter.convertEncounterLocationEndTime(location).get()); + } + } catch (IllegalAccessException | InvocationTargetException exception) { + exception.printStackTrace(); + } catch (NoSuchMethodException ignored){ + //ignored + } + } + + public void invokeSetAufnahmeValue(E entryEntity, Encounter resource) { + try { + Method setDatumUhrzeitDerAufnahmeValue = entryEntity.getClass().getMethod("setDatumUhrzeitDerAufnahmeValue", TemporalAccessor.class); + setDatumUhrzeitDerAufnahmeValue.invoke(entryEntity, TimeConverter.convertEncounterTime(resource)); + } catch (IllegalAccessException | InvocationTargetException exception) { + exception.printStackTrace(); + } catch (NoSuchMethodException ignored){ + //ignored + } + } + + public void invokeSetEntlassungValue(E entryEntity, Encounter resource) { + try { + Method setDatumUhrzeitDerEntlassungValue = entryEntity.getClass().getMethod("setDatumUhrzeitDerEntlassungValue", TemporalAccessor.class); + + if (TimeConverter.convertEncounterEndTime(resource).isPresent()) { + setDatumUhrzeitDerEntlassungValue.invoke(entryEntity, TimeConverter.convertEncounterEndTime(resource).get()); + } + + } catch (IllegalAccessException | InvocationTargetException exception) { + exception.printStackTrace(); + } catch (NoSuchMethodException ignored){ + //ignored + } + } +} \ No newline at end of file diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java index 2e6a64057..50f59e001 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/TimeConverter.java @@ -160,23 +160,19 @@ public static Optional<TemporalAccessor> convertEncounterEndTime(Encounter encou public static Optional<TemporalAccessor> convertEncounterLocationTime(Encounter.EncounterLocationComponent location) { - if (location.getPeriod() == null) { + if (location.hasPeriod()) { + return Optional.of(OffsetDateTime.from(location.getPeriod().getStartElement().getValueAsCalendar().toZonedDateTime())); + } else { return Optional.empty(); } - - return Optional.of(OffsetDateTime.from(location.getPeriod().getStartElement().getValueAsCalendar().toZonedDateTime())); } public static Optional<TemporalAccessor> convertEncounterLocationEndTime(Encounter.EncounterLocationComponent location) { - if (location.getPeriod() == null) { - return Optional.empty(); - } - - if (!location.getPeriod().hasEndElement()) { + if (location.hasPeriod() && location.getPeriod().hasEndElement()) { + return Optional.of(OffsetDateTime.from(location.getPeriod().getEndElement().getValueAsCalendar().toZonedDateTime())); + } else { return Optional.empty(); } - - return Optional.of(OffsetDateTime.from(location.getPeriod().getEndElement().getValueAsCalendar().toZonedDateTime())); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java index 9108f83bd..c81d01193 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java @@ -21,12 +21,9 @@ public PatientenaufenthaltComposition convertInternal(@NonNull Encounter encount PatientenaufenthaltComposition retVal = new PatientenaufenthaltComposition(); - if (Encounters.isNotEmpty(encounter.getIdentifier())) { + if (Encounters.isNotEmpty(encounter.getIdentifier()) && Encounters.isNotEmpty(encounter.getType())) { - if (Encounters.isNotEmpty(encounter.getType())) { - - setFallCluster(retVal, encounter); - } + setFallCluster(retVal, encounter); } retVal.setVersorgungsaufenthalt(new VersorgungsaufenthaltAdminEntryConverter().convert(encounter)); diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/VersorgungsaufenthaltAdminEntryConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/VersorgungsaufenthaltAdminEntryConverter.java index 532b6cde0..f265c57bc 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/VersorgungsaufenthaltAdminEntryConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/VersorgungsaufenthaltAdminEntryConverter.java @@ -1,7 +1,6 @@ package org.ehrbase.fhirbridge.ehr.converter.specific.patientenaufenthalt; -import org.ehrbase.fhirbridge.ehr.converter.generic.EntryEntityConverter; -import org.ehrbase.fhirbridge.ehr.converter.generic.TimeConverter; +import org.ehrbase.fhirbridge.ehr.converter.generic.EncounterToAdminEntryConverter; import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungsaufenthaltAdminEntry; import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.FachlicheOrganisationseinheitCluster; import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.StandortCluster; @@ -11,7 +10,7 @@ import org.hl7.fhir.r4.model.Coding; import java.util.ArrayList; -public class VersorgungsaufenthaltAdminEntryConverter extends EntryEntityConverter<Encounter, VersorgungsaufenthaltAdminEntry> { +public class VersorgungsaufenthaltAdminEntryConverter extends EncounterToAdminEntryConverter<VersorgungsaufenthaltAdminEntry> { private static final String FACH_ABTEILUNGS_SCHLUESSEL_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel"; @@ -23,9 +22,6 @@ protected VersorgungsaufenthaltAdminEntry convertInternal(Encounter encounter) { Encounter.EncounterLocationComponent location = encounter.getLocation().get(0); - TimeConverter.convertEncounterLocationTime(location).ifPresent(versorgungsaufenthaltAdminEntry::setBeginnValue); - TimeConverter.convertEncounterLocationEndTime(location).ifPresent(versorgungsaufenthaltAdminEntry::setEndeValue); - versorgungsaufenthaltAdminEntry.setStandort(convertStandortCluster(location)); versorgungsaufenthaltAdminEntry.setKommentarValue(location.getLocation().getDisplay()); @@ -76,26 +72,31 @@ private StandortCluster convertStandortCluster(Encounter.EncounterLocationCompon private ArrayList<FachlicheOrganisationseinheitCluster> createFachlicheOrganisationseinheitClusterList(Encounter encounter) { - ArrayList<FachlicheOrganisationseinheitCluster> retVal = new ArrayList<>(); + if (encounter.hasServiceType() && encounter.getServiceType().getCoding() != null) { + return createFachlicheOrganisationseinheitClusterListFromCoding(encounter); + } else { + return new ArrayList<>(); + } + } - if (encounter.getServiceType() != null - && encounter.getServiceType().getCoding() != null) { + private ArrayList<FachlicheOrganisationseinheitCluster> createFachlicheOrganisationseinheitClusterListFromCoding(Encounter encounter) { - for(Coding fachAbteilungsSchluessel : encounter.getServiceType().getCoding()) { + ArrayList<FachlicheOrganisationseinheitCluster> retVal = new ArrayList<>(); - FachlicheOrganisationseinheitCluster fachlicheOrganisationseinheitCluster = new FachlicheOrganisationseinheitCluster(); + for(Coding fachAbteilungsSchluessel : encounter.getServiceType().getCoding()) { - if (fachAbteilungsSchluessel.getSystem().equals(FACH_ABTEILUNGS_SCHLUESSEL_CODE_SYSTEM) - && FachAbteilungsSchluesselDefiningCodeMap.getFachAbteilungsSchluesselMap().containsKey(fachAbteilungsSchluessel.getCode())) { + FachlicheOrganisationseinheitCluster fachlicheOrganisationseinheitCluster = new FachlicheOrganisationseinheitCluster(); - fachlicheOrganisationseinheitCluster.setFachabteilungsschluesselDefiningCode(FachAbteilungsSchluesselDefiningCodeMap.getFachAbteilungsSchluesselMap().get(fachAbteilungsSchluessel.getCode())); - } else { - throw new UnprocessableEntityException("Invalid Code " + fachAbteilungsSchluessel.getCode() + - " or Code System for 'Fachabteilungsschlüssel'."); - } + if (fachAbteilungsSchluessel.getSystem().equals(FACH_ABTEILUNGS_SCHLUESSEL_CODE_SYSTEM) + && FachAbteilungsSchluesselDefiningCodeMap.getFachAbteilungsSchluesselMap().containsKey(fachAbteilungsSchluessel.getCode())) { - retVal.add(fachlicheOrganisationseinheitCluster); + fachlicheOrganisationseinheitCluster.setFachabteilungsschluesselDefiningCode(FachAbteilungsSchluesselDefiningCodeMap.getFachAbteilungsSchluesselMap().get(fachAbteilungsSchluessel.getCode())); + } else { + throw new UnprocessableEntityException("Invalid Code " + fachAbteilungsSchluessel.getCode() + + " or Code System for 'Fachabteilungsschlüssel'."); } + + retVal.add(fachlicheOrganisationseinheitCluster); } return retVal; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/AufnahmedatenAdminEntryConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/AufnahmedatenAdminEntryConverter.java index f73374d88..af0c7afbb 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/AufnahmedatenAdminEntryConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/AufnahmedatenAdminEntryConverter.java @@ -1,7 +1,6 @@ package org.ehrbase.fhirbridge.ehr.converter.specific.stationaererversorgungsfall; -import org.ehrbase.fhirbridge.ehr.converter.generic.EntryEntityConverter; -import org.ehrbase.fhirbridge.ehr.converter.generic.TimeConverter; +import org.ehrbase.fhirbridge.ehr.converter.generic.EncounterToAdminEntryConverter; import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.AufnahmedatenAdminEntry; import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.AufnahmeanlassDefiningCode; import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.AufnahmegrundDefiningCode; @@ -11,7 +10,7 @@ import java.util.Optional; -public class AufnahmedatenAdminEntryConverter extends EntryEntityConverter<Encounter, AufnahmedatenAdminEntry> { +public class AufnahmedatenAdminEntryConverter extends EncounterToAdminEntryConverter<AufnahmedatenAdminEntry> { private static final String AUFNAHME_GRUND_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund"; private static final String AUFNAHME_ANLASS_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass"; @@ -22,8 +21,6 @@ protected AufnahmedatenAdminEntry convertInternal(Encounter encounter) { AufnahmedatenAdminEntry aufnahmedatenAdminEntry = new AufnahmedatenAdminEntry(); - aufnahmedatenAdminEntry.setDatumUhrzeitDerAufnahmeValue(TimeConverter.convertEncounterTime(encounter)); - convertAufnahmegrundDefiningCode(encounter).ifPresent(aufnahmedatenAdminEntry::setAufnahmegrundDefiningCode); convertAufnahmeanlassDefiningCode(encounter).ifPresent(aufnahmedatenAdminEntry::setAufnahmeanlassDefiningCode); @@ -33,7 +30,7 @@ protected AufnahmedatenAdminEntry convertInternal(Encounter encounter) { private Optional<AufnahmegrundDefiningCode> convertAufnahmegrundDefiningCode(Encounter encounter) { - if (encounter.getReasonCode() == null) { + if (!encounter.hasReasonCode()) { return Optional.empty(); } @@ -55,7 +52,7 @@ private Optional<AufnahmegrundDefiningCode> convertAufnahmegrundDefiningCode(Enc private Optional<AufnahmeanlassDefiningCode> convertAufnahmeanlassDefiningCode(Encounter encounter) { - if (encounter.getHospitalization() == null) { + if (!encounter.hasHospitalization()) { return Optional.empty(); } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/EntlassungsdatenAdminEntryConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/EntlassungsdatenAdminEntryConverter.java index 78d569810..d6cd5b7f1 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/EntlassungsdatenAdminEntryConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/EntlassungsdatenAdminEntryConverter.java @@ -1,7 +1,6 @@ package org.ehrbase.fhirbridge.ehr.converter.specific.stationaererversorgungsfall; -import org.ehrbase.fhirbridge.ehr.converter.generic.EntryEntityConverter; -import org.ehrbase.fhirbridge.ehr.converter.generic.TimeConverter; +import org.ehrbase.fhirbridge.ehr.converter.generic.EncounterToAdminEntryConverter; import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.EntlassungsdatenAdminEntry; import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.ArtDerEntlassungDefiningCode; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; @@ -10,7 +9,7 @@ import java.util.Optional; -public class EntlassungsdatenAdminEntryConverter extends EntryEntityConverter<Encounter, EntlassungsdatenAdminEntry>{ +public class EntlassungsdatenAdminEntryConverter extends EncounterToAdminEntryConverter<EntlassungsdatenAdminEntry>{ private static final String ART_DER_ENTLASSUNG_CODE_SYSTEM = "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund"; @@ -19,8 +18,6 @@ protected EntlassungsdatenAdminEntry convertInternal(Encounter encounter) { EntlassungsdatenAdminEntry entlassungsdatenAdminEntry = new EntlassungsdatenAdminEntry(); - TimeConverter.convertEncounterEndTime(encounter).ifPresent(entlassungsdatenAdminEntry::setDatumUhrzeitDerEntlassungValue); - convertArtDerEntlassungDefiningCode(encounter).ifPresent(entlassungsdatenAdminEntry::setArtDerEntlassungDefiningCode); return entlassungsdatenAdminEntry; @@ -28,7 +25,7 @@ protected EntlassungsdatenAdminEntry convertInternal(Encounter encounter) { private Optional<ArtDerEntlassungDefiningCode> convertArtDerEntlassungDefiningCode(Encounter encounter) { - if (encounter.getHospitalization() == null) { + if (!encounter.hasHospitalization()) { return Optional.empty(); } From 9dd47128d6b8661f78b306c508df0822a04f6181 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 1 Jun 2021 16:36:25 +0200 Subject: [PATCH 093/141] Resolves issue #337 --- .../BundleProviderResponseProcessor.java | 45 ------ .../processor/FindResourceProcessor.java | 96 ++++++++++++ .../camel/route/AbstractRouteBuilder.java | 11 -- .../camel/route/AuditEventRoutes.java | 4 +- .../camel/route/ConditionRoutes.java | 7 +- .../fhirbridge/camel/route/ConsentRoutes.java | 7 +- .../camel/route/DiagnosticReportRoutes.java | 8 +- .../route/MedicationStatementRoutes.java | 7 +- .../camel/route/ObservationRoutes.java | 8 +- .../fhirbridge/camel/route/PatientRoutes.java | 9 +- .../camel/route/ProcedureRoutes.java | 8 +- .../route/QuestionnaireResponseRoutes.java | 8 +- .../ProcessorConfiguration.java} | 53 ++++++- .../auditevent/FindAuditEventProvider.java | 143 ++++++++++-------- 14 files changed, 240 insertions(+), 174 deletions(-) delete mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/processor/BundleProviderResponseProcessor.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/processor/FindResourceProcessor.java rename src/main/java/org/ehrbase/fhirbridge/config/{CamelProcessorConfiguration.java => camel/ProcessorConfiguration.java} (59%) diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/BundleProviderResponseProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/BundleProviderResponseProcessor.java deleted file mode 100644 index 309f5bf23..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/BundleProviderResponseProcessor.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.camel.processor; - -import ca.uhn.fhir.rest.api.server.IBundleProvider; -import org.apache.camel.Exchange; -import org.apache.camel.Processor; -import org.openehealth.ipf.commons.ihe.fhir.Constants; -import org.springframework.stereotype.Component; - -/** - * Camel {@link Processor} that handles response messages using the {@link IBundleProvider} returned by search operations - * - * @since 1.0.0 - */ -@Component -public class BundleProviderResponseProcessor implements Processor { - - @Override - public void process(Exchange exchange) throws Exception { - IBundleProvider bundleProvider = exchange.getIn().getMandatoryBody(IBundleProvider.class); - - if (exchange.getIn().getHeaders().containsKey(Constants.FHIR_REQUEST_SIZE_ONLY)) { - exchange.getMessage().setHeader(Constants.FHIR_REQUEST_SIZE_ONLY, bundleProvider.size()); - } else { - Integer from = exchange.getIn().getHeader(Constants.FHIR_FROM_INDEX, Integer.class); - Integer to = exchange.getIn().getHeader(Constants.FHIR_TO_INDEX, Integer.class); - exchange.getMessage().setBody(bundleProvider.getResources(from, to)); - } - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/FindResourceProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/FindResourceProcessor.java new file mode 100644 index 000000000..34d805eb6 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/FindResourceProcessor.java @@ -0,0 +1,96 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.camel.processor; + +import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; +import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.rest.api.RestOperationTypeEnum; +import ca.uhn.fhir.rest.api.server.IBundleProvider; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import org.apache.camel.Exchange; +import org.apache.camel.InvalidPayloadException; +import org.apache.camel.Processor; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IIdType; +import org.openehealth.ipf.commons.ihe.fhir.Constants; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * Generic Processor that implements 'Find [resource type]' transaction using the provided {@link IFhirResourceDao}. + * + * @param <T> the type of the FHIR resource + * @since 1.2.0 + */ +public class FindResourceProcessor<T extends IBaseResource> implements Processor { + + private static final Logger LOG = LoggerFactory.getLogger(FindResourceProcessor.class); + + private final IFhirResourceDao<T> resourceDao; + + public FindResourceProcessor(IFhirResourceDao<T> resourceDao) { + this.resourceDao = resourceDao; + } + + @Override + public void process(Exchange exchange) throws Exception { + LOG.trace("Processing..."); + + if (isSearchOperation(exchange)) { + handleSearchOperation(exchange); + } else { + handleReadOperation(exchange); + } + } + + private void handleSearchOperation(Exchange exchange) throws InvalidPayloadException { + LOG.debug("Execute 'search' operation"); + + SearchParameterMap parameters = exchange.getIn().getMandatoryBody(SearchParameterMap.class); + + IBundleProvider bundleProvider = resourceDao.search(parameters, extractRequestDetails(exchange)); + + if (exchange.getIn().getHeaders().containsKey(Constants.FHIR_REQUEST_SIZE_ONLY)) { + exchange.getMessage().setHeader(Constants.FHIR_REQUEST_SIZE_ONLY, bundleProvider.size()); + } else { + Integer from = exchange.getIn().getHeader(Constants.FHIR_FROM_INDEX, Integer.class); + Integer to = exchange.getIn().getHeader(Constants.FHIR_TO_INDEX, Integer.class); + exchange.getMessage().setBody(bundleProvider.getResources(from, to)); + } + } + + private void handleReadOperation(Exchange exchange) throws InvalidPayloadException { + LOG.debug("Execute 'read'/'vread' operation"); + + IIdType id = exchange.getIn().getMandatoryBody(IIdType.class); + exchange.getMessage().setBody(resourceDao.read(id, extractRequestDetails(exchange))); + } + + private boolean isSearchOperation(Exchange exchange) { + RequestDetails requestDetails = extractRequestDetails(exchange); + return requestDetails.getRestOperationType() == RestOperationTypeEnum.SEARCH_TYPE; + } + + private RequestDetails extractRequestDetails(Exchange exchange) { + RequestDetails requestDetails = exchange.getIn().getHeader(Constants.FHIR_REQUEST_DETAILS, RequestDetails.class); + if (requestDetails == null) { + throw new IllegalStateException("RequestDetails must not be null"); + } + return requestDetails; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/AbstractRouteBuilder.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/AbstractRouteBuilder.java index 8604178c1..fd98db993 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/AbstractRouteBuilder.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/AbstractRouteBuilder.java @@ -1,10 +1,6 @@ package org.ehrbase.fhirbridge.camel.route; -import ca.uhn.fhir.rest.api.RestOperationTypeEnum; -import ca.uhn.fhir.rest.api.server.RequestDetails; -import org.apache.camel.Predicate; import org.apache.camel.builder.RouteBuilder; -import org.openehealth.ipf.commons.ihe.fhir.Constants; import org.springframework.beans.factory.annotation.Value; public abstract class AbstractRouteBuilder extends RouteBuilder { @@ -21,11 +17,4 @@ public void configure() throws Exception { onException(Exception.class) .process("defaultExceptionHandler"); } - - protected Predicate isSearchOperation() { - return exchange -> { - RequestDetails requestDetails = exchange.getIn().getHeader(Constants.FHIR_REQUEST_DETAILS, RequestDetails.class); - return requestDetails.getRestOperationType() == RestOperationTypeEnum.SEARCH_TYPE; - }; - } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/AuditEventRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/AuditEventRoutes.java index 4b7eda06e..a5060119e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/AuditEventRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/AuditEventRoutes.java @@ -35,8 +35,8 @@ public void configure() throws Exception { // 'Find AuditEvent' route definition from("audit-event-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") - .to("bean:auditEventDao?method=search(${body}, ${headers.FhirRequestDetails})") - .process("bundleProviderResponseProcessor"); + .routeId("find-audit-event-route") + .process("findAuditEventProcessor"); // @formatter:on } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java index b57fb3feb..680ad2883 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java @@ -45,12 +45,7 @@ public void configure() throws Exception { // Route: Find Condition from("condition-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") .routeId("find-condition-route") - .choice() - .when(isSearchOperation()) - .to("bean:conditionDao?method=search(${body}, ${headers.FhirRequestDetails})") - .process("bundleProviderResponseProcessor") - .otherwise() - .to("bean:conditionDao?method=read(${body}, ${headers.FhirRequestDetails})"); + .process("findConditionProcessor"); // @formatter:on } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java index 9269207f6..4cf8bd341 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java @@ -45,12 +45,7 @@ public void configure() throws Exception { // Route: Find Consent from("consent-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") .routeId("find-consent-route") - .choice() - .when(isSearchOperation()) - .to("bean:consentDao?method=search(${body}, ${headers.FhirRequestDetails})") - .process("bundleProviderResponseProcessor") - .otherwise() - .to("bean:consentDao?method=read(${body}, ${headers.FhirRequestDetails})"); + .process("findConsentProcessor"); // @formatter:on } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java index 3f91b5145..abe0af3ad 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java @@ -51,12 +51,8 @@ public void configure() throws Exception { // 'Find Diagnostic Report' route definition from("diagnostic-report-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") - .choice() - .when(isSearchOperation()) - .to("bean:diagnosticReportDao?method=search(${body}, ${headers.FhirRequestDetails})") - .process("bundleProviderResponseProcessor") - .otherwise() - .to("bean:diagnosticReportDao?method=read(${body}, ${headers.FhirRequestDetails})"); + .routeId("find-diagnostic-report-route") + .process("findDiagnosticReportProcessor"); // @formatter:on } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java index 2c919f53d..7eb2cb017 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java @@ -45,12 +45,7 @@ public void configure() throws Exception { // Route: Find Medication Statement from("medication-statement-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") .routeId("find-medication-statement-route") - .choice() - .when(isSearchOperation()) - .to("bean:medicationStatementDao?method=search(${body}, ${headers.FhirRequestDetails})") - .process("bundleProviderResponseProcessor") - .otherwise() - .to("bean:medicationStatementDao?method=read(${body}, ${headers.FhirRequestDetails})"); + .process("findMedicationStatementProcessor"); // @formatter:on } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java index 1392ad2cc..4351f02d1 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java @@ -51,12 +51,8 @@ public void configure() throws Exception { // 'Find Observation' route definition from("observation-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") - .choice() - .when(isSearchOperation()) - .to("bean:observationDao?method=search(${body}, ${headers.FhirRequestDetails})") - .process("bundleProviderResponseProcessor") - .otherwise() - .to("bean:observationDao?method=read(${body}, ${headers.FhirRequestDetails})"); + .routeId("find-observation-route") + .process("findObservationProcessor"); // @formatter:on } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java index a927b99b9..de43d061b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java @@ -44,12 +44,9 @@ public void configure() throws Exception { // Route: Find Patient from("patient-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") - .choice() - .when(isSearchOperation()) - .to("bean:patientDao?method=search(${body}, ${headers.FhirRequestDetails})") - .process("bundleProviderResponseProcessor") - .otherwise() - .to("bean:patientDao?method=read(${body}, ${headers.FhirRequestDetails})"); + .routeId("find-patient-route") + .process("findPatientProcessor"); + // @formatter:on } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java index b4a52e77e..9010b2f0b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java @@ -46,12 +46,8 @@ public void configure() throws Exception { // Route: 'Find Procedure' from("procedure-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") - .choice() - .when(isSearchOperation()) - .to("bean:procedureDao?method=search(${body}, ${headers.FhirRequestDetails})") - .process("bundleProviderResponseProcessor") - .otherwise() - .to("bean:procedureDao?method=read(${body}, ${headers.FhirRequestDetails})"); + .routeId("find-procedure-route") + .process("findProcedureProcessor"); // @formatter:on } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java index 9fb1b211d..b763850cb 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java @@ -46,12 +46,8 @@ public void configure() throws Exception { // Route: Find Questionnaire-Response from("questionnaire-response-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") - .choice() - .when(isSearchOperation()) - .to("bean:questionnaireResponseDao?method=search(${body}, ${headers.FhirRequestDetails})") - .process("bundleProviderResponseProcessor") - .otherwise() - .to("bean:questionnaireResponseDao?method=read(${body}, ${headers.FhirRequestDetails})"); + .routeId("find-questionnaire-response-route") + .process("findQuestionnaireResponseProcessor"); // @formatter:on } diff --git a/src/main/java/org/ehrbase/fhirbridge/config/CamelProcessorConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java similarity index 59% rename from src/main/java/org/ehrbase/fhirbridge/config/CamelProcessorConfiguration.java rename to src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java index 18b836452..0cb37cd67 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/CamelProcessorConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java @@ -1,8 +1,10 @@ -package org.ehrbase.fhirbridge.config; +package org.ehrbase.fhirbridge.config.camel; import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; +import org.ehrbase.fhirbridge.camel.processor.FindResourceProcessor; import org.ehrbase.fhirbridge.camel.processor.ProvideResourcePersistenceProcessor; import org.ehrbase.fhirbridge.core.repository.ResourceMapRepository; +import org.hl7.fhir.r4.model.AuditEvent; import org.hl7.fhir.r4.model.Condition; import org.hl7.fhir.r4.model.Consent; import org.hl7.fhir.r4.model.DiagnosticReport; @@ -15,11 +17,11 @@ import org.springframework.context.annotation.Configuration; @Configuration -public class CamelProcessorConfiguration { +public class ProcessorConfiguration { private final ResourceMapRepository resourceMapRepository; - public CamelProcessorConfiguration(ResourceMapRepository resourceMapRepository) { + public ProcessorConfiguration(ResourceMapRepository resourceMapRepository) { this.resourceMapRepository = resourceMapRepository; } @@ -62,4 +64,49 @@ public ProvideResourcePersistenceProcessor<Procedure> provideProcedurePersistenc public ProvideResourcePersistenceProcessor<QuestionnaireResponse> provideQuestionnaireResponsePersistenceProcessor(IFhirResourceDao<QuestionnaireResponse> questionnaireResponseDao) { return new ProvideResourcePersistenceProcessor<>(questionnaireResponseDao, QuestionnaireResponse.class, resourceMapRepository); } + + @Bean + public FindResourceProcessor<AuditEvent> findAuditEventProcessor(IFhirResourceDao<AuditEvent> auditEventDao) { + return new FindResourceProcessor<>(auditEventDao); + } + + @Bean + public FindResourceProcessor<Condition> findConditionProcessor(IFhirResourceDao<Condition> conditionDao) { + return new FindResourceProcessor<>(conditionDao); + } + + @Bean + public FindResourceProcessor<Consent> findConsentProcessor(IFhirResourceDao<Consent> consentDao) { + return new FindResourceProcessor<>(consentDao); + } + + @Bean + public FindResourceProcessor<DiagnosticReport> findDiagnosticReportProcessor(IFhirResourceDao<DiagnosticReport> diagnosticReportDao) { + return new FindResourceProcessor<>(diagnosticReportDao); + } + + @Bean + public FindResourceProcessor<Observation> findObservationProcessor(IFhirResourceDao<Observation> observationDao) { + return new FindResourceProcessor<>(observationDao); + } + + @Bean + public FindResourceProcessor<MedicationStatement> findMedicationStatementProcessor(IFhirResourceDao<MedicationStatement> medicationStatementDao) { + return new FindResourceProcessor<>(medicationStatementDao); + } + + @Bean + public FindResourceProcessor<Patient> findPatientProcessor(IFhirResourceDao<Patient> patientDao) { + return new FindResourceProcessor<>(patientDao); + } + + @Bean + public FindResourceProcessor<Procedure> findProcedureProcessor(IFhirResourceDao<Procedure> procedureDao) { + return new FindResourceProcessor<>(procedureDao); + } + + @Bean + public FindResourceProcessor<QuestionnaireResponse> findQuestionnaireResponseProcessor(IFhirResourceDao<QuestionnaireResponse> questionnaireResponseDao) { + return new FindResourceProcessor<>(questionnaireResponseDao); + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/auditevent/FindAuditEventProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/auditevent/FindAuditEventProvider.java index 2dcde6e6a..35caccdab 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/auditevent/FindAuditEventProvider.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/auditevent/FindAuditEventProvider.java @@ -18,8 +18,10 @@ import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; import ca.uhn.fhir.rest.annotation.Count; +import ca.uhn.fhir.rest.annotation.IdParam; import ca.uhn.fhir.rest.annotation.Offset; import ca.uhn.fhir.rest.annotation.OptionalParam; +import ca.uhn.fhir.rest.annotation.Read; import ca.uhn.fhir.rest.annotation.Search; import ca.uhn.fhir.rest.annotation.Sort; import ca.uhn.fhir.rest.api.Constants; @@ -33,6 +35,7 @@ import ca.uhn.fhir.rest.param.UriAndListParam; import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.r4.model.AuditEvent; +import org.hl7.fhir.r4.model.IdType; import org.hl7.fhir.r4.model.ResourceType; import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; @@ -45,77 +48,87 @@ * * @since 1.0.0 */ -@SuppressWarnings({"unused", "java:S107", "DuplicatedCode"}) +@SuppressWarnings("java:S107") public class FindAuditEventProvider extends AbstractPlainProvider { - @Search(type = AuditEvent.class) - public IBundleProvider searchAuditEvent(@OptionalParam(name = IAnyResource.SP_RES_ID) TokenAndListParam id, - @OptionalParam(name = IAnyResource.SP_RES_LANGUAGE) StringAndListParam language, - @OptionalParam(name = Constants.PARAM_LASTUPDATED) DateRangeParam lastUpdated, - @OptionalParam(name = Constants.PARAM_PROFILE) UriAndListParam profile, - @OptionalParam(name = Constants.PARAM_SOURCE) UriAndListParam resourceSource, - @OptionalParam(name = Constants.PARAM_SECURITY) TokenAndListParam security, - @OptionalParam(name = Constants.PARAM_TAG) TokenAndListParam tag, - @OptionalParam(name = Constants.PARAM_CONTENT) StringAndListParam content, - @OptionalParam(name = Constants.PARAM_TEXT) StringAndListParam text, - @OptionalParam(name = Constants.PARAM_FILTER) StringAndListParam filter, - @OptionalParam(name = AuditEvent.SP_ACTION) TokenAndListParam action, - @OptionalParam(name = AuditEvent.SP_ADDRESS) StringAndListParam address, - @OptionalParam(name = AuditEvent.SP_AGENT) ReferenceAndListParam agent, - @OptionalParam(name = AuditEvent.SP_AGENT_NAME) StringAndListParam agentName, - @OptionalParam(name = AuditEvent.SP_AGENT_ROLE) TokenAndListParam agentRole, - @OptionalParam(name = AuditEvent.SP_ALTID) TokenAndListParam altId, - @OptionalParam(name = AuditEvent.SP_DATE) DateRangeParam date, - @OptionalParam(name = AuditEvent.SP_ENTITY) ReferenceAndListParam entity, - @OptionalParam(name = AuditEvent.SP_ENTITY_NAME) StringAndListParam entityName, - @OptionalParam(name = AuditEvent.SP_ENTITY_ROLE) TokenAndListParam entityRole, - @OptionalParam(name = AuditEvent.SP_ENTITY_TYPE) TokenAndListParam entityType, - @OptionalParam(name = AuditEvent.SP_OUTCOME) TokenAndListParam outcome, - @OptionalParam(name = AuditEvent.SP_PATIENT) ReferenceAndListParam patient, - @OptionalParam(name = AuditEvent.SP_POLICY) UriAndListParam policy, - @OptionalParam(name = AuditEvent.SP_SITE) TokenAndListParam site, - @OptionalParam(name = AuditEvent.SP_SOURCE) ReferenceAndListParam source, - @OptionalParam(name = AuditEvent.SP_SUBTYPE) TokenAndListParam subtype, - @OptionalParam(name = AuditEvent.SP_TYPE) TokenAndListParam type, - @Count Integer count, @Offset Integer offset, @Sort SortSpec sort, - RequestDetails requestDetails, HttpServletRequest request, HttpServletResponse response) { + @Read(version = true) + public AuditEvent read(@IdParam IdType id, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + + return requestResource(id, null, AuditEvent.class, request, response, requestDetails); + } - SearchParameterMap searchParams = new SearchParameterMap(); - searchParams.add(IAnyResource.SP_RES_ID, id); - searchParams.add(IAnyResource.SP_RES_LANGUAGE, language); + @Search(type = AuditEvent.class) + public IBundleProvider search(@OptionalParam(name = IAnyResource.SP_RES_ID) TokenAndListParam id, + @OptionalParam(name = IAnyResource.SP_RES_LANGUAGE) StringAndListParam language, + @OptionalParam(name = Constants.PARAM_LASTUPDATED) DateRangeParam lastUpdated, + @OptionalParam(name = Constants.PARAM_PROFILE) UriAndListParam profile, + @OptionalParam(name = Constants.PARAM_SOURCE) UriAndListParam resourceSource, + @OptionalParam(name = Constants.PARAM_SECURITY) TokenAndListParam security, + @OptionalParam(name = Constants.PARAM_TAG) TokenAndListParam tag, + @OptionalParam(name = Constants.PARAM_CONTENT) StringAndListParam content, + @OptionalParam(name = Constants.PARAM_TEXT) StringAndListParam text, + @OptionalParam(name = Constants.PARAM_FILTER) StringAndListParam filter, + @OptionalParam(name = AuditEvent.SP_ACTION) TokenAndListParam action, + @OptionalParam(name = AuditEvent.SP_ADDRESS) StringAndListParam address, + @OptionalParam(name = AuditEvent.SP_AGENT) ReferenceAndListParam agent, + @OptionalParam(name = AuditEvent.SP_AGENT_NAME) StringAndListParam agentName, + @OptionalParam(name = AuditEvent.SP_AGENT_ROLE) TokenAndListParam agentRole, + @OptionalParam(name = AuditEvent.SP_ALTID) TokenAndListParam altId, + @OptionalParam(name = AuditEvent.SP_DATE) DateRangeParam date, + @OptionalParam(name = AuditEvent.SP_ENTITY) ReferenceAndListParam entity, + @OptionalParam(name = AuditEvent.SP_ENTITY_NAME) StringAndListParam entityName, + @OptionalParam(name = AuditEvent.SP_ENTITY_ROLE) TokenAndListParam entityRole, + @OptionalParam(name = AuditEvent.SP_ENTITY_TYPE) TokenAndListParam entityType, + @OptionalParam(name = AuditEvent.SP_OUTCOME) TokenAndListParam outcome, + @OptionalParam(name = AuditEvent.SP_PATIENT) ReferenceAndListParam patient, + @OptionalParam(name = AuditEvent.SP_POLICY) UriAndListParam policy, + @OptionalParam(name = AuditEvent.SP_SITE) TokenAndListParam site, + @OptionalParam(name = AuditEvent.SP_SOURCE) ReferenceAndListParam source, + @OptionalParam(name = AuditEvent.SP_SUBTYPE) TokenAndListParam subtype, + @OptionalParam(name = AuditEvent.SP_TYPE) TokenAndListParam type, + @Count Integer count, @Offset Integer offset, @Sort SortSpec sort, + RequestDetails requestDetails, HttpServletRequest request, HttpServletResponse response) { - searchParams.add(Constants.PARAM_PROFILE, profile); - searchParams.add(Constants.PARAM_SOURCE, resourceSource); - searchParams.add(Constants.PARAM_SECURITY, security); - searchParams.add(Constants.PARAM_TAG, tag); - searchParams.add(Constants.PARAM_CONTENT, content); - searchParams.add(Constants.PARAM_TEXT, text); - searchParams.add(Constants.PARAM_FILTER, filter); + SearchParameterMap parameters = new SearchParameterMap(); - searchParams.add(AuditEvent.SP_ACTION, action); - searchParams.add(AuditEvent.SP_ADDRESS, address); - searchParams.add(AuditEvent.SP_AGENT, agent); - searchParams.add(AuditEvent.SP_AGENT_NAME, agentName); - searchParams.add(AuditEvent.SP_AGENT_ROLE, agentRole); - searchParams.add(AuditEvent.SP_ALTID, altId); - searchParams.add(AuditEvent.SP_DATE, date); - searchParams.add(AuditEvent.SP_ENTITY, entity); - searchParams.add(AuditEvent.SP_ENTITY_NAME, entityName); - searchParams.add(AuditEvent.SP_ENTITY_ROLE, entityRole); - searchParams.add(AuditEvent.SP_ENTITY_TYPE, entityType); - searchParams.add(AuditEvent.SP_OUTCOME, outcome); - searchParams.add(AuditEvent.SP_PATIENT, patient); - searchParams.add(AuditEvent.SP_POLICY, policy); - searchParams.add(AuditEvent.SP_SITE, site); - searchParams.add(AuditEvent.SP_SOURCE, source); - searchParams.add(AuditEvent.SP_SUBTYPE, subtype); - searchParams.add(AuditEvent.SP_TYPE, type); + // Common Parameters + parameters.add(IAnyResource.SP_RES_ID, id); + parameters.add(IAnyResource.SP_RES_LANGUAGE, language); + parameters.add(Constants.PARAM_PROFILE, profile); + parameters.add(Constants.PARAM_SOURCE, resourceSource); + parameters.add(Constants.PARAM_SECURITY, security); + parameters.add(Constants.PARAM_TAG, tag); + parameters.add(Constants.PARAM_CONTENT, content); + parameters.add(Constants.PARAM_TEXT, text); + parameters.add(Constants.PARAM_FILTER, filter); - searchParams.setLastUpdated(lastUpdated); - searchParams.setCount(count); - searchParams.setOffset(offset); - searchParams.setSort(sort); + // AuditEvent Parameters + parameters.add(AuditEvent.SP_ACTION, action); + parameters.add(AuditEvent.SP_ADDRESS, address); + parameters.add(AuditEvent.SP_AGENT, agent); + parameters.add(AuditEvent.SP_AGENT_NAME, agentName); + parameters.add(AuditEvent.SP_AGENT_ROLE, agentRole); + parameters.add(AuditEvent.SP_ALTID, altId); + parameters.add(AuditEvent.SP_DATE, date); + parameters.add(AuditEvent.SP_ENTITY, entity); + parameters.add(AuditEvent.SP_ENTITY_NAME, entityName); + parameters.add(AuditEvent.SP_ENTITY_ROLE, entityRole); + parameters.add(AuditEvent.SP_ENTITY_TYPE, entityType); + parameters.add(AuditEvent.SP_OUTCOME, outcome); + parameters.add(AuditEvent.SP_PATIENT, patient); + parameters.add(AuditEvent.SP_POLICY, policy); + parameters.add(AuditEvent.SP_SITE, site); + parameters.add(AuditEvent.SP_SOURCE, source); + parameters.add(AuditEvent.SP_SUBTYPE, subtype); + parameters.add(AuditEvent.SP_TYPE, type); + parameters.setLastUpdated(lastUpdated); + parameters.setCount(count); + parameters.setOffset(offset); + parameters.setSort(sort); - return requestBundleProvider(searchParams, null, ResourceType.AuditEvent.name(), request, response, requestDetails); + return requestBundleProvider(parameters, null, ResourceType.AuditEvent.name(), request, response, requestDetails); } } From 843164fc663ee172217715b9a53974381a014077 Mon Sep 17 00:00:00 2001 From: zhu13 <yufei.zhu@med.uni-goettingen.de> Date: Wed, 2 Jun 2021 17:00:47 +0200 Subject: [PATCH 094/141] fix with Refactoring in develop --- ...nt.java => ProvideEncounterComponent.java} | 10 ++-- .../fhirbridge/camel/route/CommonRoutes.java | 10 ++-- .../camel/route/EncounterRoutes.java | 52 +++++++++++-------- .../config/CamelProcessorConfiguration.java | 6 +++ .../config/HapiFhirJpaConfiguration.java | 9 ++++ .../PatientenaufenthaltComposition.java | 3 +- ...tationaererVersorgungsfallComposition.java | 3 +- .../fhirbridge/fhir/FhirBridgeEventType.java | 5 ++ .../encounter/CreateEncounterProvider.java | 26 ---------- .../encounter/FindEncounterAuditStrategy.java | 4 +- ...ava => ProvideEncounterAuditStrategy.java} | 4 +- .../encounter/ProvideEncounterProvider.java | 48 +++++++++++++++++ ....java => ProvideEncounterTransaction.java} | 12 ++--- .../apache/camel/component/encounter-create | 1 - .../apache/camel/component/encounter-provide | 1 + 15 files changed, 122 insertions(+), 72 deletions(-) rename src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/encounter/{CreateEncounterComponent.java => ProvideEncounterComponent.java} (52%) delete mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterProvider.java rename src/main/java/org/ehrbase/fhirbridge/fhir/encounter/{CreateEncounterAuditStrategy.java => ProvideEncounterAuditStrategy.java} (80%) create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/encounter/ProvideEncounterProvider.java rename src/main/java/org/ehrbase/fhirbridge/fhir/encounter/{CreateEncounterTransaction.java => ProvideEncounterTransaction.java} (63%) delete mode 100644 src/main/resources/META-INF/services/org/apache/camel/component/encounter-create create mode 100644 src/main/resources/META-INF/services/org/apache/camel/component/encounter-provide diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/encounter/CreateEncounterComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/encounter/ProvideEncounterComponent.java similarity index 52% rename from src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/encounter/CreateEncounterComponent.java rename to src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/encounter/ProvideEncounterComponent.java index 8ff4135be..6f6ab8853 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/encounter/CreateEncounterComponent.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/encounter/ProvideEncounterComponent.java @@ -1,17 +1,17 @@ package org.ehrbase.fhirbridge.camel.component.fhir.encounter; -import org.ehrbase.fhirbridge.fhir.encounter.CreateEncounterTransaction; +import org.ehrbase.fhirbridge.fhir.encounter.ProvideEncounterTransaction; import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; /** - * Camel {@link org.apache.camel.Component Component} that handles 'Create Encounter' transaction. + * Camel {@link org.apache.camel.Component Component} that handles 'Provide Encounter' transaction. * * @since 1.0.0 */ -public class CreateEncounterComponent extends CustomFhirComponent<GenericFhirAuditDataset> { +public class ProvideEncounterComponent extends CustomFhirComponent<GenericFhirAuditDataset> { - public CreateEncounterComponent() { - super(new CreateEncounterTransaction()); + public ProvideEncounterComponent() { + super(new ProvideEncounterTransaction()); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java index cb6dc3636..312916029 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java @@ -24,17 +24,21 @@ public void configure() throws Exception { .doCatch(ConversionException.class) .throwException(UnprocessableEntityException.class, "${exception.message}") .end() + .to("direct:internal-provide-resource-after-converter"); + + from("direct:internal-provide-resource-after-converter") + .routeId("internal-provide-resource-after-converter-route") .choice() .when(header(CamelConstants.COMPOSITION_VERSION_UID).isNotNull()) .process(exchange -> { var composition = exchange.getIn().getMandatoryBody(CompositionEntity.class); composition.setVersionUid(new VersionUid(exchange.getIn().getHeader(CamelConstants.COMPOSITION_VERSION_UID, String.class))); }) - .end() + .end() .doTry() - .to("ehr-composition:producer?operation=mergeCompositionEntity") + .to("ehr-composition:producer?operation=mergeCompositionEntity") .doCatch(WrongStatusCodeException.class) - .throwException(UnprocessableEntityException.class, "${exception.message}") + .throwException(UnprocessableEntityException.class, "${exception.message}") .end() .process("provideResourceResponseProcessor"); diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java index 964a013f5..db54238f4 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java @@ -1,11 +1,13 @@ package org.ehrbase.fhirbridge.camel.route; +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.FhirBridgeConstants; +import org.ehrbase.fhirbridge.camel.CamelConstants; import org.ehrbase.fhirbridge.fhir.common.Profile; import org.ehrbase.fhirbridge.fhir.support.Encounters; import org.hl7.fhir.r4.model.Encounter; import org.springframework.stereotype.Component; +import org.ehrbase.fhirbridge.ehr.converter.ConversionException; /** * Implementation of {@link RouteBuilder} that provides route definitions for transactions @@ -21,37 +23,41 @@ public void configure() throws Exception { // @formatter:off super.configure(); - // 'Create Encounter' route definition - from("encounter-create:consumer?fhirContext=#fhirContext") - .onCompletion() - .process("auditCreateResourceProcessor") - .end() - .process("resourceProfileValidator") - .to("direct:process-encounter"); + // 'Provide Encounter' route definition + from("encounter-provide:consumer?fhirContext=#fhirContext") + .routeId("provide-encounter-route") + .onCompletion() + .process("provideResourceAuditHandler") + .end() + .process("fhirProfileValidator") + .to("direct:internal-provide-encounter"); // 'Find Encounter' route definition from("encounter-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") - .choice() - .when(isSearchOperation()) - .to("bean:encounterDao?method=search(${body}, ${headers.FhirRequestDetails})") - .process("bundleProviderResponseProcessor") - .otherwise() - .to("bean:encounterDao?method=read(${body}, ${headers.FhirRequestDetails})"); + .choice() + .when(isSearchOperation()) + .to("bean:encounterDao?method=search(${body}, ${headers.FhirRequestDetails})") + .process("bundleProviderResponseProcessor") + .otherwise() + .to("bean:encounterDao?method=read(${body}, ${headers.FhirRequestDetails})"); // Internal routes definition - from("direct:process-encounter") - .setHeader(FhirBridgeConstants.METHOD_OUTCOME, method("encounterDao", "create(${body}, ${headers.FhirRequestDetails})")) - .process("ehrIdLookupProcessor") - .setHeader(FhirBridgeConstants.PROFILE, method(Encounters.class, "getProfileByKontaktEbene")) + from("direct:internal-provide-encounter") + .routeId("internal-provide-encounter-route") + .process("provideEncounterPersistenceProcessor") + .process("ehrIdLookupProcessor") + .setHeader(CamelConstants.PROFILE, method(Encounters.class, "getProfileByKontaktEbene")) + .doTry() .choice() - .when(header(FhirBridgeConstants.PROFILE).isEqualTo(Profile.KONTAKT_GESUNDHEIT_ABTEILUNG)) + .when(header(CamelConstants.PROFILE).isEqualTo(Profile.KONTAKT_GESUNDHEIT_ABTEILUNG)) .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") - .to("ehr-composition:compositionEndpoint?operation=mergeCompositionEntity") - .process("resourceResponseProcessor") .otherwise() .to("bean:fhirResourceConversionService?method=convertDefaultEncounter(${body})") - .to("ehr-composition:compositionEndpoint?operation=mergeCompositionEntity") - .process("resourceResponseProcessor"); + .endDoTry() + .doCatch(ConversionException.class) + .throwException(UnprocessableEntityException.class, "${exception.message}") + .end() + .to("direct:internal-provide-resource-after-converter"); // @formatter:on } diff --git a/src/main/java/org/ehrbase/fhirbridge/config/CamelProcessorConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/CamelProcessorConfiguration.java index 18b836452..475516f17 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/CamelProcessorConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/CamelProcessorConfiguration.java @@ -8,6 +8,7 @@ import org.hl7.fhir.r4.model.DiagnosticReport; import org.hl7.fhir.r4.model.MedicationStatement; import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.r4.model.Encounter; import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.r4.model.Procedure; import org.hl7.fhir.r4.model.QuestionnaireResponse; @@ -38,6 +39,11 @@ public ProvideResourcePersistenceProcessor<DiagnosticReport> provideDiagnosticRe return new ProvideResourcePersistenceProcessor<>(diagnosticReportDao, DiagnosticReport.class, resourceMapRepository); } + @Bean + public ProvideResourcePersistenceProcessor<Encounter> provideEncounterPersistenceProcessor(IFhirResourceDao<Encounter> encounterDao) { + return new ProvideResourcePersistenceProcessor<>(encounterDao, Encounter.class, resourceMapRepository); + } + @Bean public ProvideResourcePersistenceProcessor<Observation> provideObservationPersistenceProcessor(IFhirResourceDao<Observation> observationDao) { return new ProvideResourcePersistenceProcessor<>(observationDao, Observation.class, resourceMapRepository); diff --git a/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java index e77d7883d..09e06363c 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java @@ -39,6 +39,7 @@ import org.hl7.fhir.r4.model.Consent; import org.hl7.fhir.r4.model.Device; import org.hl7.fhir.r4.model.DiagnosticReport; +import org.hl7.fhir.r4.model.Encounter; import org.hl7.fhir.r4.model.Group; import org.hl7.fhir.r4.model.Location; import org.hl7.fhir.r4.model.MedicationStatement; @@ -122,6 +123,14 @@ public IFhirResourceDao<DiagnosticReport> diagnosticReportDao() { return diagnosticReportDao; } + @Bean + public IFhirResourceDao<Encounter> encounterDao() { + JpaResourceDao<Encounter> resourceDao = new JpaResourceDao<>(); + resourceDao.setResourceType(Encounter.class); + resourceDao.setContext(fhirContext()); + return resourceDao; + } + @Bean public IFhirResourceDao<Group> groupDao() { JpaResourceDao<Group> groupDao = new JpaResourceDao<>(); diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/PatientenaufenthaltComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/PatientenaufenthaltComposition.java index 1a4f8e265..0251f5e65 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/PatientenaufenthaltComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientenaufenthaltcomposition/PatientenaufenthaltComposition.java @@ -23,7 +23,6 @@ import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungsaufenthaltAdminEntry; import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungsfallCluster; import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungstellenkontaktCluster; -import org.ehrbase.fhirbridge.ehr.Composition; @Entity @Archetype("openEHR-EHR-COMPOSITION.event_summary.v0") @@ -33,7 +32,7 @@ comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("Patientenaufenthalt") -public class PatientenaufenthaltComposition implements CompositionEntity, Composition { +public class PatientenaufenthaltComposition implements CompositionEntity { /** * Path: Patientenaufenthalt/category */ diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/StationaererVersorgungsfallComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/StationaererVersorgungsfallComposition.java index 69a50711c..76fdbcbef 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/StationaererVersorgungsfallComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/stationaererversorgungsfallcomposition/StationaererVersorgungsfallComposition.java @@ -25,7 +25,6 @@ import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.EntlassungsdatenAdminEntry; import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.FachlicheOrganisationseinheitCluster; import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.definition.FallstatusDefiningCode; -import org.ehrbase.fhirbridge.ehr.Composition; @Entity @Archetype("openEHR-EHR-COMPOSITION.fall.v1") @@ -35,7 +34,7 @@ comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" ) @Template("Stationärer Versorgungsfall") -public class StationaererVersorgungsfallComposition implements CompositionEntity, Composition { +public class StationaererVersorgungsfallComposition implements CompositionEntity { /** * Path: Stationärer Versorgungsfall/category */ diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/FhirBridgeEventType.java b/src/main/java/org/ehrbase/fhirbridge/fhir/FhirBridgeEventType.java index a8aabacfd..1ef6fb614 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/FhirBridgeEventType.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/FhirBridgeEventType.java @@ -27,6 +27,11 @@ public enum FhirBridgeEventType implements EventType, EnumeratedCodedValue<Event FIND_DIAGNOSTIC_REPORT("diagnostic-report-find", "Find Diagnostic Report"), + // Encounter + PROVIDE_ENCOUNTER("encounter-provide", "Provide Encounter"), + + FIND_ENCOUNTER("encounter-find", "Find Encounter"), + // MedicationStatement PROVIDE_MEDICATION_STATEMENT("medication-statement-provide", "Provide Medication Statement"), diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterProvider.java deleted file mode 100644 index 5bc18ebb1..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterProvider.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.ehrbase.fhirbridge.fhir.encounter; - -import ca.uhn.fhir.rest.annotation.Create; -import ca.uhn.fhir.rest.annotation.ResourceParam; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.api.server.RequestDetails; -import org.hl7.fhir.r4.model.Encounter; -import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * Implementation of {@link org.openehealth.ipf.commons.ihe.fhir.FhirProvider FhirProvider} that provides REST support - * for 'Create Encounter' transaction. - * - * @since 1.0.0 - */ -public class CreateEncounterProvider extends AbstractPlainProvider { - - @Create - public MethodOutcome createEncounter(@ResourceParam Encounter encounter, RequestDetails requestDetails, - HttpServletRequest request, HttpServletResponse response) { - return requestAction(encounter, null, request, response, requestDetails); - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/FindEncounterAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/FindEncounterAuditStrategy.java index 5a6067476..c850f9cbe 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/FindEncounterAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/FindEncounterAuditStrategy.java @@ -1,6 +1,6 @@ package org.ehrbase.fhirbridge.fhir.encounter; -import org.ehrbase.fhirbridge.fhir.common.audit.FhirBridgeEventType; +import org.ehrbase.fhirbridge.fhir.FhirBridgeEventType; import org.openehealth.ipf.commons.audit.AuditContext; import org.openehealth.ipf.commons.audit.model.AuditMessage; import org.openehealth.ipf.commons.ihe.core.atna.event.QueryInformationBuilder; @@ -22,7 +22,7 @@ public FindEncounterAuditStrategy() { @Override public AuditMessage[] makeAuditMessage(AuditContext auditContext, FhirQueryAuditDataset auditDataset) { - return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FindEncounter) + return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FIND_ENCOUNTER) .addPatients(auditDataset.getPatientIds()) .getMessages(); } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/ProvideEncounterAuditStrategy.java similarity index 80% rename from src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterAuditStrategy.java rename to src/main/java/org/ehrbase/fhirbridge/fhir/encounter/ProvideEncounterAuditStrategy.java index d657b14a6..6daa4b0a0 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/ProvideEncounterAuditStrategy.java @@ -12,9 +12,9 @@ * * @since 1.0.0 */ -public class CreateEncounterAuditStrategy extends GenericFhirAuditStrategy<Encounter> { +public class ProvideEncounterAuditStrategy extends GenericFhirAuditStrategy<Encounter> { - public CreateEncounterAuditStrategy() { + public ProvideEncounterAuditStrategy() { super(true, OperationOutcomeOperations.INSTANCE, encounter -> Optional.of(encounter.getSubject())); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/ProvideEncounterProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/ProvideEncounterProvider.java new file mode 100644 index 000000000..37a9fa972 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/ProvideEncounterProvider.java @@ -0,0 +1,48 @@ +package org.ehrbase.fhirbridge.fhir.encounter; + +import ca.uhn.fhir.rest.annotation.Create; +import ca.uhn.fhir.rest.annotation.ResourceParam; +import ca.uhn.fhir.rest.annotation.ConditionalUrlParam; +import ca.uhn.fhir.rest.annotation.Update; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.Encounter; +import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Implementation of {@link org.openehealth.ipf.commons.ihe.fhir.FhirProvider FhirProvider} that provides REST support + * for 'Create Encounter' transaction. + * + * @since 1.0.0 + */ +public class ProvideEncounterProvider extends AbstractPlainProvider { + + private static final Logger LOG = LoggerFactory.getLogger(ProvideEncounterProvider.class); + + @Create + public MethodOutcome createEncounter(@ResourceParam Encounter encounter, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide Encounter' transaction using 'create' operation..."); + return requestAction(encounter, null, request, response, requestDetails); + } + + @Update + public MethodOutcome update(@ResourceParam Encounter encounter, + @IdParam IdType id, + @ConditionalUrlParam String conditionalUrl, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide Encounter' transaction using 'update' operation..."); + return requestAction(encounter, null, request, response, requestDetails); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/ProvideEncounterTransaction.java similarity index 63% rename from src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterTransaction.java rename to src/main/java/org/ehrbase/fhirbridge/fhir/encounter/ProvideEncounterTransaction.java index a09d7e0a1..c4fee61c5 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/CreateEncounterTransaction.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/encounter/ProvideEncounterTransaction.java @@ -10,16 +10,16 @@ * * @since 1.0.0 */ -public class CreateEncounterTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { +public class ProvideEncounterTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { - public CreateEncounterTransaction() { - super("encounter-create", - "Create Encounter", + public ProvideEncounterTransaction() { + super("encounter-provide", + "Provide Encounter", false, null, - new CreateEncounterAuditStrategy(), + new ProvideEncounterAuditStrategy(), FhirVersionEnum.R4, - new CreateEncounterProvider(), + new ProvideEncounterProvider(), null, FhirTransactionValidator.NO_VALIDATION); } diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/encounter-create b/src/main/resources/META-INF/services/org/apache/camel/component/encounter-create deleted file mode 100644 index 62755f95e..000000000 --- a/src/main/resources/META-INF/services/org/apache/camel/component/encounter-create +++ /dev/null @@ -1 +0,0 @@ -class=org.ehrbase.fhirbridge.camel.component.fhir.encounter.CreateEncounterComponent \ No newline at end of file diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/encounter-provide b/src/main/resources/META-INF/services/org/apache/camel/component/encounter-provide new file mode 100644 index 000000000..a747cb181 --- /dev/null +++ b/src/main/resources/META-INF/services/org/apache/camel/component/encounter-provide @@ -0,0 +1 @@ +class=org.ehrbase.fhirbridge.camel.component.fhir.encounter.ProvideEncounterComponent \ No newline at end of file From 8f310bde132275d76d838ed73270661174278de1 Mon Sep 17 00:00:00 2001 From: zhu13 <yufei.zhu@med.uni-goettingen.de> Date: Wed, 2 Jun 2021 17:23:06 +0200 Subject: [PATCH 095/141] fix EncounterRoutes --- .../fhirbridge/camel/route/EncounterRoutes.java | 16 ++++++---------- .../config/camel/ProcessorConfiguration.java | 5 +++++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java index db54238f4..bde347c02 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java @@ -32,16 +32,7 @@ public void configure() throws Exception { .process("fhirProfileValidator") .to("direct:internal-provide-encounter"); - // 'Find Encounter' route definition - from("encounter-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") - .choice() - .when(isSearchOperation()) - .to("bean:encounterDao?method=search(${body}, ${headers.FhirRequestDetails})") - .process("bundleProviderResponseProcessor") - .otherwise() - .to("bean:encounterDao?method=read(${body}, ${headers.FhirRequestDetails})"); - - // Internal routes definition + // Internal routes definition from("direct:internal-provide-encounter") .routeId("internal-provide-encounter-route") .process("provideEncounterPersistenceProcessor") @@ -59,6 +50,11 @@ public void configure() throws Exception { .end() .to("direct:internal-provide-resource-after-converter"); + // 'Find Encounter' route definition + from("encounter-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") + .routeId("find-encounter-route") + .process("findEncounterProcessor"); + // @formatter:on } } \ No newline at end of file diff --git a/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java index 5511f0882..4a87930db 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java @@ -91,6 +91,11 @@ public FindResourceProcessor<DiagnosticReport> findDiagnosticReportProcessor(IFh return new FindResourceProcessor<>(diagnosticReportDao); } + @Bean + public FindResourceProcessor<Encounter> findEncounterProcessor(IFhirResourceDao<Encounter> encounterDao) { + return new FindResourceProcessor<>(encounterDao); + } + @Bean public FindResourceProcessor<Observation> findObservationProcessor(IFhirResourceDao<Observation> observationDao) { return new FindResourceProcessor<>(observationDao); From 6888f68ecc0fb849154ae39a6f7bb43105aa63de Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 4 Jun 2021 10:32:08 +0200 Subject: [PATCH 096/141] Update README.md --- README.md | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/README.md b/README.md index 1ee856b06..a1c79c91f 100644 --- a/README.md +++ b/README.md @@ -81,29 +81,3 @@ $ docker run -p 8888:8888 -e "FHIR_BRIDGE_EHRBASE_BASE_URL=http://172.17.0.1:808 $ cd docker $ docker-compose -f docker-compose-full.yml up ``` - -## Configuration Properties - -| Key | Default Value | Description | -| :--------------------------------------------------------- | :----------------------------------------------- | :---------------------------------------------------------- | -| `fhir-bridge.ehrbase.base-url` | `http://localhost:8080/ehrbase/rest/openehr/v1/` | Base URL for the EHRbase running instance. | -| `fhir-bridge.ehrbase.security.type` | `basic_auth` | HTTP authorization type used by EHRbase. | -| `fhir-bridge.ehrbase.security.username` | `myuser` | Basic Auth username. | -| `fhir-bridge.ehrbase.security.password` | `myPassword432` | Basic Auth password. | -| `fhir-bridge.ehrbase.template.prefix` | `classpath:/opt/` | Prefix to apply to template names. | -| `fhir-bridge.fhir.jpa.allow-external-references` | `true` | Allow remote references. | -| `fhir-bridge.fhir.validation.terminology.mode` | `none` | Terminology validation mode: `embedded`, `server`, `none` | -| `fhir-bridge.fhir.validation.terminology.server-url` | | Base URL of the server used for the terminology validation. | -| `fhir-bridge.compositon.debug` | `false` | Enables that the last executed Mapping is logged | -| `fhir-bridge.compositon.output-directory` | | Output directory where last mapping stored | -| `ipf.atna.audit-enabled` | `true` | Whether auditing is enabled. | -| `ipf.atna.audit-repository-host` | `localhost` | Host of the ATNA repository to send the events to. | -| `ipf.atna.audit-repository-port` | `3001` | Port of the ATNA repository to send the events to. | -| `spring.application.name` | `FHIR Bridge` | Application name. | -| `spring.datasource.password` | | Login password of the database. | -| `spring.datasource.url` | | JDBC URL of the database. | -| `spring.datasource.username` | | Login username of the database. | -| `spring.jpa.properties.hibernate.dialect` | `org.hibernate.dialect.H2Dialect` | Tells Hibernate to generate the appropriate SQL statements. | -| `spring.jpa.properties.hibernate.search.default.indexBase` | `${java.io.tmpdir}/fhir-bridge-poc/indexes` | Default base directory for the indexes. | -| `server.port` | `8888` | Server HTTP port. | -| `server.servlet.context-path` | `/fhir-bridge-poc` | Context path of the application. | From dbe9909ce44f2c43e0a4cdc3aedb0f099bfd0824 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 4 Jun 2021 13:52:58 +0200 Subject: [PATCH 097/141] Minor fix according to the Wiki documentation update --- .../config/ehrbase/EhrbaseConfiguration.java | 2 +- .../config/ehrbase/EhrbaseProperties.java | 2 +- .../ehrbase/EhrbaseTemplateInitializer.java | 2 +- src/main/resources/application.yml | 96 ++++++++++++------- 4 files changed, 62 insertions(+), 40 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseConfiguration.java index aaf86b91a..a371ae29a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseConfiguration.java @@ -69,7 +69,7 @@ private HttpClient httpClient() { var builder = HttpClientBuilder.create(); EhrbaseProperties.Security security = properties.getSecurity(); - if (security.getType() == EhrbaseProperties.AuthorizationType.BASIC_AUTH) { + if (security.getType() == EhrbaseProperties.AuthorizationType.BASIC) { CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(security.getUser(), security.getPassword())); builder.setDefaultCredentialsProvider(credentialsProvider); diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseProperties.java b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseProperties.java index 033498e16..5a664a6a4 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseProperties.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseProperties.java @@ -126,6 +126,6 @@ public void setForceUpdate(boolean forceUpdate) { public enum AuthorizationType { - BASIC_AUTH, NONE + BASIC, NONE } } diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseTemplateInitializer.java b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseTemplateInitializer.java index 05a612d91..f628aec05 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseTemplateInitializer.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseTemplateInitializer.java @@ -107,7 +107,7 @@ private WebClient adminWebClient() { var webClientBuilder = WebClient.builder(); var security = properties.getSecurity(); - if (security.getType() == EhrbaseProperties.AuthorizationType.BASIC_AUTH) { + if (security.getType() == EhrbaseProperties.AuthorizationType.BASIC) { webClientBuilder.filter(ExchangeFilterFunctions.basicAuthentication(security.getAdminUser(), security.getAdminPassword())); } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 3fc7460ad..9b1c09e1e 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,32 +1,58 @@ # @formatter:off -# -# FHIR Bridge Properties -# +################################################################################ +# FHIR Bridge Properties # +################################################################################ + fhir-bridge: - # CORS Properties +# CORS Properties cors: allow-credentials: false allowed-headers: '*' allowed-methods: '*' allowed-origins: '*' - # Debug Properties +# Debug Properties debug: enabled: false mapping-output-directory: ${java.io.tmpdir}/mappings - # EHRbase Properties +# EHRbase Properties ehrbase: base-url: http://localhost:8080/ehrbase/rest/openehr/v1/ security: - type: basic_auth + type: basic user: myuser password: myPassword432 admin-user: myadmin admin-password: mySuperAwesomePassword123 template: prefix: classpath:/opt/ -# force-update: false - # Security Properties + force-update: false +# FHIR Properties +# fhir: +# jpa: +# allow-external-references: +# allow-inline-match-url-references: +# auto-create-placeholder-references: +# populate-identifier-in-auto-created-placeholder-references: +# validation: +# any-extensions-allowed: +# error-for-unknown-profiles: +# failed-on-severity: +# terminology: +# mode: +# server-base-url: +# HTTP Client Properties +# http-client: +# ssl: +# enabled: +# key-password: +# key-store: +# key-store-password: +# key-store-type: +# trust-store: +# trust-store-password: +# trust-store-type: +# Security Properties security: authentication-type: none # basic: @@ -36,9 +62,10 @@ fhir-bridge: # jwk-set-uri: # jws-algorithm: RS256 -# -# Spring Properties -# +################################################################################ +# Spring Properties # +################################################################################ + spring: application: name: FHIR Bridge @@ -50,16 +77,15 @@ spring: - org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration - org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration - org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration - # Batch Properties +# Batch Properties batch: job: enabled: false - # JPA Properties +# JPA Properties jpa: hibernate: ddl-auto: validate open-in-view: false - # Hibernate Properties properties: hibernate.dialect: org.hibernate.dialect.H2Dialect hibernate.search.enabled: true @@ -68,7 +94,7 @@ spring: hibernate.search.backend.directory.type: local-filesystem hibernate.search.backend.directory.root: ${java.io.tmpdir}/fhir-bridge/lucenefiles hibernate.search.backend.lucene_version: lucene_current - # Liquibase Properties +# Liquibase Properties liquibase: database-change-log-table: DATABASE_CHANGELOG database-change-log-lock-table: DATABASE_CHANGELOG_LOCK @@ -76,33 +102,12 @@ spring: messages: basename: messages/messages use-code-as-default-message: true - -# -# IPF Properties -# -ipf: - # Audit Properties - atna: - audit-enabled: false -# audit-repository-host: -# audit-repository-port: -# audit-source-id: -# audit-value-if-missing: - # FHIR Properties - fhir: - fhir-version: r4 - -# # Server Properties -# server: port: 8888 servlet: context-path: /fhir-bridge - -# # Logging Properties -# logging: level: ca.uhn.fhir: warn @@ -116,6 +121,23 @@ logging: org.springframework: warn org.springframework.boot: warn +################################################################################ +# Open eHealth Integration Platform Properties # +################################################################################ + +ipf: + # Audit Properties + atna: + audit-enabled: false +# audit-repository-host: +# audit-repository-port: +# audit-source-id: +# audit-value-if-missing: + # FHIR Properties + fhir: + fhir-version: r4 + + demographics: patient: url: https://demographics-service.ctr.dev.num-codex.de/fhir/Patient/ \ No newline at end of file From c291e5ffdbccd15f181675f266b0f252c644c8da Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 4 Jun 2021 14:40:31 +0200 Subject: [PATCH 098/141] Upgrade Spring Boot and IPF --- pom.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index d0a15e29d..15ec944ff 100644 --- a/pom.xml +++ b/pom.xml @@ -30,11 +30,11 @@ <findbugs-jsr305.version>3.0.2</findbugs-jsr305.version> <guava.version>30.1-jre</guava.version> <hapi-fhir.version>5.3.3</hapi-fhir.version> - <ipf.version>4.0.0</ipf.version> + <ipf.version>4.0.1</ipf.version> <javassist.version>3.27.0-GA</javassist.version> <jaxb-core.version>2.3.0.1</jaxb-core.version> <jaxb-impl.version>2.3.3</jaxb-impl.version> - <spring-boot.version>2.4.1</spring-boot.version> + <spring-boot.version>2.5.0</spring-boot.version> <stax2.version>4.2.1</stax2.version> </properties> @@ -42,7 +42,8 @@ <profile> <id>circleci</id> <properties> - <commandLineArguments>--logging.level.root=error --logging.level.org.apache.camel=off + <commandLineArguments> + --logging.level.root=error --logging.level.org.apache.camel=off </commandLineArguments> </properties> </profile> From 53ab525121fc9bc6b3931954a948d6c32e2e57f2 Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Mon, 21 Jun 2021 15:13:01 +0200 Subject: [PATCH 099/141] regenerated opt --- .../observationlab/LaborAnalytConverter.java | 2 +- .../ObservationLabCompositionConverter.java | 9 +- .../GECCOLaborbefundComposition.java | 485 +++++++++--------- ...ECCOLaborbefundCompositionContainment.java | 5 +- .../ErgebnisStatusDefiningCode.java | 18 +- .../InterpretationDefiningCode.java | 1 - .../LaborbefundKategorieElement.java | 60 +++ ...entifikationDerLaboranforderungChoice.java | 4 +- ...kationDerLaboranforderungDvIdentifier.java | 4 +- ...entifikationDerLaboranforderungDvText.java | 4 +- .../definition/LaborergebnisObservation.java | 8 +- .../LabortestKategorieDefiningCode.java | 2 - .../definition/ProLaboranalytCluster.java | 55 +- .../ProLaboranalytClusterContainment.java | 6 +- .../ProLaboranalytErgebnisStatusChoice.java | 4 +- ...oLaboranalytErgebnisStatusDvCodedText.java | 4 +- .../ProLaboranalytErgebnisStatusDvText.java | 4 +- .../ProLaboranalytKommentarElement.java | 6 +- .../ProLaboranalytMesswertChoice.java | 4 +- .../ProLaboranalytMesswertDvQuantity.java | 4 +- .../ProLaboranalytMesswertDvText.java | 4 +- .../ProLaboranalytProbeIdChoice.java | 4 +- .../ProLaboranalytProbeIdDvIdentifier.java | 4 +- .../ProLaboranalytProbeIdDvUri.java | 4 +- .../definition/ProbeCluster.java | 4 +- .../ProbeEignungZumTestenChoice.java | 4 +- .../ProbeEignungZumTestenDvCodedText.java | 4 +- .../ProbeEignungZumTestenDvText.java | 4 +- ...fikatorDerUebergeordnetenProbeElement.java | 4 +- .../ProbeProbenentahmebedingungElement.java | 4 +- .../definition/ProbenartDefiningCode.java | 2 - .../UntersuchterAnalytDefiningCode.java | 2 - src/main/resources/opt/GECCO_Laborbefund.opt | 73 ++- 33 files changed, 441 insertions(+), 365 deletions(-) create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborbefundKategorieElement.java diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/observationlab/LaborAnalytConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/observationlab/LaborAnalytConverter.java index 4df075b07..41198423f 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/observationlab/LaborAnalytConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/observationlab/LaborAnalytConverter.java @@ -26,7 +26,7 @@ public ProLaboranalytCluster convert(Observation observation) { setMesswert(observation, proLaboranalytCluster); proLaboranalytCluster.setUntersuchterAnalytDefiningCode(getUntersuchterAnalyt(observation)); setInterpretationDefiningCode(observation, proLaboranalytCluster); - proLaboranalytCluster.setZeitpunktValidationValue(TimeConverter.convertObservationTime(observation)); + proLaboranalytCluster.setZeitpunktDerValidierungValue(TimeConverter.convertObservationTime(observation)); setZeitpunktErgebnisStatus(observation, proLaboranalytCluster); return proLaboranalytCluster; } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/observationlab/ObservationLabCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/observationlab/ObservationLabCompositionConverter.java index f973af13b..630fc7082 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/observationlab/ObservationLabCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/observationlab/ObservationLabCompositionConverter.java @@ -4,13 +4,13 @@ import org.ehrbase.fhirbridge.ehr.converter.ConversionException; import org.ehrbase.fhirbridge.ehr.converter.generic.ObservationToCompositionConverter; import org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.GECCOLaborbefundComposition; +import org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.LaborbefundKategorieElement; import org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.LabortestKategorieDefiningCode; import org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.StatusDefiningCode; import org.hl7.fhir.r4.model.Observation; import org.springframework.lang.NonNull; -import java.util.HashMap; -import java.util.Map; +import java.util.List; public class ObservationLabCompositionConverter extends ObservationToCompositionConverter<GECCOLaborbefundComposition> { @@ -45,7 +45,10 @@ private void setKategorieValue(Observation resource, GECCOLaborbefundComposition throw new ConversionException("Unknown LOINC code in observation"); } - composition.setKategorieValue(categoryDefiningcode.getValue()); + LaborbefundKategorieElement labortestKategorieElement = new LaborbefundKategorieElement(); + labortestKategorieElement.setValue(categoryDefiningcode.getValue()); + composition.setKategorie(List.of(labortestKategorieElement)); + } else { throw new ConversionException("No LOINC code in observation"); } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/GECCOLaborbefundComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/GECCOLaborbefundComposition.java index ff08cb13a..894955e94 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/GECCOLaborbefundComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/GECCOLaborbefundComposition.java @@ -5,6 +5,10 @@ import com.nedap.archie.rm.generic.Participation; import com.nedap.archie.rm.generic.PartyIdentified; import com.nedap.archie.rm.generic.PartyProxy; +import java.lang.String; +import java.time.temporal.TemporalAccessor; +import java.util.List; +import javax.annotation.processing.Generated; import org.ehrbase.client.annotations.Archetype; import org.ehrbase.client.annotations.Entity; import org.ehrbase.client.annotations.Id; @@ -17,272 +21,255 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; +import org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.LaborbefundKategorieElement; import org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.LaborergebnisObservation; import org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.StatusDefiningCode; -import javax.annotation.processing.Generated; -import java.time.temporal.TemporalAccessor; -import java.util.List; - @Entity @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( - value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.000636+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-06-21T14:47:54.161008+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @Template("GECCO_Laborbefund") public class GECCOLaborbefundComposition implements CompositionEntity { - /** - * Path: Laborbefund/category - */ - @Path("/category|defining_code") - private Category categoryDefiningCode; - - /** - * Path: Laborbefund/context/Erweiterung - * Description: Ergänzende Angaben zum Registereintrag. - */ - @Path("/context/other_context[at0001]/items[at0002]") - private List<Cluster> erweiterung; - - /** - * Path: Laborbefund/context/Status - * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. - */ - @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") - private StatusDefiningCode statusDefiningCode; - - /** - * Path: Laborbefund/context/Baum/Status/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") - private NullFlavour statusNullFlavourDefiningCode; - - /** - * Path: Laborbefund/context/Kategorie - * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). - */ - @Path("/context/other_context[at0001]/items[at0005]/value|value") - private String kategorieValue; - - /** - * Path: Laborbefund/context/Baum/Kategorie/null_flavour - */ - @Path("/context/other_context[at0001]/items[at0005]/null_flavour|defining_code") - private NullFlavour kategorieNullFlavourDefiningCode; - - /** - * Path: Laborbefund/context/start_time - */ - @Path("/context/start_time|value") - private TemporalAccessor startTimeValue; - - /** - * Path: Laborbefund/context/participations - */ - @Path("/context/participations") - private List<Participation> participations; - - /** - * Path: Laborbefund/context/end_time - */ - @Path("/context/end_time|value") - private TemporalAccessor endTimeValue; - - /** - * Path: Laborbefund/context/location - */ - @Path("/context/location") - private String location; - - /** - * Path: Laborbefund/context/health_care_facility - */ - @Path("/context/health_care_facility") - private PartyIdentified healthCareFacility; - - /** - * Path: Laborbefund/context/setting - */ - @Path("/context/setting|defining_code") - private Setting settingDefiningCode; - - /** - * Path: Laborbefund/Laborergebnis - * Description: Das Ergebnis - einschließlich der Befunde und der Interpretation des Labors - einer Untersuchung, die an Proben durchgeführt wurde, die von einer Einzelperson stammen oder mit dieser Person zusammenhängen. - */ - @Path("/content[openEHR-EHR-OBSERVATION.laboratory_test_result.v1]") - private LaborergebnisObservation laborergebnis; - - /** - * Path: Laborbefund/composer - */ - @Path("/composer") - private PartyProxy composer; - - /** - * Path: Laborbefund/language - */ - @Path("/language") - private Language language; - - /** - * Path: Laborbefund/feeder_audit - */ - @Path("/feeder_audit") - private FeederAudit feederAudit; - - /** - * Path: Laborbefund/territory - */ - @Path("/territory") - private Territory territory; - - @Id - private VersionUid versionUid; - - public Category getCategoryDefiningCode() { - return this.categoryDefiningCode; - } - - public void setCategoryDefiningCode(Category categoryDefiningCode) { - this.categoryDefiningCode = categoryDefiningCode; - } - - public List<Cluster> getErweiterung() { - return this.erweiterung; - } - - public void setErweiterung(List<Cluster> erweiterung) { - this.erweiterung = erweiterung; - } - - public StatusDefiningCode getStatusDefiningCode() { - return this.statusDefiningCode; - } - - public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { - this.statusDefiningCode = statusDefiningCode; - } - - public NullFlavour getStatusNullFlavourDefiningCode() { - return this.statusNullFlavourDefiningCode; - } - - public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { - this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; - } - - public String getKategorieValue() { - return this.kategorieValue; - } - - public void setKategorieValue(String kategorieValue) { - this.kategorieValue = kategorieValue; - } - - public NullFlavour getKategorieNullFlavourDefiningCode() { - return this.kategorieNullFlavourDefiningCode; - } - - public void setKategorieNullFlavourDefiningCode(NullFlavour kategorieNullFlavourDefiningCode) { - this.kategorieNullFlavourDefiningCode = kategorieNullFlavourDefiningCode; - } - - public TemporalAccessor getStartTimeValue() { - return this.startTimeValue; - } - - public void setStartTimeValue(TemporalAccessor startTimeValue) { - this.startTimeValue = startTimeValue; - } - - public List<Participation> getParticipations() { - return this.participations; - } - - public void setParticipations(List<Participation> participations) { - this.participations = participations; - } - - public TemporalAccessor getEndTimeValue() { - return this.endTimeValue; - } - - public void setEndTimeValue(TemporalAccessor endTimeValue) { - this.endTimeValue = endTimeValue; - } - - public String getLocation() { - return this.location; - } - - public void setLocation(String location) { - this.location = location; - } - - public PartyIdentified getHealthCareFacility() { - return this.healthCareFacility; - } - - public void setHealthCareFacility(PartyIdentified healthCareFacility) { - this.healthCareFacility = healthCareFacility; - } - - public Setting getSettingDefiningCode() { - return this.settingDefiningCode; - } - - public void setSettingDefiningCode(Setting settingDefiningCode) { - this.settingDefiningCode = settingDefiningCode; - } - - public LaborergebnisObservation getLaborergebnis() { - return this.laborergebnis; - } - - public void setLaborergebnis(LaborergebnisObservation laborergebnis) { - this.laborergebnis = laborergebnis; - } + /** + * Path: Laborbefund/category + */ + @Path("/category|defining_code") + private Category categoryDefiningCode; + + /** + * Path: Laborbefund/context/Erweiterung + * Description: Ergänzende Angaben zum Registereintrag. + */ + @Path("/context/other_context[at0001]/items[at0002]") + private List<Cluster> erweiterung; + + /** + * Path: Laborbefund/context/Status + * Description: Status der gelieferten Daten für den Registereintrag. Hinweis: Dies ist nicht der Status einzelner Komponenten. + */ + @Path("/context/other_context[at0001]/items[at0004]/value|defining_code") + private StatusDefiningCode statusDefiningCode; + + /** + * Path: Laborbefund/context/Baum/Status/null_flavour + */ + @Path("/context/other_context[at0001]/items[at0004]/null_flavour|defining_code") + private NullFlavour statusNullFlavourDefiningCode; + + /** + * Path: Laborbefund/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/context/other_context[at0001]/items[at0005]") + private List<LaborbefundKategorieElement> kategorie; + + /** + * Path: Laborbefund/context/start_time + */ + @Path("/context/start_time|value") + private TemporalAccessor startTimeValue; + + /** + * Path: Laborbefund/context/participations + */ + @Path("/context/participations") + private List<Participation> participations; + + /** + * Path: Laborbefund/context/end_time + */ + @Path("/context/end_time|value") + private TemporalAccessor endTimeValue; + + /** + * Path: Laborbefund/context/location + */ + @Path("/context/location") + private String location; + + /** + * Path: Laborbefund/context/health_care_facility + */ + @Path("/context/health_care_facility") + private PartyIdentified healthCareFacility; + + /** + * Path: Laborbefund/context/setting + */ + @Path("/context/setting|defining_code") + private Setting settingDefiningCode; + + /** + * Path: Laborbefund/Laborergebnis + * Description: Das Ergebnis - einschließlich der Befunde und der Interpretation des Labors - einer Untersuchung, die an Proben durchgeführt wurde, die von einer Einzelperson stammen oder mit dieser Person zusammenhängen. + */ + @Path("/content[openEHR-EHR-OBSERVATION.laboratory_test_result.v1]") + private LaborergebnisObservation laborergebnis; + + /** + * Path: Laborbefund/composer + */ + @Path("/composer") + private PartyProxy composer; + + /** + * Path: Laborbefund/language + */ + @Path("/language") + private Language language; + + /** + * Path: Laborbefund/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + /** + * Path: Laborbefund/territory + */ + @Path("/territory") + private Territory territory; + + @Id + private VersionUid versionUid; + + public void setCategoryDefiningCode(Category categoryDefiningCode) { + this.categoryDefiningCode = categoryDefiningCode; + } + + public Category getCategoryDefiningCode() { + return this.categoryDefiningCode ; + } + + public void setErweiterung(List<Cluster> erweiterung) { + this.erweiterung = erweiterung; + } + + public List<Cluster> getErweiterung() { + return this.erweiterung ; + } + + public void setStatusDefiningCode(StatusDefiningCode statusDefiningCode) { + this.statusDefiningCode = statusDefiningCode; + } + + public StatusDefiningCode getStatusDefiningCode() { + return this.statusDefiningCode ; + } + + public void setStatusNullFlavourDefiningCode(NullFlavour statusNullFlavourDefiningCode) { + this.statusNullFlavourDefiningCode = statusNullFlavourDefiningCode; + } + + public NullFlavour getStatusNullFlavourDefiningCode() { + return this.statusNullFlavourDefiningCode ; + } + + public void setKategorie(List<LaborbefundKategorieElement> kategorie) { + this.kategorie = kategorie; + } + + public List<LaborbefundKategorieElement> getKategorie() { + return this.kategorie ; + } + + public void setStartTimeValue(TemporalAccessor startTimeValue) { + this.startTimeValue = startTimeValue; + } + + public TemporalAccessor getStartTimeValue() { + return this.startTimeValue ; + } + + public void setParticipations(List<Participation> participations) { + this.participations = participations; + } + + public List<Participation> getParticipations() { + return this.participations ; + } + + public void setEndTimeValue(TemporalAccessor endTimeValue) { + this.endTimeValue = endTimeValue; + } + + public TemporalAccessor getEndTimeValue() { + return this.endTimeValue ; + } + + public void setLocation(String location) { + this.location = location; + } + + public String getLocation() { + return this.location ; + } + + public void setHealthCareFacility(PartyIdentified healthCareFacility) { + this.healthCareFacility = healthCareFacility; + } + + public PartyIdentified getHealthCareFacility() { + return this.healthCareFacility ; + } + + public void setSettingDefiningCode(Setting settingDefiningCode) { + this.settingDefiningCode = settingDefiningCode; + } + + public Setting getSettingDefiningCode() { + return this.settingDefiningCode ; + } + + public void setLaborergebnis(LaborergebnisObservation laborergebnis) { + this.laborergebnis = laborergebnis; + } + + public LaborergebnisObservation getLaborergebnis() { + return this.laborergebnis ; + } - public PartyProxy getComposer() { - return this.composer; - } + public void setComposer(PartyProxy composer) { + this.composer = composer; + } - public void setComposer(PartyProxy composer) { - this.composer = composer; - } + public PartyProxy getComposer() { + return this.composer ; + } - public Language getLanguage() { - return this.language; - } + public void setLanguage(Language language) { + this.language = language; + } - public void setLanguage(Language language) { - this.language = language; - } + public Language getLanguage() { + return this.language ; + } - public FeederAudit getFeederAudit() { - return this.feederAudit; - } + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } - public void setFeederAudit(FeederAudit feederAudit) { - this.feederAudit = feederAudit; - } + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } - public Territory getTerritory() { - return this.territory; - } + public void setTerritory(Territory territory) { + this.territory = territory; + } - public void setTerritory(Territory territory) { - this.territory = territory; - } + public Territory getTerritory() { + return this.territory ; + } - public VersionUid getVersionUid() { - return this.versionUid; - } + public VersionUid getVersionUid() { + return this.versionUid ; + } - public void setVersionUid(VersionUid versionUid) { - this.versionUid = versionUid; - } + public void setVersionUid(VersionUid versionUid) { + this.versionUid = versionUid; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/GECCOLaborbefundCompositionContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/GECCOLaborbefundCompositionContainment.java index 7d6c2f805..cf9d68e42 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/GECCOLaborbefundCompositionContainment.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/GECCOLaborbefundCompositionContainment.java @@ -17,6 +17,7 @@ import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; +import org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.LaborbefundKategorieElement; import org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.LaborergebnisObservation; import org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.StatusDefiningCode; @@ -31,9 +32,7 @@ public class GECCOLaborbefundCompositionContainment extends Containment { public SelectAqlField<NullFlavour> STATUS_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(GECCOLaborbefundComposition.class, "/context/other_context[at0001]/items[at0004]/null_flavour|defining_code", "statusNullFlavourDefiningCode", NullFlavour.class, this); - public SelectAqlField<String> KATEGORIE_VALUE = new AqlFieldImp<String>(GECCOLaborbefundComposition.class, "/context/other_context[at0001]/items[at0005]/value|value", "kategorieValue", String.class, this); - - public SelectAqlField<NullFlavour> KATEGORIE_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(GECCOLaborbefundComposition.class, "/context/other_context[at0001]/items[at0005]/null_flavour|defining_code", "kategorieNullFlavourDefiningCode", NullFlavour.class, this); + public ListSelectAqlField<LaborbefundKategorieElement> KATEGORIE = new ListAqlFieldImp<LaborbefundKategorieElement>(GECCOLaborbefundComposition.class, "/context/other_context[at0001]/items[at0005]", "kategorie", LaborbefundKategorieElement.class, this); public SelectAqlField<TemporalAccessor> START_TIME_VALUE = new AqlFieldImp<TemporalAccessor>(GECCOLaborbefundComposition.class, "/context/start_time|value", "startTimeValue", TemporalAccessor.class, this); diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ErgebnisStatusDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ErgebnisStatusDefiningCode.java index 434c71044..5418c569b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ErgebnisStatusDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ErgebnisStatusDefiningCode.java @@ -4,23 +4,23 @@ import org.ehrbase.client.classgenerator.EnumValueSet; public enum ErgebnisStatusDefiningCode implements EnumValueSet { - ERFASST("Erfasst", "Der Test ist im Laborinformationssystem erfasst, aber noch kein Resultat verfügbar.", "local", "at0015"), + ENDBEFUND("Endbefund", "Das Analyseergebnis ist vollständig und durch eine autorisierte Person verifiziert.", "local", "at0018"), - ENDBEFUND_KORRIGIERT("Endbefund, korrigiert", "Der Endbefund wurde erneut modifiziert, ist vollständig und wurde durch den verantwortlichen Pathologen verifiziert. Dies ist eine Unterkategorie von \"Endbefund, geändert\".", "local", "at0019"), + ERFASST("Erfasst", "Der Test ist im Laborinformationssystem erfasst, aber noch kein Ergebnis verfügbar.", "local", "at0015"), - ENDBEFUND("Endbefund", "Das Testresultat ist vollständig und durch eine autorisierte Person verifiziert.", "local", "at0018"), + ENDBEFUND_ERGAENZT("Endbefund, ergänzt", "Nach Abschluss wurde der Bericht durch das Hinzufügen neuer Inhalte abgeändert. Die vorhandene Inhalte sind unverändert. Dies ist eine Unterkategorie von \"Endbefund, geändert\".", "local", "at0021"), - STORNIERT("Storniert", "Das Testresultat ist nicht verfügbar, weil der Test nicht (vollständig) durchgeführt oder abgebrochen wurde.", "local", "at0023"), + ENDBEFUND_KORRIGIERT("Endbefund, korrigiert", "Das Ergebnis wurde nach dem endgültigen Ergebnis korrigiert und vom zuständigen Laborwissenschaftler vervollständigt und verifiziert. Dies ist eine Unterkategorie von \"Endbefund, geändert\".", "local", "at0019"), - ENDBEFUND_ERGAENZT("Endbefund, ergänzt", "Nach Abschluss wurde der Bericht durch Hinzufügen neuer Inhalte abgeändert. Der vorhandenen Inhalte sind unverändert. Dies ist eine Unterkategorie von \"Endbefund, geändert\".", "local", "at0021"), + ENDBEFUND_GEAENDERT("Endbefund, geändert", "Das Ergebnis wurde nach dem endgültigen Ergebnis geändert und vom zuständigen Laborwissenschaftler vervollständigt und verifiziert. Die Ergebnisdaten wurden geändert.", "local", "at0020"), - ENDBEFUND_WIDERRUFEN("Endbefund, widerrufen", "Das Testresultat wurde nach Endbefundung zurückgezogen.", "local", "at0022"), - - ENDBEFUND_GEAENDERT("Endbefund, geändert", "Der Endbefund wurde erneut modifiziert, ist vollständig und wurde durch den verantwortlichen Pathologen verifiziert. Des Weiteren haben sich die Ergebnisdaten hierdurch verändert.", "local", "at0020"), + STORNIERT("Storniert", "Das Testergebnis ist nicht verfügbar, weil der Test nicht (vollständig) durchgeführt oder abgebrochen wurde.", "local", "at0023"), UNVOLLSTAENDIG("Unvollständig", "Das Testresultat ist ein Anfangs- oder Interimswert, vorläufig oder nicht verifiziert/validiert.", "local", "at0016"), - VORLAEUFIG("Vorläufig", "Erste, verifizierte Resultate sind vorhanden, der Test ist aber noch nicht abgeschlossen (Sub-Kategorie von 'Unvollständig').", "local", "at0017"); + VORLAEUFIG("Vorläufig", "Erste, verifizierte Resultate sind vorhanden, der Test ist aber noch nicht abgeschlossen (Sub-Kategorie von 'Unvollständig').", "local", "at0017"), + + ENDBEFUND_WIDERRUFEN("Endbefund, widerrufen", "Das Testergebnis wurde nach Endbefundung zurückgezogen.", "local", "at0022"); private String value; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/InterpretationDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/InterpretationDefiningCode.java index 4b453688d..b53f9370a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/InterpretationDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/InterpretationDefiningCode.java @@ -5,7 +5,6 @@ import java.util.Map; import org.ehrbase.client.classgenerator.EnumValueSet; -import org.ehrbase.fhirbridge.ehr.converter.specific.symptom.codes.KrankheitsanzeichenCode; public enum InterpretationDefiningCode implements EnumValueSet { CARRIER("Carrier", "", "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", "CAR"), diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborbefundKategorieElement.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborbefundKategorieElement.java new file mode 100644 index 000000000..389c0a07e --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborbefundKategorieElement.java @@ -0,0 +1,60 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import com.nedap.archie.rm.archetyped.FeederAudit; +import java.lang.String; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.LocatableEntity; +import org.ehrbase.client.classgenerator.shareddefinition.NullFlavour; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-06-21T14:47:54.186090+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +public class LaborbefundKategorieElement implements LocatableEntity { + /** + * Path: Laborbefund/context/Kategorie + * Description: Die Klassifikation des Registereintrags (z.B. Typ der Observation des FHIR-Profils). + */ + @Path("/value|value") + private String value; + + /** + * Path: Laborbefund/context/Baum/Kategorie/null_flavour + */ + @Path("/null_flavour|defining_code") + private NullFlavour value2; + + /** + * Path: Laborbefund/context/feeder_audit + */ + @Path("/feeder_audit") + private FeederAudit feederAudit; + + public void setValue(String value) { + this.value = value; + } + + public String getValue() { + return this.value ; + } + + public void setValue2(NullFlavour value2) { + this.value2 = value2; + } + + public NullFlavour getValue2() { + return this.value2 ; + } + + public void setFeederAudit(FeederAudit feederAudit) { + this.feederAudit = feederAudit; + } + + public FeederAudit getFeederAudit() { + return this.feederAudit ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungChoice.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungChoice.java index 24a1b49bd..59212f745 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungChoice.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungChoice.java @@ -4,8 +4,8 @@ @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.177048+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-06-21T14:47:54.311709+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public interface LaborergebnisIdentifikationDerLaboranforderungChoice { } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungDvIdentifier.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungDvIdentifier.java index 47bbe89ed..98e98f189 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungDvIdentifier.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungDvIdentifier.java @@ -10,8 +10,8 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.176233+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-06-21T14:47:54.310442+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @OptionFor("DV_IDENTIFIER") public class LaborergebnisIdentifikationDerLaboranforderungDvIdentifier implements RMEntity, LaborergebnisIdentifikationDerLaboranforderungChoice { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungDvText.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungDvText.java index f8ddb1559..61fb0ca64 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungDvText.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungDvText.java @@ -10,8 +10,8 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.176621+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-06-21T14:47:54.311129+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @OptionFor("DV_TEXT") public class LaborergebnisIdentifikationDerLaboranforderungDvText implements RMEntity, LaborergebnisIdentifikationDerLaboranforderungChoice { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisObservation.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisObservation.java index 009414c92..7e2c9bf02 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisObservation.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisObservation.java @@ -19,8 +19,8 @@ @Archetype("openEHR-EHR-OBSERVATION.laboratory_test_result.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.059101+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-06-21T14:47:54.203209+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class LaborergebnisObservation implements EntryEntity { /** @@ -48,8 +48,8 @@ public class LaborergebnisObservation implements EntryEntity { /** * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt - * Description: Ergebnis eines Labortests für einen bestimmten Analytwert. - * Comment: Beispiele: 'Natrium', 'Leukozytenzahl', 'T3'. Üblicherweise über eine externe Terminologie codiert. + * Description: Ergebnis einer Laboranalyse für einen bestimmten Analytwert. + * Comment: Beispiele: "Natrium", "Leukozytenzahl", "T3". Üblicherweise über eine externe Terminologie codiert. */ @Path("/data[at0001]/events[at0002]/data[at0003]/items[openEHR-EHR-CLUSTER.laboratory_test_analyte.v1 and name/value='Pro Laboranalyt']") private ProLaboranalytCluster proLaboranalyt; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LabortestKategorieDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LabortestKategorieDefiningCode.java index 95a6942fc..109c1cdb2 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LabortestKategorieDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LabortestKategorieDefiningCode.java @@ -45,7 +45,6 @@ public enum LabortestKategorieDefiningCode implements EnumValueSet { this.code = code; } - public static Map<String, LabortestKategorieDefiningCode> getCodesAsMap(){ Map<String, LabortestKategorieDefiningCode> labortestKategorieDefiningCodeHashMap = new HashMap<>(); for (LabortestKategorieDefiningCode labortestKategorieDefiningCode : LabortestKategorieDefiningCode.values()) { @@ -54,7 +53,6 @@ public static Map<String, LabortestKategorieDefiningCode> getCodesAsMap(){ return labortestKategorieDefiningCodeHashMap; } - public String getValue() { return this.value ; } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytCluster.java index b537f3d5b..6461def95 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytCluster.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytCluster.java @@ -16,21 +16,21 @@ @Archetype("openEHR-EHR-CLUSTER.laboratory_test_analyte.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.142486+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-06-21T14:47:54.258914+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class ProLaboranalytCluster implements LocatableEntity { /** - * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/untersuchter Analyt + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Untersuchter Analyt * Description: Der Name des untersuchten Analyts. - * Comment: Der Wert dieses Elements wird normalerweise meist durch eine Spezialisierung, durch einer Vorlage oder zur Laufzeit geliefert, um den aktuellen Analyt wiederzugeben. Zum Beispiel: 'Natrium im Serum','Hämoglobin'. + * Comment: Der Wert dieses Elements wird normalerweise, meist durch eine Spezialisierung, in einem Template oder zur Laufzeit der Anwendung geliefert, um den aktuellen Analyt wiederzugeben. Zum Beispiel: 'Natrium im Serum', 'Hämoglobin'. * Die Codierung mit einer externen Terminologie, wie LOINC, NPU, SNOMED-CT oder lokalen Labor-Terminologien wird dringend empfohlen. */ @Path("/items[at0024]/value|defining_code") private UntersuchterAnalytDefiningCode untersuchterAnalytDefiningCode; /** - * Path: Laborbefund/Laborergebnis/Event Series/Jedes Ereignis/Tree/Pro Laboranalyt/untersuchter Analyt/null_flavour + * Path: Laborbefund/Laborergebnis/Event Series/Jedes Ereignis/Tree/Pro Laboranalyt/Untersuchter Analyt/null_flavour */ @Path("/items[at0024]/null_flavour|defining_code") private NullFlavour untersuchterAnalytNullFlavourDefiningCode; @@ -63,18 +63,24 @@ public class ProLaboranalytCluster implements LocatableEntity { private NullFlavour interpretationNullFlavourDefiningCode; /** - * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Zeitpunkt Validation + * Path: Laborbefund/Laborergebnis/Event Series/Jedes Ereignis/Tree/Pro Laboranalyt/Testmethode/null_flavour + */ + @Path("/items[at0028]/null_flavour|defining_code") + private NullFlavour testmethodeNullFlavourDefiningCode; + + /** + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Zeitpunkt der Validierung * Description: Datum und Zeit, an dem das Analyseergebnis im Labor medizinisch validiert wurde. - * Comment: In vielen Gerichtsbarkeiten wird angenommen, dass der 'Ergebnisstatus' die medizinische Validation einschliesst, in anderen wird diese anhand dieses Datenelements separat erfasst und befundet + * Comment: In vielen Gerichtsbarkeiten wird angenommen, dass der 'Ergebnisstatus' die medizinische Validierung einschliesst, in anderen wird diese anhand dieses Datenelements separat erfasst und befundet. */ @Path("/items[at0025]/value|value") - private TemporalAccessor zeitpunktValidationValue; + private TemporalAccessor zeitpunktDerValidierungValue; /** - * Path: Laborbefund/Laborergebnis/Event Series/Jedes Ereignis/Tree/Pro Laboranalyt/Zeitpunkt Validation/null_flavour + * Path: Laborbefund/Laborergebnis/Event Series/Jedes Ereignis/Tree/Pro Laboranalyt/Zeitpunkt der Validierung/null_flavour */ @Path("/items[at0025]/null_flavour|defining_code") - private NullFlavour zeitpunktValidationNullFlavourDefiningCode; + private NullFlavour zeitpunktDerValidierungNullFlavourDefiningCode; /** * Path: Laborbefund/Laborergebnis/Event Series/Jedes Ereignis/Tree/Pro Laboranalyt/Ergebnis-Status/null_flavour @@ -103,7 +109,7 @@ public class ProLaboranalytCluster implements LocatableEntity { /** * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Kommentar - * Description: Kommentar zum Analyt-Resultat, soweit noch nicht in anderen Feldern erfasst. + * Description: Kommentar zum Analyt-Ergebnis, soweit noch nicht in anderen Feldern erfasst. */ @Path("/items[at0003]") private List<ProLaboranalytKommentarElement> kommentar; @@ -189,21 +195,30 @@ public NullFlavour getInterpretationNullFlavourDefiningCode() { return this.interpretationNullFlavourDefiningCode ; } - public void setZeitpunktValidationValue(TemporalAccessor zeitpunktValidationValue) { - this.zeitpunktValidationValue = zeitpunktValidationValue; + public void setTestmethodeNullFlavourDefiningCode( + NullFlavour testmethodeNullFlavourDefiningCode) { + this.testmethodeNullFlavourDefiningCode = testmethodeNullFlavourDefiningCode; + } + + public NullFlavour getTestmethodeNullFlavourDefiningCode() { + return this.testmethodeNullFlavourDefiningCode ; + } + + public void setZeitpunktDerValidierungValue(TemporalAccessor zeitpunktDerValidierungValue) { + this.zeitpunktDerValidierungValue = zeitpunktDerValidierungValue; } - public TemporalAccessor getZeitpunktValidationValue() { - return this.zeitpunktValidationValue ; + public TemporalAccessor getZeitpunktDerValidierungValue() { + return this.zeitpunktDerValidierungValue ; } - public void setZeitpunktValidationNullFlavourDefiningCode( - NullFlavour zeitpunktValidationNullFlavourDefiningCode) { - this.zeitpunktValidationNullFlavourDefiningCode = zeitpunktValidationNullFlavourDefiningCode; + public void setZeitpunktDerValidierungNullFlavourDefiningCode( + NullFlavour zeitpunktDerValidierungNullFlavourDefiningCode) { + this.zeitpunktDerValidierungNullFlavourDefiningCode = zeitpunktDerValidierungNullFlavourDefiningCode; } - public NullFlavour getZeitpunktValidationNullFlavourDefiningCode() { - return this.zeitpunktValidationNullFlavourDefiningCode ; + public NullFlavour getZeitpunktDerValidierungNullFlavourDefiningCode() { + return this.zeitpunktDerValidierungNullFlavourDefiningCode ; } public void setErgebnisStatusNullFlavourDefiningCode( diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytClusterContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytClusterContainment.java index 165567598..8d4d6e6ec 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytClusterContainment.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytClusterContainment.java @@ -25,9 +25,11 @@ public class ProLaboranalytClusterContainment extends Containment { public SelectAqlField<NullFlavour> INTERPRETATION_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ProLaboranalytCluster.class, "/items[at0004]/null_flavour|defining_code", "interpretationNullFlavourDefiningCode", NullFlavour.class, this); - public SelectAqlField<TemporalAccessor> ZEITPUNKT_VALIDATION_VALUE = new AqlFieldImp<TemporalAccessor>(ProLaboranalytCluster.class, "/items[at0025]/value|value", "zeitpunktValidationValue", TemporalAccessor.class, this); + public SelectAqlField<NullFlavour> TESTMETHODE_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ProLaboranalytCluster.class, "/items[at0028]/null_flavour|defining_code", "testmethodeNullFlavourDefiningCode", NullFlavour.class, this); - public SelectAqlField<NullFlavour> ZEITPUNKT_VALIDATION_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ProLaboranalytCluster.class, "/items[at0025]/null_flavour|defining_code", "zeitpunktValidationNullFlavourDefiningCode", NullFlavour.class, this); + public SelectAqlField<TemporalAccessor> ZEITPUNKT_DER_VALIDIERUNG_VALUE = new AqlFieldImp<TemporalAccessor>(ProLaboranalytCluster.class, "/items[at0025]/value|value", "zeitpunktDerValidierungValue", TemporalAccessor.class, this); + + public SelectAqlField<NullFlavour> ZEITPUNKT_DER_VALIDIERUNG_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ProLaboranalytCluster.class, "/items[at0025]/null_flavour|defining_code", "zeitpunktDerValidierungNullFlavourDefiningCode", NullFlavour.class, this); public SelectAqlField<NullFlavour> ERGEBNIS_STATUS_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ProLaboranalytCluster.class, "/items[at0005]/null_flavour|defining_code", "ergebnisStatusNullFlavourDefiningCode", NullFlavour.class, this); diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusChoice.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusChoice.java index f6dde8246..0bcc3bd72 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusChoice.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusChoice.java @@ -4,8 +4,8 @@ @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.166063+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-06-21T14:47:54.293094+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public interface ProLaboranalytErgebnisStatusChoice { } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusDvCodedText.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusDvCodedText.java index 6fc99235f..a51b48ab5 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusDvCodedText.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusDvCodedText.java @@ -9,8 +9,8 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.164618+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-06-21T14:47:54.291110+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @OptionFor("DV_CODED_TEXT") public class ProLaboranalytErgebnisStatusDvCodedText implements RMEntity, ProLaboranalytErgebnisStatusChoice { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusDvText.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusDvText.java index 9b247c244..2e637dfe2 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusDvText.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusDvText.java @@ -10,8 +10,8 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.165615+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-06-21T14:47:54.292526+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @OptionFor("DV_TEXT") public class ProLaboranalytErgebnisStatusDvText implements RMEntity, ProLaboranalytErgebnisStatusChoice { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytKommentarElement.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytKommentarElement.java index c8adbfb0e..84883217b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytKommentarElement.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytKommentarElement.java @@ -11,13 +11,13 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.159979+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-06-21T14:47:54.282972+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class ProLaboranalytKommentarElement implements LocatableEntity { /** * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Kommentar - * Description: Kommentar zum Analyt-Resultat, soweit noch nicht in anderen Feldern erfasst. + * Description: Kommentar zum Analyt-Ergebnis, soweit noch nicht in anderen Feldern erfasst. */ @Path("/value|value") private String value; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertChoice.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertChoice.java index 3eb2cfa80..dfb2747de 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertChoice.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertChoice.java @@ -4,8 +4,8 @@ @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.168056+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-06-21T14:47:54.296272+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public interface ProLaboranalytMesswertChoice { } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertDvQuantity.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertDvQuantity.java index 63bf0d860..079a91e4c 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertDvQuantity.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertDvQuantity.java @@ -11,8 +11,8 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.167613+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-06-21T14:47:54.295838+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @OptionFor("DV_QUANTITY") public class ProLaboranalytMesswertDvQuantity implements RMEntity, ProLaboranalytMesswertChoice { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertDvText.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertDvText.java index 2c3269fba..110fb887a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertDvText.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertDvText.java @@ -10,8 +10,8 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.167205+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-06-21T14:47:54.295123+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @OptionFor("DV_TEXT") public class ProLaboranalytMesswertDvText implements RMEntity, ProLaboranalytMesswertChoice { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdChoice.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdChoice.java index e542f4a56..1e21c2c58 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdChoice.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdChoice.java @@ -4,8 +4,8 @@ @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.163302+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-06-21T14:47:54.288837+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public interface ProLaboranalytProbeIdChoice { } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdDvIdentifier.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdDvIdentifier.java index 4a4808304..5252511c3 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdDvIdentifier.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdDvIdentifier.java @@ -10,8 +10,8 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.162467+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-06-21T14:47:54.287434+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @OptionFor("DV_IDENTIFIER") public class ProLaboranalytProbeIdDvIdentifier implements RMEntity, ProLaboranalytProbeIdChoice { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdDvUri.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdDvUri.java index 494add38f..d9aee9f4d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdDvUri.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdDvUri.java @@ -10,8 +10,8 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.162890+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-06-21T14:47:54.288164+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @OptionFor("DV_URI") public class ProLaboranalytProbeIdDvUri implements RMEntity, ProLaboranalytProbeIdChoice { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeCluster.java index afbb72a5d..7c724a8df 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeCluster.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeCluster.java @@ -20,8 +20,8 @@ @Archetype("openEHR-EHR-CLUSTER.specimen.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.073276+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-06-21T14:47:54.212630+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class ProbeCluster implements LocatableEntity { /** diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenChoice.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenChoice.java index 06f4ccc66..ea6330928 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenChoice.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenChoice.java @@ -4,8 +4,8 @@ @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.118158+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-06-21T14:47:54.243968+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public interface ProbeEignungZumTestenChoice { } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenDvCodedText.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenDvCodedText.java index 999fe589c..d7ad9ddf4 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenDvCodedText.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenDvCodedText.java @@ -9,8 +9,8 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.115646+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-06-21T14:47:54.241731+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @OptionFor("DV_CODED_TEXT") public class ProbeEignungZumTestenDvCodedText implements RMEntity, ProbeEignungZumTestenChoice { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenDvText.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenDvText.java index 3c64a54d9..38984f068 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenDvText.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenDvText.java @@ -10,8 +10,8 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.117263+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-06-21T14:47:54.243161+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @OptionFor("DV_TEXT") public class ProbeEignungZumTestenDvText implements RMEntity, ProbeEignungZumTestenChoice { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeIdentifikatorDerUebergeordnetenProbeElement.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeIdentifikatorDerUebergeordnetenProbeElement.java index 63dfe1c28..3f0e0e3d6 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeIdentifikatorDerUebergeordnetenProbeElement.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeIdentifikatorDerUebergeordnetenProbeElement.java @@ -11,8 +11,8 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.109392+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-06-21T14:47:54.237589+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class ProbeIdentifikatorDerUebergeordnetenProbeElement implements LocatableEntity { /** diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeProbenentahmebedingungElement.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeProbenentahmebedingungElement.java index 547e0e447..42fabe8f0 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeProbenentahmebedingungElement.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeProbenentahmebedingungElement.java @@ -11,8 +11,8 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-03-09T11:53:24.088619+01:00", - comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.3.0" + date = "2021-06-21T14:47:54.224617+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class ProbeProbenentahmebedingungElement implements LocatableEntity { /** diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbenartDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbenartDefiningCode.java index 06633bbd6..b9eb1a98e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbenartDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbenartDefiningCode.java @@ -5,7 +5,6 @@ import java.util.Map; import org.ehrbase.client.classgenerator.EnumValueSet; -import org.ehrbase.fhirbridge.ehr.converter.specific.symptom.codes.KrankheitsanzeichenCode; public enum ProbenartDefiningCode implements EnumValueSet { CYST_BAKER_S("Cyst, Baker's", "", "http://terminology.hl7.org/CodeSystem/v2-0487", "BCYST"), @@ -159,7 +158,6 @@ public static Map<String, ProbenartDefiningCode> getCodesAsMap(){ return probenartDefiningCodeHashMap; } - public String getValue() { return this.value ; } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/UntersuchterAnalytDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/UntersuchterAnalytDefiningCode.java index cc08e8c34..1f6cac3c4 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/UntersuchterAnalytDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/UntersuchterAnalytDefiningCode.java @@ -5,7 +5,6 @@ import java.util.Map; import org.ehrbase.client.classgenerator.EnumValueSet; -import org.ehrbase.fhirbridge.ehr.converter.specific.symptom.codes.KrankheitsanzeichenCode; public enum UntersuchterAnalytDefiningCode implements EnumValueSet { FERRITIN_MASS_VOLUME_IN_SERUM_OR_PLASMA_BY_IMMUNOASSAY("Ferritin [Mass/volume] in Serum or Plasma by Immunoassay", "", "LOINC", "20567-4"), @@ -276,7 +275,6 @@ public static Map<String, UntersuchterAnalytDefiningCode> getCodesAsMap(){ return untersuchterAnalytDefiningCodeHashMap; } - public String getValue() { return this.value ; } diff --git a/src/main/resources/opt/GECCO_Laborbefund.opt b/src/main/resources/opt/GECCO_Laborbefund.opt index 94dcbd38e..f5afa312d 100644 --- a/src/main/resources/opt/GECCO_Laborbefund.opt +++ b/src/main/resources/opt/GECCO_Laborbefund.opt @@ -25,8 +25,9 @@ <other_details id="Sign off"/> <other_details id="Speciality"/> <other_details id="User roles"/> - <other_details id="MD5-CAM-1.0.1">17839a90468069370c7547c69dfd370a</other_details> - <other_details id="PARENT:MD5-CAM-1.0.1">137DCA7D21FA274494054E1B81B67FC5</other_details> + <other_details id="MD5-CAM-1.0.1">0b1d58a8f0bbe5f62006097d82307ddd</other_details> + <other_details id="PARENT:MD5-CAM-1.0.1">8BD8D5F850A9DEE8A16075105D36FD32</other_details> + <other_details id="original_language">ISO_639-1::de</other_details> <other_details id="original_language">ISO_639-1::de</other_details> <details> <language> @@ -267,11 +268,9 @@ <rm_type_name>ELEMENT</rm_type_name> <occurrences> <lower_included>true</lower_included> - <upper_included>true</upper_included> <lower_unbounded>false</lower_unbounded> - <upper_unbounded>false</upper_unbounded> + <upper_unbounded>true</upper_unbounded> <lower>0</lower> - <upper>1</upper> </occurrences> <node_id>at0005</node_id> <attributes xsi:type="C_SINGLE_ATTRIBUTE"> @@ -2287,7 +2286,19 @@ Ob dieses Element Bedingungen enthält, die während der Probenahme vorhanden se <upper_included>true</upper_included> <lower_unbounded>false</lower_unbounded> <upper_unbounded>false</upper_unbounded> - <lower>1</lower> + <lower>0</lower> + <upper>1</upper> + </occurrences> + <node_id>at0028</node_id> + </children> + <children xsi:type="C_COMPLEX_OBJECT"> + <rm_type_name>ELEMENT</rm_type_name> + <occurrences> + <lower_included>true</lower_included> + <upper_included>true</upper_included> + <lower_unbounded>false</lower_unbounded> + <upper_unbounded>false</upper_unbounded> + <lower>0</lower> <upper>1</upper> </occurrences> <node_id>at0025</node_id> @@ -2625,21 +2636,19 @@ Ob dieses Element Bedingungen enthält, die während der Probenahme vorhanden se <value>openEHR-EHR-CLUSTER.laboratory_test_analyte.v1</value> </archetype_id> <term_definitions code="at0000"> - <items id="comment">Beispiele: 'Natrium', 'Leukozytenzahl', 'T3'. Üblicherweise über eine externe Terminologie codiert.</items> - <items id="description">Ergebnis eines Labortests für einen bestimmten Analytwert.</items> - <items id="text">Laboranalyt-Resultat</items> + <items id="comment">Beispiele: "Natrium", "Leukozytenzahl", "T3". Üblicherweise über eine externe Terminologie codiert.</items> + <items id="description">Ergebnis einer Laboranalyse für einen bestimmten Analytwert.</items> + <items id="text">Laboranalyt-Ergebnis</items> </term_definitions> <term_definitions code="at0001"> - <items id="comment">z.B. '7.3 mmol/l', 'Erhöht'. Der 'Any'-Datentyp wird dann -durch eine Spezialisierung, eine Vorlage oder zur Laufzeit -auf einen passenden Datentypen eingeschränkt werden müssen, um das aktuelle Analyt-Ergebnis wiederzugeben. Der 'Quantity'-Datentyp hat Referenzmodell-Attribute, wie Kennungen für normal/abnormal, Referenzbereiche und Näherungen - für weitere Details s. https://specifications.openehr.org/releases/RM/latest/data_types.html#_dv_quantity_class .</items> + <items id="comment">z.B. "7,3 mmol/l", "Erhöht". Der "Any"-Datentyp wird dann durch eine Spezialisierung, eine Vorlage oder zur Laufzeit der Anwendung auf einen passenden Datentyp eingeschränkt werden müssen, um das aktuelle Analyt-Ergebnis wiederzugeben. Der "Quantity"-Datentyp hat Referenzmodell-Attribute, wie Kennungen für normal/abnormal, Referenzbereiche und Näherungen - für weitere Details s. https://specifications.openehr.org/releases/RM/latest/data_types.html#_dv_quantity_class .</items> <items id="description">(Mess-)Wert des Analyt-Resultats.</items> <items id="fhir_mapping">Observation.value[x]</items> <items id="hl7v2_mapping">OBX.2, OBX.5, OBX.6, OBX.7, OBX.8</items> - <items id="text">Analyt-Resultat</items> + <items id="text">Analyt-Ergebnis</items> </term_definitions> <term_definitions code="at0003"> - <items id="description">Kommentar zum Analyt-Resultat, soweit noch nicht in anderen Feldern erfasst.</items> + <items id="description">Kommentar zum Analyt-Ergebnis, soweit noch nicht in anderen Feldern erfasst.</items> <items id="fhir_mapping">Observation.note</items> <items id="hl7v2_mapping">NTE.3</items> <items id="text">Kommentar</items> @@ -2667,7 +2676,7 @@ auf einen passenden Datentypen eingeschränkt werden müssen, um das aktuelle An <items id="text">Analyseergebnis-Details</items> </term_definitions> <term_definitions code="at0015"> - <items id="description">Der Test ist im Laborinformationssystem erfasst, aber noch kein Resultat verfügbar.</items> + <items id="description">Der Test ist im Laborinformationssystem erfasst, aber noch kein Ergebnis verfügbar.</items> <items id="text">Erfasst</items> </term_definitions> <term_definitions code="at0016"> @@ -2679,52 +2688,57 @@ auf einen passenden Datentypen eingeschränkt werden müssen, um das aktuelle An <items id="text">Vorläufig</items> </term_definitions> <term_definitions code="at0018"> - <items id="description">Das Testresultat ist vollständig und durch eine autorisierte Person verifiziert.</items> + <items id="description">Das Analyseergebnis ist vollständig und durch eine autorisierte Person verifiziert.</items> <items id="text">Endbefund</items> </term_definitions> <term_definitions code="at0019"> - <items id="description">Der Endbefund wurde erneut modifiziert, ist vollständig und wurde durch den verantwortlichen Pathologen verifiziert. Dies ist eine Unterkategorie von "Endbefund, geändert".</items> + <items id="description">Das Ergebnis wurde nach dem endgültigen Ergebnis korrigiert und vom zuständigen Laborwissenschaftler vervollständigt und verifiziert. Dies ist eine Unterkategorie von "Endbefund, geändert".</items> <items id="text">Endbefund, korrigiert</items> </term_definitions> <term_definitions code="at0020"> - <items id="description">Der Endbefund wurde erneut modifiziert, ist vollständig und wurde durch den verantwortlichen Pathologen verifiziert. Des Weiteren haben sich die Ergebnisdaten hierdurch verändert.</items> + <items id="description">Das Ergebnis wurde nach dem endgültigen Ergebnis geändert und vom zuständigen Laborwissenschaftler vervollständigt und verifiziert. Die Ergebnisdaten wurden geändert.</items> <items id="text">Endbefund, geändert</items> </term_definitions> <term_definitions code="at0021"> - <items id="description">Nach Abschluss wurde der Bericht durch Hinzufügen neuer Inhalte abgeändert. Der vorhandenen Inhalte sind unverändert. Dies ist eine Unterkategorie von "Endbefund, geändert".</items> + <items id="description">Nach Abschluss wurde der Bericht durch das Hinzufügen neuer Inhalte abgeändert. Die vorhandene Inhalte sind unverändert. Dies ist eine Unterkategorie von "Endbefund, geändert".</items> <items id="text">Endbefund, ergänzt</items> </term_definitions> <term_definitions code="at0022"> - <items id="description">Das Testresultat wurde nach Endbefundung zurückgezogen.</items> + <items id="description">Das Testergebnis wurde nach Endbefundung zurückgezogen.</items> <items id="text">Endbefund, widerrufen</items> </term_definitions> <term_definitions code="at0023"> - <items id="description">Das Testresultat ist nicht verfügbar, weil der Test nicht (vollständig) durchgeführt oder abgebrochen wurde.</items> + <items id="description">Das Testergebnis ist nicht verfügbar, weil der Test nicht (vollständig) durchgeführt oder abgebrochen wurde.</items> <items id="text">Storniert</items> </term_definitions> <term_definitions code="at0024"> - <items id="comment">Der Wert dieses Elements wird normalerweise meist durch eine Spezialisierung, durch einer Vorlage oder zur Laufzeit geliefert, um den aktuellen Analyt wiederzugeben. Zum Beispiel: 'Natrium im Serum','Hämoglobin'. + <items id="comment">Der Wert dieses Elements wird normalerweise, meist durch eine Spezialisierung, in einem Template oder zur Laufzeit der Anwendung geliefert, um den aktuellen Analyt wiederzugeben. Zum Beispiel: 'Natrium im Serum', 'Hämoglobin'. Die Codierung mit einer externen Terminologie, wie LOINC, NPU, SNOMED-CT oder lokalen Labor-Terminologien wird dringend empfohlen.</items> <items id="description">Der Name des untersuchten Analyts.</items> <items id="fhir_mapping">Observation.code</items> <items id="hl7v2_mapping">OBX.3</items> - <items id="text">untersuchter Analyt</items> + <items id="text">Untersuchter Analyt</items> </term_definitions> <term_definitions code="at0025"> - <items id="comment">In vielen Gerichtsbarkeiten wird angenommen, dass der 'Ergebnisstatus' die medizinische Validation einschliesst, in anderen wird diese anhand dieses Datenelements separat erfasst und befundet</items> + <items id="comment">In vielen Gerichtsbarkeiten wird angenommen, dass der 'Ergebnisstatus' die medizinische Validierung einschliesst, in anderen wird diese anhand dieses Datenelements separat erfasst und befundet.</items> <items id="description">Datum und Zeit, an dem das Analyseergebnis im Labor medizinisch validiert wurde.</items> - <items id="text">Zeitpunkt Validation</items> + <items id="text">Zeitpunkt der Validierung</items> </term_definitions> <term_definitions code="at0026"> - <items id="comment">In manchen Situationen wird ein einzelner Laborergebnis-Archetyp mehrere Probe- und Laboranalyt-Resultat-Archetypen enthalten. In diesen Fällen wird dieses 'Probe'-Datenelement benötigt, um die Resultate mit den richtigen Proben zu verknüpfen.</items> + <items id="comment">In manchen Situationen wird ein einzelner Laborergebnis-Archetyp mehrere Probe- und Laboranalyt-Ergebnis-Archetypen enthalten. In diesen Fällen wird dieses "Probe"-Datenelement benötigt, um die Ergebnisse mit den richtigen Proben zu verknüpfen.</items> <items id="description">Kennung der Probe, die für das Analyseergebnis verwendet wurde.</items> <items id="text">Probe</items> </term_definitions> <term_definitions code="at0027"> <items id="comment">z.B. '1', '2', '3'. Werden mehrere Analysenergebnisse berichtet, gibt die Analyseergebnis-Reihenfolge explizit die Reihenfolge der Analyseergebnisse an.</items> - <items id="description">Die beabsichtigte Position dieses Analyseergebnisses in der Reihenfolge aller Analyseergebnisse</items> + <items id="description">Die beabsichtigte Position dieses Analyseergebnisses in der Reihenfolge aller Analyseergebnisse.</items> <items id="text">Analyseergebnis-Reihenfolge</items> </term_definitions> + <term_definitions code="at0028"> + <items id="comment">Wenn die Testmethode für ein gesamtes Panel gilt, kann die Testmethode mithilfe des Datenelements "Testmethode" im Ergebnis OBSERVATION.laboratory_test_result erfasst werden.</items> + <items id="description">Die Beschreibung der Methode, mit der der Test nur für diesen Analyten durchgeführt wurde.</items> + <items id="text">Testmethode</items> + </term_definitions> <term_definitions code="48421-2"> <items id="text">C reactive protein [Mass/volume] in Capillary blood</items> </term_definitions> @@ -3199,7 +3213,7 @@ Die Codierung mit einer externen Terminologie, wie LOINC, NPU, SNOMED-CT oder lo <right_operand xsi:type="EXPR_LEAF"> <type>C_STRING</type> <item xsi:type="C_STRING"> - <pattern>openEHR-EHR-CLUSTER\.multimedia(-[a-zA-Z0-9_]+)*\.v1</pattern> + <pattern>openEHR-EHR-CLUSTER\.media_capture(-[a-zA-Z0-9_]+)*\.v1|openEHR-EHR-CLUSTER\.media_capture(-[a-zA-Z0-9_]+)*\.v0</pattern> </item> <reference_type>constraint</reference_type> </right_operand> @@ -3929,6 +3943,9 @@ Bekannte Schwierigkeiten bei der Probenentnahme oder -behandlung, wie z.B. die " <items id="text">geändert</items> </term_definitions> </definition> + <annotations path="[openEHR-EHR-COMPOSITION.registereintrag.v1]/content[openEHR-EHR-OBSERVATION.laboratory_test_result.v1]"> + <items id="26436-6">laboratory</items> + </annotations> <annotations path="[openEHR-EHR-COMPOSITION.registereintrag.v1]/content[openEHR-EHR-OBSERVATION.laboratory_test_result.v1]/data[at0001]/events[at0002]/data[at0003]/items[openEHR-EHR-CLUSTER.specimen.v1]/items[at0071]"> <items id="fhir_mapping">Specimen.collection.collector</items> </annotations> From 6719e4c2f485516632425754beb925fbd0856c9d Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Mon, 21 Jun 2021 20:05:24 +0200 Subject: [PATCH 100/141] #345 Create an EHR when it is missing --- .../camel/processor/EhrIdLookupProcessor.java | 90 ++++++-- .../config/FhirValidationConfiguration.java | 14 ++ .../config/FhirValidationProperties.java | 10 + .../validator/AbstractBundleValidator.java | 29 +-- .../fhirbridge/fhir/support/Resources.java | 200 ++++++------------ src/main/resources/application.yml | 1 + .../fhir/procedure/ProcedureIT.java | 7 +- 7 files changed, 174 insertions(+), 177 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrIdLookupProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrIdLookupProcessor.java index 301a3af2b..bc66d33cd 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrIdLookupProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrIdLookupProcessor.java @@ -1,6 +1,11 @@ package org.ehrbase.fhirbridge.camel.processor; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import com.nedap.archie.rm.datavalues.DvText; +import com.nedap.archie.rm.ehr.EhrStatus; +import com.nedap.archie.rm.generic.PartySelf; +import com.nedap.archie.rm.support.identification.GenericId; +import com.nedap.archie.rm.support.identification.PartyRef; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.ehrbase.client.aql.parameter.ParameterValue; @@ -8,9 +13,13 @@ import org.ehrbase.client.aql.record.Record1; import org.ehrbase.client.openehrclient.OpenEhrClient; import org.ehrbase.fhirbridge.camel.component.ehr.composition.CompositionConstants; +import org.ehrbase.fhirbridge.core.domain.PatientId; import org.ehrbase.fhirbridge.core.repository.PatientIdRepository; import org.ehrbase.fhirbridge.fhir.support.Resources; import org.hl7.fhir.r4.model.Identifier; +import org.hl7.fhir.r4.model.Patient; +import org.hl7.fhir.r4.model.QuestionnaireResponse; +import org.hl7.fhir.r4.model.Reference; import org.hl7.fhir.r4.model.Resource; import org.springframework.context.MessageSource; import org.springframework.context.MessageSourceAware; @@ -26,6 +35,7 @@ * {@link Processor} that lookups for the EhrId corresponding to the subject identifier provided in the resource. */ @Component +@SuppressWarnings("java:S6212") public class EhrIdLookupProcessor implements Processor, MessageSourceAware { private final OpenEhrClient openEhrClient; @@ -40,25 +50,73 @@ public EhrIdLookupProcessor(OpenEhrClient openEhrClient, PatientIdRepository pat } @Override - public void process(Exchange exchange) { - Resource resource = exchange.getIn().getBody(Resource.class); - String subject = Resources.getSubjectIdentifier(resource, Optional.of(openEhrClient), Optional.of(patientIdRepository)) - .map(Identifier::getValue) - .orElseThrow(() -> new UnprocessableEntityException(messages.getMessage("validation.subject.identifierRequired"))); - - // @formatter:off - Query<Record1<UUID>> query = Query.buildNativeQuery( - "SELECT e/ehr_id/value " + - "FROM ehr e " + - "WHERE e/ehr_status/subject/external_ref/id/value = $subject", UUID.class); - // @formatter:on - - List<Record1<UUID>> result = openEhrClient.aqlEndpoint().execute(query, new ParameterValue<>("subject", subject)); + public void process(Exchange exchange) throws Exception { + Resource resource = exchange.getIn().getMandatoryBody(Resource.class); + + Identifier identifier; + if (Resources.isPatient(resource)) { + identifier = handlePatientIdentifier((Patient) resource); + } else if (Resources.isQuestionnaireResponse(resource) && Resources.isCovid19Questionnaire((QuestionnaireResponse) resource)) { + identifier = generateRandomIdentifier(); + } else { + identifier = handleOtherResourceIdentifier(resource); + } + + UUID ehrId = findEhrId(identifier) + .orElseGet(() -> createEhr(identifier)); + + exchange.getIn().setHeader(CompositionConstants.EHR_ID, ehrId); + } + + private Identifier handlePatientIdentifier(Patient patient) { + if (!patient.hasIdentifier()) { + throw new UnprocessableEntityException("Patient should have one identifier"); + } else if (patient.getIdentifier().size() > 1) { + throw new UnprocessableEntityException("Patient has more than one identifier"); + } + + return patient.getIdentifier().get(0); + } + + private Identifier handleOtherResourceIdentifier(Resource resource) { + Reference subject = Resources.getSubject(resource) + .orElseThrow(UnprocessableEntityException::new); + + if (!subject.hasIdentifier()) { + throw new UnprocessableEntityException(messages.getMessage("validation.subject.identifierRequired")); + } + + return subject.getIdentifier(); + } + + private Identifier generateRandomIdentifier() { + PatientId patientId = patientIdRepository.save(new PatientId()); + return new Identifier() + .setSystem(Resources.RFC_4122_SYSTEM) + .setValue(patientId.getUuidAsString()); + } + + private Optional<UUID> findEhrId(Identifier identifier) { + String aql = "SELECT e/ehr_id/value FROM ehr e WHERE e/ehr_status/subject/external_ref/id/value = $value " + + "AND e/ehr_status/subject/external_ref/id/scheme = $scheme"; + Query<Record1<UUID>> query = Query.buildNativeQuery(aql, UUID.class); + + ParameterValue<String> value = new ParameterValue<>("value", identifier.getValue()); + ParameterValue<String> scheme = new ParameterValue<>("scheme", identifier.getSystem()); + List<Record1<UUID>> result = openEhrClient.aqlEndpoint().execute(query, value, scheme); + if (result.isEmpty()) { - throw new UnprocessableEntityException(messages.getMessage("validation.subject.ehrIdNotFound", new Object[]{subject})); + return Optional.empty(); } + return Optional.of(result.get(0).value1()); + } - exchange.getIn().setHeader(CompositionConstants.EHR_ID, result.get(0).value1()); + private UUID createEhr(Identifier identifier) { + GenericId id = new GenericId(identifier.getValue(), identifier.getSystem()); + PartyRef externalRef = new PartyRef(id, "DEMOGRAPHIC", "PERSON"); + PartySelf subject = new PartySelf(externalRef); + EhrStatus ehrStatus = new EhrStatus("openEHR-EHR-EHR_STATUS.generic.v1", new DvText("EHR Status"), subject, true, true, null); + return openEhrClient.ehrEndpoint().createEhr(ehrStatus); } @Override diff --git a/src/main/java/org/ehrbase/fhirbridge/config/FhirValidationConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/FhirValidationConfiguration.java index 6833dc18e..5c322936d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/FhirValidationConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/FhirValidationConfiguration.java @@ -15,6 +15,7 @@ import org.hl7.fhir.common.hapi.validation.support.RemoteTerminologyServiceValidationSupport; import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator; +import org.hl7.fhir.r4.model.ElementDefinition; import org.hl7.fhir.r4.model.StructureDefinition; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.ApplicationContext; @@ -23,6 +24,8 @@ import org.springframework.core.io.Resource; import java.io.IOException; +import java.util.function.Consumer; +import java.util.function.Predicate; /** * {@link Configuration Configuration} for FHIR validation. @@ -71,6 +74,9 @@ public IValidationSupport validationSupport() { try { for (Resource resource : applicationContext.getResources("classpath:/profiles/*")) { StructureDefinition profile = parser.parseResource(StructureDefinition.class, resource.getInputStream()); + if (properties.isOptionalIdentifier()) { + modifyProfile(profile); + } prePopulatedValidationSupport.addStructureDefinition(profile); } } catch (IOException e) { @@ -95,6 +101,14 @@ public IValidationSupport validationSupport() { return new CachingValidationSupport(validationSupportChain); } + private void modifyProfile(StructureDefinition profile) { + Predicate<? super ElementDefinition> modPredicate = e -> e.hasPath() && e.getPath().endsWith(".identifier") && e.getMin() > 0; + Consumer<? super ElementDefinition> modAction = e -> e.setMin(0); + + profile.getSnapshot().getElement().stream().filter(modPredicate).forEach(modAction); + profile.getDifferential().getElement().stream().filter(modPredicate).forEach(modAction); + } + private boolean isTerminologyValidationEnabled() { return properties.getTerminology().getMode() != TerminologyValidationMode.NONE; } diff --git a/src/main/java/org/ehrbase/fhirbridge/config/FhirValidationProperties.java b/src/main/java/org/ehrbase/fhirbridge/config/FhirValidationProperties.java index 7df1f5fbc..71dafb93a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/FhirValidationProperties.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/FhirValidationProperties.java @@ -17,6 +17,8 @@ public class FhirValidationProperties { private boolean errorForUnknownProfiles = false; + private boolean optionalIdentifier = false; + @NestedConfigurationProperty private final Terminology terminology = new Terminology(); @@ -44,6 +46,14 @@ public void setErrorForUnknownProfiles(boolean errorForUnknownProfiles) { this.errorForUnknownProfiles = errorForUnknownProfiles; } + public boolean isOptionalIdentifier() { + return optionalIdentifier; + } + + public void setOptionalIdentifier(boolean optionalIdentifier) { + this.optionalIdentifier = optionalIdentifier; + } + public Terminology getTerminology() { return terminology; } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java b/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java index 73c99058e..3af0366f4 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java @@ -5,10 +5,10 @@ import org.ehrbase.fhirbridge.fhir.support.Resources; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.r4.model.Reference; import org.hl7.fhir.r4.model.Resource; import org.openehealth.ipf.commons.ihe.fhir.FhirTransactionValidator; -import javax.validation.constraints.Null; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -50,29 +50,18 @@ void setUrlMemberLists(Bundle.BundleEntryComponent entry, MemberValidator member } void validateEqualPatientIds(Bundle bundle) { - List<String> patientIds = new ArrayList<>(); + List<Reference> subjects = new ArrayList<>(); for (Bundle.BundleEntryComponent entry : bundle.getEntry()) { - Resources.getSubjectIdentifier(entry.getResource()) - .ifPresent(identifier -> patientIds.add(identifier.getValue())); + Resources.getSubject(entry.getResource()) + .ifPresent(subjects::add); } - checkPatientIdsIdentical(patientIds); + checkPatientIdsIdentical(subjects); } - private void checkPatientIdsIdentical(List<String> patientIds) { - for (String id : patientIds) { - try { - if (!id.equals(patientIds.get(0))) { - throw new InternalErrorException("subject.reference ids all have to be equal! A Fhir Bridge Bundle cannot reference to different Patients !"); - } - }catch (NullPointerException nullPointerException) { - throw new UnprocessableEntityException("Ensure that the subject id has the following format : " + - "\"subject\": {\n" + - " \"identifier\": {\n" + - " \"system\": \"urn:ietf:rfc:4122\",\n" + - " \"value\": \"example\"\n" + - " }\n" + - " },"); - + private void checkPatientIdsIdentical(List<Reference> subjects) { + for (Reference reference : subjects) { + if (!reference.equals(subjects.get(0))) { + throw new InternalErrorException("subject.reference ids all have to be equal! A Fhir Bridge Bundle cannot reference to different Patients !"); } } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java index 597fc3a13..4b9929d91 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java @@ -1,187 +1,111 @@ package org.ehrbase.fhirbridge.fhir.support; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; -import com.nedap.archie.rm.datavalues.DvText; -import com.nedap.archie.rm.ehr.EhrStatus; -import com.nedap.archie.rm.generic.PartySelf; -import com.nedap.archie.rm.support.identification.GenericId; -import com.nedap.archie.rm.support.identification.PartyRef; -import org.ehrbase.client.aql.parameter.ParameterValue; -import org.ehrbase.client.aql.query.Query; -import org.ehrbase.client.aql.record.Record1; -import org.ehrbase.client.openehrclient.OpenEhrClient; -import org.ehrbase.fhirbridge.core.domain.PatientId; -import org.ehrbase.fhirbridge.core.repository.PatientIdRepository; +import org.apache.commons.lang3.StringUtils; import org.ehrbase.fhirbridge.fhir.common.Profile; import org.hl7.fhir.r4.model.CanonicalType; import org.hl7.fhir.r4.model.Condition; import org.hl7.fhir.r4.model.Consent; import org.hl7.fhir.r4.model.DiagnosticReport; -import org.hl7.fhir.r4.model.Identifier; +import org.hl7.fhir.r4.model.Encounter; import org.hl7.fhir.r4.model.MedicationStatement; import org.hl7.fhir.r4.model.Observation; -import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.r4.model.PrimitiveType; import org.hl7.fhir.r4.model.Procedure; import org.hl7.fhir.r4.model.QuestionnaireResponse; +import org.hl7.fhir.r4.model.Reference; import org.hl7.fhir.r4.model.Resource; -import org.hl7.fhir.r4.model.Encounter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.hl7.fhir.r4.model.ResourceType; import java.util.Arrays; import java.util.Collections; import java.util.List; -import java.util.Objects; import java.util.Optional; import java.util.Set; -import java.util.UUID; import java.util.stream.Collectors; +@SuppressWarnings("java:S6212") public class Resources { public static final String RFC_4122_SYSTEM = "urn:ietf:rfc:4122"; - private static final Logger LOG = LoggerFactory.getLogger(Resources.class); + private static final String COVID_19_QUESTIONNAIRE_URL = "http://fhir.data4life.care/covid-19/r4/Questionnaire/covid19-recommendation"; private Resources() { + throw new IllegalStateException("Utility class"); } - public static void addIdentifier(Identifier identifier, Resource resource) { - if (resource instanceof Condition) { - ((Condition) resource).addIdentifier(identifier); - } else if (resource instanceof DiagnosticReport) { - ((DiagnosticReport) resource).addIdentifier(identifier); - } else if (resource instanceof Observation) { - ((Observation) resource).addIdentifier(identifier); - } else if (resource instanceof Patient) { - ((Patient) resource).addIdentifier(identifier); - } else if (resource instanceof Procedure) { - ((Procedure) resource).addIdentifier(identifier); - } + public static boolean isPatient(Resource resource) { + return resource != null && resource.getResourceType() == ResourceType.Patient; } - public static List<String> getProfileUris(Resource resource) { - return resource.getMeta().getProfile() - .stream() - .map(CanonicalType::getValue) - .collect(Collectors.toUnmodifiableList()); + public static boolean isQuestionnaireResponse(Resource resource) { + return resource != null && resource.getResourceType() == ResourceType.QuestionnaireResponse; } - public static Optional<Identifier> getSubjectIdentifier(Resource resourceopenEhrClient) { - return getSubjectIdentifier(resourceopenEhrClient, Optional.empty(), Optional.empty()); - } - - - public static Optional<Identifier> getSubjectIdentifier(Resource resource, Optional<OpenEhrClient> openEhrClient, Optional<PatientIdRepository> patientIdRepository) { - Identifier subjectIdentifier = null; - - if (resource instanceof Condition) { - subjectIdentifier = ((Condition) resource).getSubject().getIdentifier(); - } else if (resource instanceof Consent) { - subjectIdentifier = ((Consent) resource).getPatient().getIdentifier(); - } else if (resource instanceof DiagnosticReport) { - subjectIdentifier = ((DiagnosticReport) resource).getSubject().getIdentifier(); - } else if (resource instanceof MedicationStatement) { - subjectIdentifier = ((MedicationStatement) resource).getSubject().getIdentifier(); - } else if (resource instanceof Observation) { - subjectIdentifier = ((Observation) resource).getSubject().getIdentifier(); - } else if (resource instanceof Patient) { - subjectIdentifier = ((Patient) resource).getIdentifier() - .stream() - .filter(identifier -> Objects.equals(identifier.getSystem(), RFC_4122_SYSTEM)) - .findFirst() - .orElse(null); - } else if (resource instanceof Procedure) { - subjectIdentifier = ((Procedure) resource).getSubject().getIdentifier(); - } else if (resource instanceof QuestionnaireResponse) { - subjectIdentifier = getQuestionnaireId((QuestionnaireResponse) resource, openEhrClient, patientIdRepository); - } else if (resource instanceof Encounter) { - subjectIdentifier = getEncounterIdentifier((Encounter) resource, openEhrClient); - } - - return Optional.ofNullable(subjectIdentifier); + public static boolean isCovid19Questionnaire(QuestionnaireResponse questionnaireResponse) { + return questionnaireResponse != null && StringUtils.contains(questionnaireResponse.getQuestionnaire(), COVID_19_QUESTIONNAIRE_URL); } - private static Identifier getEncounterIdentifier(Encounter resource, Optional<OpenEhrClient> openEhrClient) { - - if (openEhrClient.isEmpty()) { - throw new InternalErrorException("getSubjectIdentifier by Encounter was called without a configured openEHRClient as parameter. Please add one."); + public static Optional<Reference> getSubject(Resource resource) { + switch (resource.getResourceType()) { + case Condition: + return getSubject((Condition) resource); + case Consent: + return getSubject((Consent) resource); + case DiagnosticReport: + return getSubject((DiagnosticReport) resource); + case Encounter: + return getSubject((Encounter) resource); + case MedicationStatement: + return getSubject((MedicationStatement) resource); + case Observation: + return getSubject((Observation) resource); + case Procedure: + return getSubject((Procedure) resource); + case QuestionnaireResponse: + return getSubject((QuestionnaireResponse) resource); + default: + throw new IllegalArgumentException("Unsupported resource type: " + resource.getResourceType()); } + } + + public static Optional<Reference> getSubject(Condition condition) { + return condition.hasSubject() ? Optional.of(condition.getSubject()) : Optional.empty(); + } - // @formatter:off - Query<Record1<UUID>> query = Query.buildNativeQuery( - "SELECT e/ehr_id/value " + - "FROM ehr e " + - "WHERE e/ehr_status/subject/external_ref/id/value = $subject", UUID.class); - // @formatter:on + public static Optional<Reference> getSubject(Consent consent) { + return consent.hasPatient() ? Optional.of(consent.getPatient()) : Optional.empty(); + } - List<Record1<UUID>> result = openEhrClient.get().aqlEndpoint().execute(query, new ParameterValue<>("subject", resource.getSubject().getIdentifier().getValue())); + public static Optional<Reference> getSubject(DiagnosticReport diagnosticReport) { + return diagnosticReport.hasSubject() ? Optional.of(diagnosticReport.getSubject()) : Optional.empty(); + } - LOG.debug("Subject ID from Encounter: " + resource.getSubject().getIdentifier().getValue()); + public static Optional<Reference> getSubject(Encounter encounter) { + return encounter.hasSubject() ? Optional.of(encounter.getSubject()) : Optional.empty(); + } - // create ehr if patient not exist - if (result.isEmpty()) { - return createEHRWithSubjectID(openEhrClient.get(), resource.getSubject().getIdentifier().getValue()); - } else { - return resource.getSubject().getIdentifier(); - } + public static Optional<Reference> getSubject(MedicationStatement medicationStatement) { + return medicationStatement.hasSubject() ? Optional.of(medicationStatement.getSubject()) : Optional.empty(); } - private static Identifier createEHRWithSubjectID(OpenEhrClient openEhrClient, String patientID) { - - PartySelf subject = new PartySelf(); - PartyRef externalRef = new PartyRef(); - externalRef.setType("PERSON"); - externalRef.setNamespace("SmICSTests"); - GenericId genericId = new GenericId(); - genericId.setScheme("id_scheme"); - genericId.setValue(patientID); - externalRef.setId(genericId); - subject.setExternalRef(externalRef); - DvText dvText = new DvText("any EHR status"); - EhrStatus ehrStatus = new EhrStatus("openEHR-EHR-ITEM_TREE.generic.v1", dvText, subject, true, true, null); - UUID ehrId = openEhrClient.ehrEndpoint().createEhr(ehrStatus); - LOG.debug("created EhrID: " + ehrId.toString()); - Identifier identifier = new Identifier(); - identifier.setValue(genericId.getValue()); - return identifier; - } - - public static Identifier getQuestionnaireId(QuestionnaireResponse resource, Optional<OpenEhrClient> openEhrClient, Optional<PatientIdRepository> patientIdRepository) { - if (openEhrClient.isEmpty()) { - throw new InternalErrorException("getSubjectIdentifier was called without a confugred openEHRClient as parameter. Please add one."); - } - if (patientIdRepository.isEmpty()) { - throw new InternalErrorException("PatientIdRepository is required"); - } + public static Optional<Reference> getSubject(Observation observation) { + return observation.hasSubject() ? Optional.of(observation.getSubject()) : Optional.empty(); + } - if (resource.getQuestionnaire().contains("http://fhir.data4life.care/covid-19/r4/Questionnaire/covid19-recommendation|")) { - return createQuestionnaireEHRAndReturnPatientId(openEhrClient.get(), patientIdRepository.get()); - } else { - return resource.getSubject().getIdentifier(); - } + public static Optional<Reference> getSubject(Procedure procedure) { + return procedure.hasSubject() ? Optional.of(procedure.getSubject()) : Optional.empty(); } + public static Optional<Reference> getSubject(QuestionnaireResponse questionnaireResponse) { + return questionnaireResponse.hasSubject() ? Optional.of(questionnaireResponse.getSubject()) : Optional.empty(); + } - private static Identifier createQuestionnaireEHRAndReturnPatientId(OpenEhrClient openEhrClient, PatientIdRepository patientIdRepository) { - PatientId patientId = patientIdRepository.save(new PatientId()); - PartySelf subject = new PartySelf(); - PartyRef externalRef = new PartyRef(); - externalRef.setType("PARTY_REF"); - externalRef.setNamespace("patients"); - GenericId genericId = new GenericId(); - genericId.setScheme("id_scheme"); - genericId.setValue(patientId.getUuidAsString()); - externalRef.setId(genericId); - subject.setExternalRef(externalRef); - DvText dvText = new DvText("any EHR status"); - EhrStatus ehrStatus = new EhrStatus("openEHR-EHR-ITEM_TREE.generic.v1", dvText, subject, true, true, null); - UUID ehrId = openEhrClient.ehrEndpoint().createEhr(ehrStatus); - LOG.debug("EhrID: " + ehrId.toString()); - Identifier identifier = new Identifier(); - identifier.setValue(genericId.getValue()); - return identifier; + public static List<String> getProfileUris(Resource resource) { + return resource.getMeta().getProfile() + .stream() + .map(CanonicalType::getValue) + .collect(Collectors.toUnmodifiableList()); } public static boolean hasProfile(Resource resource, Profile profile) { diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 9b1c09e1e..567ab9a48 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -38,6 +38,7 @@ fhir-bridge: # any-extensions-allowed: # error-for-unknown-profiles: # failed-on-severity: +# optional-identifier: # terminology: # mode: # server-base-url: diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/ProcedureIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/ProcedureIT.java index 7b9726c47..9ed56123d 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/ProcedureIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/ProcedureIT.java @@ -1,5 +1,6 @@ package org.ehrbase.fhirbridge.fhir.procedure; +import ca.uhn.fhir.rest.api.MethodOutcome; import ca.uhn.fhir.rest.gclient.ICreateTyped; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.ehrbase.fhirbridge.comparators.CustomTemporalAcessorComparator; @@ -50,10 +51,10 @@ void createWithDefaultProfile() throws IOException { @Test void createWithNonExistingSubject() throws IOException { String resource = super.testFileLoader.loadResourceToString("create-procedure-with-non-existing-subject.json"); - ICreateTyped createTyped = client.create().resource(resource.replaceAll(PATIENT_ID_TOKEN, PATIENT_ID)); - Exception exception = Assertions.assertThrows(UnprocessableEntityException.class, createTyped::execute); + MethodOutcome outcome = client.create().resource(resource.replaceAll(PATIENT_ID_TOKEN, PATIENT_ID)).execute(); - assertEquals("HTTP 422 : EhrId not found for subject '123456789'", exception.getMessage()); + assertNotNull(outcome.getId()); + assertEquals(true, outcome.getCreated()); } @Override From b319eee7b989f65781ff2a0caaaced4c570b2445 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Mon, 21 Jun 2021 20:42:19 +0200 Subject: [PATCH 101/141] Fix BundleValidator --- .../validator/AbstractBundleValidator.java | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java b/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java index 3af0366f4..8aab24b5c 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java @@ -4,6 +4,7 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.ehrbase.fhirbridge.fhir.support.Resources; import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.Identifier; import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Reference; import org.hl7.fhir.r4.model.Resource; @@ -50,17 +51,24 @@ void setUrlMemberLists(Bundle.BundleEntryComponent entry, MemberValidator member } void validateEqualPatientIds(Bundle bundle) { - List<Reference> subjects = new ArrayList<>(); + List<Identifier> patientIds = new ArrayList<>(); for (Bundle.BundleEntryComponent entry : bundle.getEntry()) { - Resources.getSubject(entry.getResource()) - .ifPresent(subjects::add); + patientIds.add(Resources.getSubject(entry.getResource()) + .map(Reference::getIdentifier) + .orElseThrow(() -> new UnprocessableEntityException("Ensure that the subject id has the following format : " + + "\"subject\": {\n" + + " \"identifier\": {\n" + + " \"system\": \"urn:ietf:rfc:4122\",\n" + + " \"value\": \"example\"\n" + + " }\n" + + " },"))); } - checkPatientIdsIdentical(subjects); + checkPatientIdsIdentical(patientIds); } - private void checkPatientIdsIdentical(List<Reference> subjects) { - for (Reference reference : subjects) { - if (!reference.equals(subjects.get(0))) { + private void checkPatientIdsIdentical(List<Identifier> patientIds) { + for (Identifier id : patientIds) { + if (!id.getValue().equals(patientIds.get(0).getValue())) { throw new InternalErrorException("subject.reference ids all have to be equal! A Fhir Bridge Bundle cannot reference to different Patients !"); } } From b448d70f03d6da20af9da4b0f14bdc002bdd95b7 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Mon, 21 Jun 2021 21:02:03 +0200 Subject: [PATCH 102/141] Fix SonarCloud issues --- .../fhir/bundle/validator/AbstractBundleValidator.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java b/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java index 8aab24b5c..baf0706b7 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java @@ -15,6 +15,7 @@ import java.util.Map; import java.util.Objects; +@SuppressWarnings("java:S6212") public abstract class AbstractBundleValidator implements FhirTransactionValidator { @Override @@ -43,7 +44,7 @@ void setUrlMemberLists(Bundle.BundleEntryComponent entry, MemberValidator member memberValidator.addFullUrls(entry.getFullUrl()); if (isObservation(entry)) { Observation observation = (Observation) entry.getResource(); - if (observation.getHasMember().size() > 0) { + if (!observation.getHasMember().isEmpty()) { memberValidator.setHasMembersList(observation.getHasMember()); memberValidator.deleteFullUrl(entry.getFullUrl()); //Since the Observation is not a Member of itself } @@ -53,7 +54,7 @@ void setUrlMemberLists(Bundle.BundleEntryComponent entry, MemberValidator member void validateEqualPatientIds(Bundle bundle) { List<Identifier> patientIds = new ArrayList<>(); for (Bundle.BundleEntryComponent entry : bundle.getEntry()) { - patientIds.add(Resources.getSubject(entry.getResource()) + Identifier identifier = Resources.getSubject(entry.getResource()) .map(Reference::getIdentifier) .orElseThrow(() -> new UnprocessableEntityException("Ensure that the subject id has the following format : " + "\"subject\": {\n" + @@ -61,7 +62,9 @@ void validateEqualPatientIds(Bundle bundle) { " \"system\": \"urn:ietf:rfc:4122\",\n" + " \"value\": \"example\"\n" + " }\n" + - " },"))); + " },")); + + patientIds.add(identifier); } checkPatientIdsIdentical(patientIds); } From 151266c2b6300320a9e63246e1d6f7dc92648d09 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 22 Jun 2021 09:46:16 +0200 Subject: [PATCH 103/141] Fix issues with 'deprecated' test cases --- .../fhirbridge/camel/processor/EhrIdLookupProcessor.java | 4 ++++ tests/robot/CONDITION/03_create_symptoms_covid19.robot | 4 ++-- .../DIAGNOSTIC/02_create_diagnostic_report_radiology.robot | 4 ++-- tests/robot/OBSERVATION/03_create_blood_pressure.robot | 4 ++-- tests/robot/OBSERVATION/05_create_fi02.robot | 4 ++-- tests/robot/OBSERVATION/07_create_body_weight.robot | 2 +- tests/robot/OBSERVATION/08_create_smoking_status.robot | 4 ++-- tests/robot/OBSERVATION/09_create_pregnancy_status.robot | 4 ++-- tests/robot/OBSERVATION/10_create_sofa_score.robot | 4 ++-- .../OBSERVATION/11_create-clinical-frailty-scale-score.robot | 4 ++-- tests/robot/OBSERVATION/12_create_body_height.robot | 4 ++-- tests/robot/OBSERVATION/13_create_patient_in_ICU.robot | 4 ++-- tests/robot/OBSERVATION/14_create_observation-lab.robot | 4 ++-- tests/robot/OBSERVATION/15_create_respiratory_rate.robot | 4 ++-- tests/robot/OBSERVATION/16_create_oxygen-saturation.robot | 4 ++-- tests/robot/OBSERVATION/17_create_history_of_travel.robot | 4 ++-- tests/robot/PROCEDURE/02_create_procedure.robot | 4 ++-- 17 files changed, 35 insertions(+), 31 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrIdLookupProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrIdLookupProcessor.java index bc66d33cd..a7cc2f3c7 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrIdLookupProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrIdLookupProcessor.java @@ -62,6 +62,10 @@ public void process(Exchange exchange) throws Exception { identifier = handleOtherResourceIdentifier(resource); } + if (!identifier.hasSystem() || !identifier.hasValue()) { + throw new UnprocessableEntityException(messages.getMessage("validation.subject.identifierRequired")); + } + UUID ehrId = findEhrId(identifier) .orElseGet(() -> createEhr(identifier)); diff --git a/tests/robot/CONDITION/03_create_symptoms_covid19.robot b/tests/robot/CONDITION/03_create_symptoms_covid19.robot index f3db49c5b..f4e0b3980 100644 --- a/tests/robot/CONDITION/03_create_symptoms_covid19.robot +++ b/tests/robot/CONDITION/03_create_symptoms_covid19.robot @@ -153,7 +153,7 @@ ${randinteger} ${12345} # CODE # invalid cases for value $.subject.identifier.value missing 422 - $.subject.identifier.value foobar 422 + # Deprecated: $.subject.identifier.value foobar 422 $.subject.identifier.value ${EMPTY} 422 $.subject.identifier.value ${{ [] }} 422 $.subject.identifier.value ${{ {} }} 422 @@ -181,7 +181,7 @@ ${randinteger} ${12345} $.subject ${123} 422 # comment: random uuid - $.subject.identifier.value ${{str(uuid.uuid4())}} 422 + # Deprecated: $.subject.identifier.value ${{str(uuid.uuid4())}} 422 005 Create Symptoms-Covid-19 (Present) (invalid/missing 'verificationStatus') diff --git a/tests/robot/DIAGNOSTIC/02_create_diagnostic_report_radiology.robot b/tests/robot/DIAGNOSTIC/02_create_diagnostic_report_radiology.robot index 03dd52a0c..4832fdaaa 100644 --- a/tests/robot/DIAGNOSTIC/02_create_diagnostic_report_radiology.robot +++ b/tests/robot/DIAGNOSTIC/02_create_diagnostic_report_radiology.robot @@ -212,7 +212,7 @@ ${randinteger} ${12345} # CODE # invalid cases for value $.subject.identifier.value missing 422 - $.subject.identifier.value foobar 422 + # Deprecated: $.subject.identifier.value foobar 422 $.subject.identifier.value ${EMPTY} 422 $.subject.identifier.value ${{ [] }} 422 $.subject.identifier.value ${{ {} }} 422 @@ -240,7 +240,7 @@ ${randinteger} ${12345} $.subject ${123} 422 # comment: random uuid - $.subject.identifier.value ${{str(uuid.uuid4())}} 422 + # Deprecated: $.subject.identifier.value ${{str(uuid.uuid4())}} 422 diff --git a/tests/robot/OBSERVATION/03_create_blood_pressure.robot b/tests/robot/OBSERVATION/03_create_blood_pressure.robot index bb3bade1c..93401ea54 100644 --- a/tests/robot/OBSERVATION/03_create_blood_pressure.robot +++ b/tests/robot/OBSERVATION/03_create_blood_pressure.robot @@ -48,7 +48,7 @@ ${profile url} https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefi # INDEX CODE $.subject.identifier.value missing 0 422 Subject identifier is required $.subject.identifier.system missing 0 422 EhrId not found for subject '[0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}' - $.subject.identifier.value foobar 0 422 EhrId not found for subject 'foobar' + # Deprecated: $.subject.identifier.value foobar 0 422 EhrId not found for subject 'foobar' $.subject.identifier.value ${EMPTY} 0 422 @value cannot be empty Observation.subject.identifier.value $.subject.identifier.value ${{ [] }} 0 422 This property must be an simple value, not an array Observation.subject.identifier.value $.subject.identifier.value ${{ {} }} 0 422 This property must be an simple value, not an object Observation.subject.identifier.value @@ -65,7 +65,7 @@ ${profile url} https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefi $.subject ${123} 0 422 The property subject must be an Object, not a primitive property Observation.subject # comment: random uuid regex for uuid - $.subject.identifier.value ${{str(uuid.uuid4())}} 0 422 EhrId not found for subject '[0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}' + # Deprecated: $.subject.identifier.value ${{str(uuid.uuid4())}} 0 422 EhrId not found for subject '[0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}' 002 Create Blood Pressure (Invalid/Missing 'resourceType') diff --git a/tests/robot/OBSERVATION/05_create_fi02.robot b/tests/robot/OBSERVATION/05_create_fi02.robot index 71af54076..76990f856 100644 --- a/tests/robot/OBSERVATION/05_create_fi02.robot +++ b/tests/robot/OBSERVATION/05_create_fi02.robot @@ -49,7 +49,7 @@ ${profile url} https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefi # FIXME: The two following tests have to be review after that MII-Reference is updated # $.subject.identifier.value missing 422 mii-reference-1: Either reference.reference XOR reference.identifier exists ..this.reference.exists.. xor ..this.identifier.value.exists.. and .this.identifier.system.exists # $.subject.identifier.system missing 422 mii-reference-1: Either reference.reference XOR reference.identifier exists ..this.reference.exists.. xor ..this.identifier.value.exists.. and .this.identifier.system.exists - $.subject.identifier.value foobar 422 EhrId not found for subject 'foobar' + # Deprecated: $.subject.identifier.value foobar 422 EhrId not found for subject 'foobar' $.subject.identifier.value ${EMPTY} 422 @value cannot be empty Observation.subject.identifier.value $.subject.identifier.value ${{ [] }} 422 This property must be an simple value, not an array Observation.subject.identifier.value $.subject.identifier.value ${{ {} }} 422 This property must be an simple value, not an object Observation.subject.identifier.value @@ -66,7 +66,7 @@ ${profile url} https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefi $.subject ${123} 422 The property subject must be an Object, not a primitive property Observation.subject # comment: random uuid regex for uuid - $.subject.identifier.value ${{str(uuid.uuid4())}} 422 EhrId not found for subject '([0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})' + # Deprecated: $.subject.identifier.value ${{str(uuid.uuid4())}} 422 EhrId not found for subject '([0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})' 002 Create FiO2 (Invalid/Missing 'resourceType') diff --git a/tests/robot/OBSERVATION/07_create_body_weight.robot b/tests/robot/OBSERVATION/07_create_body_weight.robot index f4a5bdf54..5263f128a 100644 --- a/tests/robot/OBSERVATION/07_create_body_weight.robot +++ b/tests/robot/OBSERVATION/07_create_body_weight.robot @@ -48,7 +48,7 @@ ${body_weight_url} https://www.netzwerk-universitaetsmedizin.de/fhir/Structure # FIELD/PATH VALUE CODE ERROR MESSAGE $.subject.identifier.value missing 422 Subject identifier is required $.subject.identifier.system missing 422 EhrId not found for subject - $.subject.identifier.value foobar 422 EhrId not found for subject 'foobar' + # Deprecated: $.subject.identifier.value foobar 422 EhrId not found for subject 'foobar' $.subject.identifier.value ${EMPTY} 422 @value cannot be empty Observation.subject.identifier.value $.subject.identifier.value ${{ [] }} 422 This property must be an simple value, not an array Observation.subject.identifier.value $.subject.identifier.value ${{ {} }} 422 This property must be an simple value, not an object Observation.subject.identifier.value diff --git a/tests/robot/OBSERVATION/08_create_smoking_status.robot b/tests/robot/OBSERVATION/08_create_smoking_status.robot index f17564176..fc94d422e 100644 --- a/tests/robot/OBSERVATION/08_create_smoking_status.robot +++ b/tests/robot/OBSERVATION/08_create_smoking_status.robot @@ -52,7 +52,7 @@ ${randinteger} ${12345} # invalid cases for value $.subject.identifier.value missing 422 Subject identifier is required - $.subject.identifier.value foobar 422 EhrId not found for subject 'foobar' + # Deprecated: $.subject.identifier.value foobar 422 EhrId not found for subject 'foobar' $.subject.identifier.value ${EMPTY} 422 @value cannot be empty Observation.subject.identifier.value $.subject.identifier.value ${{ [] }} 422 This property must be an simple value, not an array Observation.subject.identifier.value $.subject.identifier.value ${{ {} }} 422 This property must be an simple value, not an object Observation.subject.identifier.value @@ -80,7 +80,7 @@ ${randinteger} ${12345} $.subject ${123} 422 The property subject must be an Object, not a primitive property Observation.subject # comment: random uuid regex for uuid - $.subject.identifier.value ${{str(uuid.uuid4())}} 422 EhrId not found for subject + # Deprecated: $.subject.identifier.value ${{str(uuid.uuid4())}} 422 EhrId not found for subject 002 Create Smoking Status (Invalid/Missing 'resourceType') diff --git a/tests/robot/OBSERVATION/09_create_pregnancy_status.robot b/tests/robot/OBSERVATION/09_create_pregnancy_status.robot index 1c4e683c6..78b9231cd 100644 --- a/tests/robot/OBSERVATION/09_create_pregnancy_status.robot +++ b/tests/robot/OBSERVATION/09_create_pregnancy_status.robot @@ -54,7 +54,7 @@ ${identifiervalue} urn:uuid:187e0c12-8dd2-67e2-1234-bf273c878281 # invalid cases for value $.subject.identifier.value missing 422 Subject identifier is required - $.subject.identifier.value foobar 422 EhrId not found for subject 'foobar' + # Deprecated: $.subject.identifier.value foobar 422 EhrId not found for subject 'foobar' $.subject.identifier.value ${EMPTY} 422 @value cannot be empty Observation.subject.identifier.value $.subject.identifier.value ${{ [] }} 422 This property must be an simple value, not an array Observation.subject.identifier.value $.subject.identifier.value ${{ {} }} 422 This property must be an simple value, not an object Observation.subject.identifier.value @@ -82,7 +82,7 @@ ${identifiervalue} urn:uuid:187e0c12-8dd2-67e2-1234-bf273c878281 $.subject ${123} 422 The property subject must be an Object, not a primitive property Observation.subject # comment: random uuid regex for uuid - $.subject.identifier.value ${{str(uuid.uuid4())}} 422 EhrId not found for subject + # Deprecated: $.subject.identifier.value ${{str(uuid.uuid4())}} 422 EhrId not found for subject 002 Create Pregnancy Status (Invalid/Missing 'resourceType') diff --git a/tests/robot/OBSERVATION/10_create_sofa_score.robot b/tests/robot/OBSERVATION/10_create_sofa_score.robot index 35c81cda1..f5de6af3a 100644 --- a/tests/robot/OBSERVATION/10_create_sofa_score.robot +++ b/tests/robot/OBSERVATION/10_create_sofa_score.robot @@ -55,7 +55,7 @@ ${randinteger} ${12345} # invalid cases for value $.subject.identifier.value missing 422 - $.subject.identifier.value foobar 422 + # Deprecated: $.subject.identifier.value foobar 422 $.subject.identifier.value ${EMPTY} 422 $.subject.identifier.value ${{ [] }} 422 $.subject.identifier.value ${{ {} }} 422 @@ -83,7 +83,7 @@ ${randinteger} ${12345} $.subject ${123} 422 # comment: random uuid - $.subject.identifier.value ${{str(uuid.uuid4())}} 422 + # Deprecated: $.subject.identifier.value ${{str(uuid.uuid4())}} 422 002 Create Sofa Score (Invalid/Missing 'resourceType') diff --git a/tests/robot/OBSERVATION/11_create-clinical-frailty-scale-score.robot b/tests/robot/OBSERVATION/11_create-clinical-frailty-scale-score.robot index 122e472a8..247a27747 100644 --- a/tests/robot/OBSERVATION/11_create-clinical-frailty-scale-score.robot +++ b/tests/robot/OBSERVATION/11_create-clinical-frailty-scale-score.robot @@ -58,7 +58,7 @@ ${vCC_URL} https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/frailty # invalid cases for value $.subject.identifier.value missing 422 Subject identifier is required - $.subject.identifier.value foobar 422 EhrId not found for subject 'foobar' + # Deprecated: $.subject.identifier.value foobar 422 EhrId not found for subject 'foobar' $.subject.identifier.value ${EMPTY} 422 @value cannot be empty Observation.subject.identifier.value $.subject.identifier.value ${{ [] }} 422 This property must be an simple value, not an array Observation.subject.identifier.value $.subject.identifier.value ${{ {} }} 422 This property must be an simple value, not an object Observation.subject.identifier.value @@ -86,7 +86,7 @@ ${vCC_URL} https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/frailty $.subject ${123} 422 The property subject must be an Object, not a primitive property Observation.subject # comment: random uuid regex for uuid - $.subject.identifier.value ${{str(uuid.uuid4())}} 422 EhrId not found for subject '([0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})' + # Deprecated: $.subject.identifier.value ${{str(uuid.uuid4())}} 422 EhrId not found for subject '([0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})' 002 Create Clinical Frailty Scale Score (Invalid/Missing 'resourceType') diff --git a/tests/robot/OBSERVATION/12_create_body_height.robot b/tests/robot/OBSERVATION/12_create_body_height.robot index a84620220..39041a5e6 100644 --- a/tests/robot/OBSERVATION/12_create_body_height.robot +++ b/tests/robot/OBSERVATION/12_create_body_height.robot @@ -51,7 +51,7 @@ ${vQSystem} http://unitsofmeasure.org # invalid cases for value $.subject.identifier.value missing 422 Subject identifier is required - $.subject.identifier.value foobar 422 EhrId not found for subject 'foobar' + # Deprecated: $.subject.identifier.value foobar 422 EhrId not found for subject 'foobar' $.subject.identifier.value ${EMPTY} 422 @value cannot be empty Observation.subject.identifier.value $.subject.identifier.value ${{ [] }} 422 This property must be an simple value, not an array Observation.subject.identifier.value $.subject.identifier.value ${{ {} }} 422 This property must be an simple value, not an object Observation.subject.identifier.value @@ -79,7 +79,7 @@ ${vQSystem} http://unitsofmeasure.org $.subject ${123} 422 The property subject must be an Object, not a primitive property Observation.subject # comment: random uuid regex for uuid - $.subject.identifier.value ${{str(uuid.uuid4())}} 422 EhrId not found for subject + # Deprecated: $.subject.identifier.value ${{str(uuid.uuid4())}} 422 EhrId not found for subject 002 Create Body Height (Invalid/Missing 'resourceType') diff --git a/tests/robot/OBSERVATION/13_create_patient_in_ICU.robot b/tests/robot/OBSERVATION/13_create_patient_in_ICU.robot index 93ddaad31..42e823fd0 100644 --- a/tests/robot/OBSERVATION/13_create_patient_in_ICU.robot +++ b/tests/robot/OBSERVATION/13_create_patient_in_ICU.robot @@ -57,7 +57,7 @@ ${vCC_URL} http://snomed.info/sct # invalid cases for value $.subject.identifier.value missing 422 Subject identifier is required - $.subject.identifier.value foobar 422 EhrId not found for subject 'foobar' + # Deprecated: $.subject.identifier.value foobar 422 EhrId not found for subject 'foobar' $.subject.identifier.value ${EMPTY} 422 @value cannot be empty Observation.subject.identifier.value $.subject.identifier.value ${{ [] }} 422 This property must be an simple value, not an array Observation.subject.identifier.value $.subject.identifier.value ${{ {} }} 422 This property must be an simple value, not an object Observation.subject.identifier.value @@ -85,7 +85,7 @@ ${vCC_URL} http://snomed.info/sct $.subject ${123} 422 The property subject must be an Object, not a primitive property Observation.subject # comment: random uuid regex for uuid - $.subject.identifier.value ${{str(uuid.uuid4())}} 422 EhrId not found for subject '([0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})' + # Deprecated: $.subject.identifier.value ${{str(uuid.uuid4())}} 422 EhrId not found for subject '([0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})' 002 Create Patient in ICU (Invalid/Missing 'resourceType') diff --git a/tests/robot/OBSERVATION/14_create_observation-lab.robot b/tests/robot/OBSERVATION/14_create_observation-lab.robot index 602d0a72f..aafecdb19 100644 --- a/tests/robot/OBSERVATION/14_create_observation-lab.robot +++ b/tests/robot/OBSERVATION/14_create_observation-lab.robot @@ -257,7 +257,7 @@ ${randinteger} ${12345} # CODE # invalid cases for value $.subject.identifier.value missing 422 - $.subject.identifier.value foobar 422 + # Deprecated: $.subject.identifier.value foobar 422 $.subject.identifier.value ${EMPTY} 422 $.subject.identifier.value ${{ [] }} 422 $.subject.identifier.value ${{ {} }} 422 @@ -285,7 +285,7 @@ ${randinteger} ${12345} $.subject ${123} 422 # comment: random uuid - $.subject.identifier.value ${{str(uuid.uuid4())}} 422 + # Deprecated: $.subject.identifier.value ${{str(uuid.uuid4())}} 422 007 Create Observation lab (invalid profile) diff --git a/tests/robot/OBSERVATION/15_create_respiratory_rate.robot b/tests/robot/OBSERVATION/15_create_respiratory_rate.robot index 6a918ff3e..9fc86b377 100644 --- a/tests/robot/OBSERVATION/15_create_respiratory_rate.robot +++ b/tests/robot/OBSERVATION/15_create_respiratory_rate.robot @@ -261,7 +261,7 @@ ${randinteger} ${12345} # CODE # invalid cases for value $.subject.identifier.value missing 422 - $.subject.identifier.value foobar 422 + # Deprecated: $.subject.identifier.value foobar 422 $.subject.identifier.value ${EMPTY} 422 $.subject.identifier.value ${{ [] }} 422 $.subject.identifier.value ${{ {} }} 422 @@ -289,7 +289,7 @@ ${randinteger} ${12345} $.subject ${123} 422 # comment: random uuid - $.subject.identifier.value ${{str(uuid.uuid4())}} 422 + # Deprecated: $.subject.identifier.value ${{str(uuid.uuid4())}} 422 #-------------------------------------------------------------------------------------------------------------------------------------------------------------------- *** Keywords *** diff --git a/tests/robot/OBSERVATION/16_create_oxygen-saturation.robot b/tests/robot/OBSERVATION/16_create_oxygen-saturation.robot index 9d791b1eb..f847cab48 100644 --- a/tests/robot/OBSERVATION/16_create_oxygen-saturation.robot +++ b/tests/robot/OBSERVATION/16_create_oxygen-saturation.robot @@ -262,7 +262,7 @@ ${randinteger} ${12345} # CODE # invalid cases for value $.subject.identifier.value missing 422 - $.subject.identifier.value foobar 422 + # Deprecated: $.subject.identifier.value foobar 422 $.subject.identifier.value ${EMPTY} 422 $.subject.identifier.value ${{ [] }} 422 $.subject.identifier.value ${{ {} }} 422 @@ -290,7 +290,7 @@ ${randinteger} ${12345} $.subject ${123} 422 # comment: random uuid - $.subject.identifier.value ${{str(uuid.uuid4())}} 422 + # Deprecated: $.subject.identifier.value ${{str(uuid.uuid4())}} 422 #-------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/tests/robot/OBSERVATION/17_create_history_of_travel.robot b/tests/robot/OBSERVATION/17_create_history_of_travel.robot index bed081bb9..e4cc12d44 100644 --- a/tests/robot/OBSERVATION/17_create_history_of_travel.robot +++ b/tests/robot/OBSERVATION/17_create_history_of_travel.robot @@ -246,7 +246,7 @@ ${randinteger} ${12345} # CODE # invalid cases for value $.subject.identifier.value missing 422 - $.subject.identifier.value foobar 422 + # Deprecated: $.subject.identifier.value foobar 422 $.subject.identifier.value ${EMPTY} 422 $.subject.identifier.value ${{ [] }} 422 $.subject.identifier.value ${{ {} }} 422 @@ -274,7 +274,7 @@ ${randinteger} ${12345} $.subject ${123} 422 # comment: random uuid - $.subject.identifier.value ${{str(uuid.uuid4())}} 422 + # Deprecated: $.subject.identifier.value ${{str(uuid.uuid4())}} 422 diff --git a/tests/robot/PROCEDURE/02_create_procedure.robot b/tests/robot/PROCEDURE/02_create_procedure.robot index 010afb7ef..3471d50f7 100644 --- a/tests/robot/PROCEDURE/02_create_procedure.robot +++ b/tests/robot/PROCEDURE/02_create_procedure.robot @@ -45,7 +45,7 @@ ${randinteger} ${12345} # CODE # invalid cases for value $.subject.identifier.value missing 422 - $.subject.identifier.value foobar 422 + # Deprecated: $.subject.identifier.value foobar 422 $.subject.identifier.value ${EMPTY} 422 $.subject.identifier.value ${{ [] }} 422 $.subject.identifier.value ${{ {} }} 422 @@ -73,7 +73,7 @@ ${randinteger} ${12345} $.subject ${123} 422 # comment: random uuid - $.subject.identifier.value ${{str(uuid.uuid4())}} 422 + # Deprecated: $.subject.identifier.value ${{str(uuid.uuid4())}} 422 From 7355546ffdc161c206dfbb6028375f07e7ad3a2d Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 22 Jun 2021 11:59:13 +0200 Subject: [PATCH 104/141] Fix issue for Observation --- tests/robot/OBSERVATION/03_create_blood_pressure.robot | 2 +- tests/robot/OBSERVATION/04_create_heart_rate.robot | 4 ++-- tests/robot/OBSERVATION/06_create_body_temperature.robot | 4 ++-- tests/robot/OBSERVATION/07_create_body_weight.robot | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/robot/OBSERVATION/03_create_blood_pressure.robot b/tests/robot/OBSERVATION/03_create_blood_pressure.robot index 93401ea54..e4b907839 100644 --- a/tests/robot/OBSERVATION/03_create_blood_pressure.robot +++ b/tests/robot/OBSERVATION/03_create_blood_pressure.robot @@ -47,7 +47,7 @@ ${profile url} https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefi # FIELD/PATH VALUE ISSUE HTTP ERROR MESSAGE # INDEX CODE $.subject.identifier.value missing 0 422 Subject identifier is required - $.subject.identifier.system missing 0 422 EhrId not found for subject '[0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}' + $.subject.identifier.system missing 0 422 Subject identifier is required # Deprecated: $.subject.identifier.value foobar 0 422 EhrId not found for subject 'foobar' $.subject.identifier.value ${EMPTY} 0 422 @value cannot be empty Observation.subject.identifier.value $.subject.identifier.value ${{ [] }} 0 422 This property must be an simple value, not an array Observation.subject.identifier.value diff --git a/tests/robot/OBSERVATION/04_create_heart_rate.robot b/tests/robot/OBSERVATION/04_create_heart_rate.robot index 297d60c87..a67f87bdd 100644 --- a/tests/robot/OBSERVATION/04_create_heart_rate.robot +++ b/tests/robot/OBSERVATION/04_create_heart_rate.robot @@ -248,9 +248,9 @@ Force Tags observation_create heart-rate create # no subject Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate false valid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Observation.subject: minimum required = 1, but only found 0 https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate: mindestens erforderlich = Observation.subject, aber nur gefunden Observation.subject # invalid reference - Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true test 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 EhrId not found for subject 'test' EhrId not found for subject 'test' + # Deprecated Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true test 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 EhrId not found for subject 'test' EhrId not found for subject 'test' Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true ${12345} 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. - Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true invalid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 EhrId not found for subject EhrId not found for subject + # Deprecated: Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true invalid 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 EhrId not found for subject EhrId not found for subject Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true ${EMPTY} 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 2 All FHIR elements must have a @value All FHIR elements must have a @value Observation heart-rate true https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate final true http://terminology.hl7.org/CodeSystem/v2-0203 Dave https://www.charite.de/fhir/CodeSystem/observation-identifiers 8867-4_HeartRate true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8867-4 Heart rate http://snomed.info/sct abcd Heart rate (observable entity) Heart rate true missing 2020-02-25 true ${88.8} pro Minute http://unitsofmeasure.org /min false 422 0 Subject identifier is required Subject identifier is required diff --git a/tests/robot/OBSERVATION/06_create_body_temperature.robot b/tests/robot/OBSERVATION/06_create_body_temperature.robot index 1f53b6baa..096bc7268 100644 --- a/tests/robot/OBSERVATION/06_create_body_temperature.robot +++ b/tests/robot/OBSERVATION/06_create_body_temperature.robot @@ -248,9 +248,9 @@ Force Tags observation_create body-temperature create # no subject Observation body-temperature true http://hl7.org/fhir/StructureDefinition/bodytemp final true http://terminology.hl7.org/CodeSystem/v2-0203 OBI https://www.charite.de/fhir/CodeSystem/observation-identifiers 8310-5_BodyTemperature true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8310-5 Body Temperature http://snomed.info/sct 386725007 Body Temperature (observable entity) Body Temperature false valid 2020-02-25 true ${37.5} Cel http://unitsofmeasure.org Cel false 422 0 Observation.subject: minimum required = 1, but only found 0 http://hl7.org/fhir/StructureDefinition/bodytemp: mindestens erforderlich = Observation.subject, aber nur gefunden Observation.subject # invalid reference - Observation body-temperature true http://hl7.org/fhir/StructureDefinition/bodytemp final true http://terminology.hl7.org/CodeSystem/v2-0203 OBI https://www.charite.de/fhir/CodeSystem/observation-identifiers 8310-5_BodyTemperature true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8310-5 Body Temperature http://snomed.info/sct 386725007 Body Temperature (observable entity) Body Temperature true test 2020-02-25 true ${37.5} Cel http://unitsofmeasure.org Cel false 422 0 EhrId not found for subject 'test' EhrId not found for subject 'test' + # Deprecated: Observation body-temperature true http://hl7.org/fhir/StructureDefinition/bodytemp final true http://terminology.hl7.org/CodeSystem/v2-0203 OBI https://www.charite.de/fhir/CodeSystem/observation-identifiers 8310-5_BodyTemperature true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8310-5 Body Temperature http://snomed.info/sct 386725007 Body Temperature (observable entity) Body Temperature true test 2020-02-25 true ${37.5} Cel http://unitsofmeasure.org Cel false 422 0 EhrId not found for subject 'test' EhrId not found for subject 'test' Observation body-temperature true http://hl7.org/fhir/StructureDefinition/bodytemp final true http://terminology.hl7.org/CodeSystem/v2-0203 OBI https://www.charite.de/fhir/CodeSystem/observation-identifiers 8310-5_BodyTemperature true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8310-5 Body Temperature http://snomed.info/sct 386725007 Body Temperature (observable entity) Body Temperature true ${12345} 2020-02-25 true ${37.5} Cel http://unitsofmeasure.org Cel false 422 0 Error parsing JSON: the primitive value must be a string Fehler beim Parsen von JSON: Der primitive Wert muss ein String sein. - Observation body-temperature true http://hl7.org/fhir/StructureDefinition/bodytemp final true http://terminology.hl7.org/CodeSystem/v2-0203 OBI https://www.charite.de/fhir/CodeSystem/observation-identifiers 8310-5_BodyTemperature true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8310-5 Body Temperature http://snomed.info/sct 386725007 Body Temperature (observable entity) Body Temperature true invalid 2020-02-25 true ${37.5} Cel http://unitsofmeasure.org Cel false 422 0 EhrId not found for subject EhrId not found for subject + # Deprecated: Observation body-temperature true http://hl7.org/fhir/StructureDefinition/bodytemp final true http://terminology.hl7.org/CodeSystem/v2-0203 OBI https://www.charite.de/fhir/CodeSystem/observation-identifiers 8310-5_BodyTemperature true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8310-5 Body Temperature http://snomed.info/sct 386725007 Body Temperature (observable entity) Body Temperature true invalid 2020-02-25 true ${37.5} Cel http://unitsofmeasure.org Cel false 422 0 EhrId not found for subject EhrId not found for subject Observation body-temperature true http://hl7.org/fhir/StructureDefinition/bodytemp final true http://terminology.hl7.org/CodeSystem/v2-0203 OBI https://www.charite.de/fhir/CodeSystem/observation-identifiers 8310-5_BodyTemperature true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8310-5 Body Temperature http://snomed.info/sct 386725007 Body Temperature (observable entity) Body Temperature true ${EMPTY} 2020-02-25 true ${37.5} Cel http://unitsofmeasure.org Cel false 422 2 All FHIR elements must have a @value All FHIR elements must have a @value Observation body-temperature true http://hl7.org/fhir/StructureDefinition/bodytemp final true http://terminology.hl7.org/CodeSystem/v2-0203 OBI https://www.charite.de/fhir/CodeSystem/observation-identifiers 8310-5_BodyTemperature true Organization/Charité true true http://terminology.hl7.org/CodeSystem/observation-category vital-signs true true http://loinc.org 8310-5 Body Temperature http://snomed.info/sct 386725007 Body Temperature (observable entity) Body Temperature true missing 2020-02-25 true ${37.5} Cel http://unitsofmeasure.org Cel false 422 0 Subject identifier is required Subject identifier is required diff --git a/tests/robot/OBSERVATION/07_create_body_weight.robot b/tests/robot/OBSERVATION/07_create_body_weight.robot index 5263f128a..c68a6f21a 100644 --- a/tests/robot/OBSERVATION/07_create_body_weight.robot +++ b/tests/robot/OBSERVATION/07_create_body_weight.robot @@ -47,7 +47,7 @@ ${body_weight_url} https://www.netzwerk-universitaetsmedizin.de/fhir/Structure # HTTP # FIELD/PATH VALUE CODE ERROR MESSAGE $.subject.identifier.value missing 422 Subject identifier is required - $.subject.identifier.system missing 422 EhrId not found for subject + $.subject.identifier.system missing 422 Subject identifier is required # Deprecated: $.subject.identifier.value foobar 422 EhrId not found for subject 'foobar' $.subject.identifier.value ${EMPTY} 422 @value cannot be empty Observation.subject.identifier.value $.subject.identifier.value ${{ [] }} 422 This property must be an simple value, not an array Observation.subject.identifier.value From 106c4fa3974379c1d996e8b9a01fc440f965cdec Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 22 Jun 2021 13:15:11 +0200 Subject: [PATCH 105/141] SonarCloud + Bundle tests using RobotFramework --- .../camel/processor/EhrIdLookupProcessor.java | 9 +++-- .../validator/AbstractBundleValidator.java | 37 +++++++++---------- .../fhirbridge/fhir/support/Resources.java | 5 ++- .../BUNDLE/02_create_blood_gas_panel.robot | 36 +++++++++--------- 4 files changed, 45 insertions(+), 42 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrIdLookupProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrIdLookupProcessor.java index a7cc2f3c7..47dbc2acb 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrIdLookupProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrIdLookupProcessor.java @@ -18,7 +18,6 @@ import org.ehrbase.fhirbridge.fhir.support.Resources; import org.hl7.fhir.r4.model.Identifier; import org.hl7.fhir.r4.model.Patient; -import org.hl7.fhir.r4.model.QuestionnaireResponse; import org.hl7.fhir.r4.model.Reference; import org.hl7.fhir.r4.model.Resource; import org.springframework.context.MessageSource; @@ -56,13 +55,13 @@ public void process(Exchange exchange) throws Exception { Identifier identifier; if (Resources.isPatient(resource)) { identifier = handlePatientIdentifier((Patient) resource); - } else if (Resources.isQuestionnaireResponse(resource) && Resources.isCovid19Questionnaire((QuestionnaireResponse) resource)) { + } else if (Resources.isCovid19Questionnaire(resource)) { identifier = generateRandomIdentifier(); } else { identifier = handleOtherResourceIdentifier(resource); } - if (!identifier.hasSystem() || !identifier.hasValue()) { + if (!isValidIdentifier(identifier)) { throw new UnprocessableEntityException(messages.getMessage("validation.subject.identifierRequired")); } @@ -123,6 +122,10 @@ private UUID createEhr(Identifier identifier) { return openEhrClient.ehrEndpoint().createEhr(ehrStatus); } + private boolean isValidIdentifier(Identifier identifier) { + return identifier.hasValue() && identifier.hasSystem(); + } + @Override public void setMessageSource(@NonNull MessageSource messageSource) { this.messages = new MessageSourceAccessor(messageSource); diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java b/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java index baf0706b7..17ba395da 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java @@ -4,9 +4,7 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.ehrbase.fhirbridge.fhir.support.Resources; import org.hl7.fhir.r4.model.Bundle; -import org.hl7.fhir.r4.model.Identifier; import org.hl7.fhir.r4.model.Observation; -import org.hl7.fhir.r4.model.Reference; import org.hl7.fhir.r4.model.Resource; import org.openehealth.ipf.commons.ihe.fhir.FhirTransactionValidator; @@ -15,7 +13,6 @@ import java.util.Map; import java.util.Objects; -@SuppressWarnings("java:S6212") public abstract class AbstractBundleValidator implements FhirTransactionValidator { @Override @@ -52,27 +49,29 @@ void setUrlMemberLists(Bundle.BundleEntryComponent entry, MemberValidator member } void validateEqualPatientIds(Bundle bundle) { - List<Identifier> patientIds = new ArrayList<>(); + List<String> patientIds = new ArrayList<>(); for (Bundle.BundleEntryComponent entry : bundle.getEntry()) { - Identifier identifier = Resources.getSubject(entry.getResource()) - .map(Reference::getIdentifier) - .orElseThrow(() -> new UnprocessableEntityException("Ensure that the subject id has the following format : " + - "\"subject\": {\n" + - " \"identifier\": {\n" + - " \"system\": \"urn:ietf:rfc:4122\",\n" + - " \"value\": \"example\"\n" + - " }\n" + - " },")); - - patientIds.add(identifier); + Resources.getSubject(entry.getResource()) + .ifPresent(identifier -> patientIds.add(identifier.getIdentifier().getValue())); } checkPatientIdsIdentical(patientIds); } - private void checkPatientIdsIdentical(List<Identifier> patientIds) { - for (Identifier id : patientIds) { - if (!id.getValue().equals(patientIds.get(0).getValue())) { - throw new InternalErrorException("subject.reference ids all have to be equal! A Fhir Bridge Bundle cannot reference to different Patients !"); + private void checkPatientIdsIdentical(List<String> patientIds) { + for (String id : patientIds) { + try { + if (!id.equals(patientIds.get(0))) { + throw new InternalErrorException("subject.reference ids all have to be equal! A Fhir Bridge Bundle cannot reference to different Patients !"); + } + } catch (NullPointerException nullPointerException) { + throw new UnprocessableEntityException("Ensure that the subject id has the following format : " + + "\"subject\": {\n" + + " \"identifier\": {\n" + + " \"system\": \"urn:ietf:rfc:4122\",\n" + + " \"value\": \"example\"\n" + + " }\n" + + " },"); + } } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java index 4b9929d91..f57ffd49e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java @@ -42,8 +42,9 @@ public static boolean isQuestionnaireResponse(Resource resource) { return resource != null && resource.getResourceType() == ResourceType.QuestionnaireResponse; } - public static boolean isCovid19Questionnaire(QuestionnaireResponse questionnaireResponse) { - return questionnaireResponse != null && StringUtils.contains(questionnaireResponse.getQuestionnaire(), COVID_19_QUESTIONNAIRE_URL); + public static boolean isCovid19Questionnaire(Resource resource) { + return isQuestionnaireResponse(resource) && + StringUtils.contains(((QuestionnaireResponse) resource).getQuestionnaire(), COVID_19_QUESTIONNAIRE_URL); } public static Optional<Reference> getSubject(Resource resource) { diff --git a/tests/robot/BUNDLE/02_create_blood_gas_panel.robot b/tests/robot/BUNDLE/02_create_blood_gas_panel.robot index 2880d7f31..8f187e807 100644 --- a/tests/robot/BUNDLE/02_create_blood_gas_panel.robot +++ b/tests/robot/BUNDLE/02_create_blood_gas_panel.robot @@ -177,30 +177,30 @@ ${randinteger} ${12345} # FIELD/PATH VALUE HTTP # CODE # invalid cases for value - $.entry.resource.subject.identifier.value ${EMPTY} 422 - $.entry.resource.subject.identifier.value ${{ [] }} 422 - $.entry.resource.subject.identifier.value ${{ {} }} 422 - $.entry.resource.subject.identifier.value ${123} 422 + $.entry[0].resource.subject.identifier.value ${EMPTY} 422 + $.entry[0].resource.subject.identifier.value ${{ [] }} 422 + $.entry[0].resource.subject.identifier.value ${{ {} }} 422 + $.entry[0].resource.subject.identifier.value ${123} 422 # invalid cases for system - $.entry.resource.subject.identifier.system foobar 422 - $.entry.resource.subject.identifier.system ${EMPTY} 422 - $.entry.resource.subject.identifier.system ${{ [] }} 422 - $.entry.resource.subject.identifier.system ${{ {} }} 422 - $.entry.resource.subject.identifier.system ${123} 422 + $.entry[0].resource.subject.identifier.system foobar 422 + $.entry[0].resource.subject.identifier.system ${EMPTY} 422 + $.entry[0].resource.subject.identifier.system ${{ [] }} 422 + $.entry[0].resource.subject.identifier.system ${{ {} }} 422 + $.entry[0].resource.subject.identifier.system ${123} 422 # invalid cases for identifier - $.entry.resource.subject.identifier missing 422 - $.entry.resource.subject.identifier ${EMPTY} 422 - $.entry.resource.subject.identifier ${{ [] }} 422 - $.entry.resource.subject.identifier ${{ {} }} 422 - $.entry.resource.subject.identifier ${123} 422 + $.entry[0].resource.subject.identifier missing 422 + $.entry[0].resource.subject.identifier ${EMPTY} 422 + $.entry[0].resource.subject.identifier ${{ [] }} 422 + $.entry[0].resource.subject.identifier ${{ {} }} 422 + $.entry[0].resource.subject.identifier ${123} 422 # invalid cases for subject - $.entry.resource.subject ${EMPTY} 422 - $.entry.resource.subject ${{ [] }} 422 - $.entry.resource.subject ${{ {} }} 422 - $.entry.resource.subject ${123} 422 + $.entry[0].resource.subject ${EMPTY} 422 + $.entry[0].resource.subject ${{ [] }} 422 + $.entry[0].resource.subject ${{ {} }} 422 + $.entry[0].resource.subject ${123} 422 From a05a1529ce24a6f2c130809bfca08e34856c4bb6 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 22 Jun 2021 14:03:48 +0200 Subject: [PATCH 106/141] Revert back to original validation order --- .../validator/AbstractBundleValidator.java | 44 +++++++++---------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java b/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java index 17ba395da..e9cf0794e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java @@ -2,17 +2,19 @@ import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import org.apache.commons.lang3.StringUtils; import org.ehrbase.fhirbridge.fhir.support.Resources; import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.Identifier; import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.r4.model.Reference; import org.hl7.fhir.r4.model.Resource; import org.openehealth.ipf.commons.ihe.fhir.FhirTransactionValidator; -import java.util.ArrayList; -import java.util.List; import java.util.Map; import java.util.Objects; +@SuppressWarnings("java:S6212") public abstract class AbstractBundleValidator implements FhirTransactionValidator { @Override @@ -49,29 +51,23 @@ void setUrlMemberLists(Bundle.BundleEntryComponent entry, MemberValidator member } void validateEqualPatientIds(Bundle bundle) { - List<String> patientIds = new ArrayList<>(); - for (Bundle.BundleEntryComponent entry : bundle.getEntry()) { - Resources.getSubject(entry.getResource()) - .ifPresent(identifier -> patientIds.add(identifier.getIdentifier().getValue())); - } - checkPatientIdsIdentical(patientIds); - } - - private void checkPatientIdsIdentical(List<String> patientIds) { - for (String id : patientIds) { - try { - if (!id.equals(patientIds.get(0))) { - throw new InternalErrorException("subject.reference ids all have to be equal! A Fhir Bridge Bundle cannot reference to different Patients !"); - } - } catch (NullPointerException nullPointerException) { - throw new UnprocessableEntityException("Ensure that the subject id has the following format : " + - "\"subject\": {\n" + - " \"identifier\": {\n" + - " \"system\": \"urn:ietf:rfc:4122\",\n" + - " \"value\": \"example\"\n" + - " }\n" + - " },"); + Identifier subject = null; + for (Bundle.BundleEntryComponent entry : bundle.getEntry()) { + Identifier current = Resources.getSubject(entry.getResource()) + .map(Reference::getIdentifier) + .orElseThrow(() -> new UnprocessableEntityException("Ensure that the subject id has the following format : " + + "\"subject\": {\n" + + " \"identifier\": {\n" + + " \"system\": \"urn:ietf:rfc:4122\",\n" + + " \"value\": \"example\"\n" + + " }\n" + + " },")); + + if (subject == null) { + subject = current; + } else if (!StringUtils.equals(subject.getValue(), current.getValue())) { + throw new InternalErrorException("subject.reference ids all have to be equal! A Fhir Bridge Bundle cannot reference to different Patients !"); } } } From 38c9a7623948000ea3ebf9353937bb7608dc4803 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Thu, 24 Jun 2021 09:20:01 +0200 Subject: [PATCH 107/141] Minor change based on @SevKohler comment --- .../fhir/bundle/validator/AbstractBundleValidator.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java b/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java index e9cf0794e..7a76d973b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/AbstractBundleValidator.java @@ -13,6 +13,7 @@ import java.util.Map; import java.util.Objects; +import java.util.Optional; @SuppressWarnings("java:S6212") public abstract class AbstractBundleValidator implements FhirTransactionValidator { @@ -51,7 +52,7 @@ void setUrlMemberLists(Bundle.BundleEntryComponent entry, MemberValidator member } void validateEqualPatientIds(Bundle bundle) { - Identifier subject = null; + Optional<Identifier> subject = Optional.empty(); for (Bundle.BundleEntryComponent entry : bundle.getEntry()) { Identifier current = Resources.getSubject(entry.getResource()) @@ -64,11 +65,11 @@ void validateEqualPatientIds(Bundle bundle) { " }\n" + " },")); - if (subject == null) { - subject = current; - } else if (!StringUtils.equals(subject.getValue(), current.getValue())) { + if (subject.isPresent() && !StringUtils.equals(subject.get().getValue(), current.getValue())) { throw new InternalErrorException("subject.reference ids all have to be equal! A Fhir Bridge Bundle cannot reference to different Patients !"); } + + subject = Optional.of(current); } } From 685be82bf216623423bf7e7c2544210822f00162 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Mon, 28 Jun 2021 19:07:52 +0200 Subject: [PATCH 108/141] Implements OAuth2 authentication with EHRbase --- .../fhir-bridge.postman_collection.json | 299 ++- docker/docker-compose-oauth2.yml | 46 + docker/keycloak/ehrbase-realm.json | 2232 +++++++++++++++++ .../config/ehrbase/AccessTokenResponse.java | 76 + .../config/ehrbase/AccessTokenService.java | 77 + .../config/ehrbase/EhrbaseConfiguration.java | 37 +- .../config/ehrbase/EhrbaseProperties.java | 99 +- .../ehrbase/EhrbaseTemplateInitializer.java | 14 +- .../TokenAuthenticationInterceptor.java | 45 + src/main/resources/application.yml | 13 +- 10 files changed, 2822 insertions(+), 116 deletions(-) create mode 100644 docker/docker-compose-oauth2.yml create mode 100644 docker/keycloak/ehrbase-realm.json create mode 100644 src/main/java/org/ehrbase/fhirbridge/config/ehrbase/AccessTokenResponse.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/config/ehrbase/AccessTokenService.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/config/ehrbase/TokenAuthenticationInterceptor.java diff --git a/config/postman/fhir-bridge.postman_collection.json b/config/postman/fhir-bridge.postman_collection.json index ab974a839..1db8ac2e4 100644 --- a/config/postman/fhir-bridge.postman_collection.json +++ b/config/postman/fhir-bridge.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "4a3b60bc-e061-4b50-80a7-67bca2a95dcb", + "_postman_id": "758479b8-b438-4a2a-a129-c12ee29d8d51", "name": "fhir-bridge", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, @@ -195,7 +195,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Bundle\",\r\n \"id\": \"bundle-transaction-bga\",\r\n \"meta\": {\r\n \"lastUpdated\": \"2020-09-24T05:33:00Z\"\r\n },\r\n \"type\": \"transaction\",\r\n \"entry\": [\r\n {\r\n \"fullUrl\": \"urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f0a\",\r\n \"resource\": {\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-gas-panel\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\r\n \"value\": \"24336-0_gasPanelBldA\",\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"26436-6\"\r\n },\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"laboratory\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"24336-0\",\r\n \"display\": \"Gas panel (BldA)\"\r\n }\r\n ],\r\n \"text\": \"Gas panel - Arterial blood\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-09-21\",\r\n \"hasMember\": [\r\n {\r\n \"reference\": \"urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f01\"\r\n },\r\n {\r\n \"reference\": \"urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f02\"\r\n },\r\n {\r\n \"reference\": \"urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f03\"\r\n },\r\n {\r\n \"reference\": \"urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f04\"\r\n }\r\n ]\r\n },\r\n \"request\": {\r\n \"method\": \"POST\",\r\n \"url\": \"Observation\"\r\n }\r\n },\r\n {\r\n \"fullUrl\": \"urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f01\",\r\n \"resource\": {\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pH\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\r\n \"value\": \"2744-1_pH\",\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"26436-6\"\r\n },\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"laboratory\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"2744-1\",\r\n \"display\": \"pH (BldA)\"\r\n }\r\n ],\r\n \"text\": \"pH of Arterial blood\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-09-21\",\r\n \"valueQuantity\": {\r\n \"value\": 7.4,\r\n \"unit\": \"pH\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"[pH]\"\r\n }\r\n },\r\n \"request\": {\r\n \"method\": \"POST\",\r\n \"url\": \"Observation\"\r\n }\r\n },\r\n {\r\n \"fullUrl\": \"urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f02\",\r\n \"resource\": {\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/carbon-dioxide-partial-pressure\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\r\n \"value\": \"2019-8_paCO2\",\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"26436-6\"\r\n },\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"laboratory\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"2019-8\",\r\n \"display\": \"CO2 (BldA) [Partial pressure]\"\r\n }\r\n ],\r\n \"text\": \"Carbon dioxide [Partial pressure] in Arterial blood\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-09-21\",\r\n \"valueQuantity\": {\r\n \"value\": 44,\r\n \"unit\": \"mmHg\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"mm[Hg]\"\r\n }\r\n },\r\n \"request\": {\r\n \"method\": \"POST\",\r\n \"url\": \"Observation\"\r\n }\r\n },\r\n {\r\n \"fullUrl\": \"urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f03\",\r\n \"resource\": {\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/oxygen-partial-pressure\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\r\n \"value\": \"2703-7_paO2\",\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"26436-6\"\r\n },\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"laboratory\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"2703-7\",\r\n \"display\": \"Oxygen (BldA) [Partial pressure]\"\r\n }\r\n ],\r\n \"text\": \"Oxygen [Partial pressure] in Arterial blood\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-09-21\",\r\n \"valueQuantity\": {\r\n \"value\": 67,\r\n \"unit\": \"mmHg\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"mm[Hg]\"\r\n }\r\n },\r\n \"request\": {\r\n \"method\": \"POST\",\r\n \"url\": \"Observation\"\r\n }\r\n },\r\n {\r\n \"fullUrl\": \"urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f04\",\r\n \"resource\": {\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/oxygen-saturation\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"OBI\"\r\n }\r\n ]\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\r\n \"value\": \"2708-6_oxygenSaturation\",\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n }\r\n }\r\n ],\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"2708-6\",\r\n \"display\": \"Oxygen saturation in Arterial blood\"\r\n }\r\n ],\r\n \"text\": \"Oxygen saturation in Arterial blood\"\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-09-21\",\r\n \"valueQuantity\": {\r\n \"value\": 98,\r\n \"unit\": \"%\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"%\"\r\n }\r\n },\r\n \"request\": {\r\n \"method\": \"POST\",\r\n \"url\": \"Observation\"\r\n }\r\n }\r\n ]\r\n}", + "raw": "{\r\n \"entry\": [\r\n {\r\n \"fullUrl\": \"urn:uuid:04121321-4af5-424c-a0e1-ed3aab1c349d\",\r\n \"request\": {\r\n \"method\": \"POST\",\r\n \"url\": \"Observation\"\r\n },\r\n \"resource\": {\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"code\": \"26436-6\",\r\n \"system\": \"http://loinc.org\"\r\n },\r\n {\r\n \"code\": \"laboratory\",\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"24336-0\",\r\n \"display\": \"Gas panel (BldA)\",\r\n \"system\": \"http://loinc.org\"\r\n }\r\n ],\r\n \"text\": \"Gas panel - Arterial blood\"\r\n },\r\n \"effectiveDateTime\": \"2020-09-21\",\r\n \"hasMember\": [\r\n {\r\n \"reference\": \"urn:uuid:04121321-4af5-424c-a0e1-ed3aab1casd1\"\r\n },\r\n {\r\n \"reference\": \"urn:uuid:04121321-4af5-424c-a0e1-ed3aab1casd2\"\r\n },\r\n {\r\n \"reference\": \"urn:uuid:04121321-4af5-424c-a0e1-ed3aab1casd3\"\r\n },\r\n {\r\n \"reference\": \"urn:uuid:04121321-4af5-424c-a0e1-ed3aab1casd4\"\r\n }\r\n ],\r\n \"identifier\": [\r\n {\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"OBI\",\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\"\r\n }\r\n ]\r\n },\r\n \"value\": \"24336-0_gasPanelBldA\"\r\n }\r\n ],\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-gas-panel\"\r\n ]\r\n },\r\n \"resourceType\": \"Observation\",\r\n \"status\": \"final\",\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"4c7d0173-7378-42b2-a9fa-64cd2664674f\"\r\n }\r\n }\r\n }\r\n },\r\n {\r\n \"fullUrl\": \"urn:uuid:04121321-4af5-424c-a0e1-ed3aab1casd1\",\r\n \"request\": {\r\n \"method\": \"POST\",\r\n \"url\": \"Observation\"\r\n },\r\n \"resource\": {\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"code\": \"26436-6\",\r\n \"system\": \"http://loinc.org\"\r\n },\r\n {\r\n \"code\": \"laboratory\",\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"2744-1\",\r\n \"display\": \"pH (BldA)\",\r\n \"system\": \"http://loinc.org\"\r\n }\r\n ],\r\n \"text\": \"pH of Arterial blood\"\r\n },\r\n \"effectiveDateTime\": \"2020-09-21\",\r\n \"identifier\": [\r\n {\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"OBI\",\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\"\r\n }\r\n ]\r\n },\r\n \"value\": \"2744-1_pH\"\r\n }\r\n ],\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pH\"\r\n ]\r\n },\r\n \"resourceType\": \"Observation\",\r\n \"status\": \"final\",\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"4c7d0173-7378-42b2-a9fa-64cd2664674f\"\r\n }\r\n },\r\n \"valueQuantity\": {\r\n \"code\": \"[pH]\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"unit\": \"pH\",\r\n \"value\": 7.4\r\n }\r\n }\r\n },\r\n {\r\n \"fullUrl\": \"urn:uuid:04121321-4af5-424c-a0e1-ed3aab1casd2\",\r\n \"request\": {\r\n \"method\": \"POST\",\r\n \"url\": \"Observation\"\r\n },\r\n \"resource\": {\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"code\": \"26436-6\",\r\n \"system\": \"http://loinc.org\"\r\n },\r\n {\r\n \"code\": \"laboratory\",\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"2019-8\",\r\n \"display\": \"CO2 (BldA) [Partial pressure]\",\r\n \"system\": \"http://loinc.org\"\r\n }\r\n ],\r\n \"text\": \"Carbon dioxide [Partial pressure] in Arterial blood\"\r\n },\r\n \"effectiveDateTime\": \"2020-09-21\",\r\n \"identifier\": [\r\n {\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"OBI\",\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\"\r\n }\r\n ]\r\n },\r\n \"value\": \"2019-8_paCO2\"\r\n }\r\n ],\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/carbon-dioxide-partial-pressure\"\r\n ]\r\n },\r\n \"resourceType\": \"Observation\",\r\n \"status\": \"final\",\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"4c7d0173-7378-42b2-a9fa-64cd2664674f\"\r\n }\r\n },\r\n \"valueQuantity\": {\r\n \"code\": \"mm[Hg]\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"unit\": \"mmHg\",\r\n \"value\": 44\r\n }\r\n }\r\n },\r\n {\r\n \"fullUrl\": \"urn:uuid:04121321-4af5-424c-a0e1-ed3aab1casd3\",\r\n \"request\": {\r\n \"method\": \"POST\",\r\n \"url\": \"Observation\"\r\n },\r\n \"resource\": {\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"code\": \"26436-6\",\r\n \"system\": \"http://loinc.org\"\r\n },\r\n {\r\n \"code\": \"laboratory\",\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"2703-7\",\r\n \"display\": \"Oxygen (BldA) [Partial pressure]\",\r\n \"system\": \"http://loinc.org\"\r\n }\r\n ],\r\n \"text\": \"Oxygen [Partial pressure] in Arterial blood\"\r\n },\r\n \"effectiveDateTime\": \"2020-09-21\",\r\n \"identifier\": [\r\n {\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"OBI\",\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\"\r\n }\r\n ]\r\n },\r\n \"value\": \"2703-7_paO2\"\r\n }\r\n ],\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/oxygen-partial-pressure\"\r\n ]\r\n },\r\n \"resourceType\": \"Observation\",\r\n \"status\": \"final\",\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"4c7d0173-7378-42b2-a9fa-64cd2664674f\"\r\n }\r\n },\r\n \"valueQuantity\": {\r\n \"code\": \"mm[Hg]\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"unit\": \"mmHg\",\r\n \"value\": 67\r\n }\r\n }\r\n },\r\n {\r\n \"fullUrl\": \"urn:uuid:04121321-4af5-424c-a0e1-ed3aab1casd4\",\r\n \"request\": {\r\n \"method\": \"POST\",\r\n \"url\": \"Observation\"\r\n },\r\n \"resource\": {\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"code\": \"vital-signs\",\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"2708-6\",\r\n \"display\": \"Oxygen saturation in Arterial blood\",\r\n \"system\": \"http://loinc.org\"\r\n }\r\n ],\r\n \"text\": \"Oxygen saturation in Arterial blood\"\r\n },\r\n \"effectiveDateTime\": \"2020-09-21\",\r\n \"identifier\": [\r\n {\r\n \"assigner\": {\r\n \"reference\": \"Organization/Charité\"\r\n },\r\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"OBI\",\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\"\r\n }\r\n ]\r\n },\r\n \"value\": \"2708-6_oxygenSaturation\"\r\n }\r\n ],\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/oxygen-saturation\"\r\n ]\r\n },\r\n \"resourceType\": \"Observation\",\r\n \"status\": \"final\",\r\n \"subject\": {\r\n \"reference\": \"Patient/123\"\r\n },\r\n \"valueQuantity\": {\r\n \"code\": \"%\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"unit\": \"%\",\r\n \"value\": 98\r\n }\r\n }\r\n }\r\n ],\r\n \"id\": \"bundle-transaction-bga\",\r\n \"meta\": {\r\n \"lastUpdated\": \"2020-09-24T05:33:00Z\"\r\n },\r\n \"resourceType\": \"Bundle\",\r\n \"type\": \"transaction\"\r\n}", "options": { "raw": { "language": "json" @@ -1273,7 +1273,7 @@ "variable": [ { "key": "id", - "value": "2" + "value": "78" } ] } @@ -2091,7 +2091,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"http://hl7.org/fhir/StructureDefinition/bodytemp\"\r\n ]\r\n },\r\n \"status\": \"corrected\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8310-5\"\r\n }\r\n ]\r\n },\r\n \"subject\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\",\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-04-30T12:00:00+01:00\",\r\n \"valueQuantity\": {\r\n \"value\": 37.5,\r\n \"unit\": \"Cel\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"Cel\"\r\n }\r\n}", + "raw": "{\r\n \"resourceType\": \"Observation\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"http://hl7.org/fhir/StructureDefinition/bodytemp\"\r\n ]\r\n },\r\n \"status\": \"final\",\r\n \"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\r\n \"code\": \"vital-signs\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"code\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://loinc.org\",\r\n \"code\": \"8310-5\"\r\n }\r\n ]\r\n },\r\n \"subject\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\",\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"effectiveDateTime\": \"2020-04-30T12:00:00+01:00\",\r\n \"valueQuantity\": {\r\n \"value\": 37.5,\r\n \"unit\": \"Cel\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"Cel\"\r\n }\r\n}", "options": { "raw": { "language": "json" @@ -2531,7 +2531,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Patient\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/Patient\"\r\n ]\r\n },\r\n \"extension\": [\r\n {\r\n \"url\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/ethnic-group\",\r\n \"valueCoding\": {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"186019001\",\r\n \"display\": \"Other ethnic, mixed origin\"\r\n }\r\n },\r\n {\r\n \"extension\": [\r\n {\r\n \"url\": \"dateTimeOfDocumentation\",\r\n \"valueDateTime\": \"2020-10-01\"\r\n },\r\n {\r\n \"url\": \"age\",\r\n \"valueAge\": {\r\n \"value\": 68,\r\n \"unit\": \"years\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"a\"\r\n }\r\n }\r\n ],\r\n \"url\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/age\"\r\n }\r\n ],\r\n \"identifier\": [\r\n {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n ],\r\n \"birthDate\": \"1952-09-30\"\r\n}", + "raw": "{\r\n \"resourceType\": \"Patient\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/Patient\"\r\n ]\r\n },\r\n \"extension\": [\r\n {\r\n \"url\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/ethnic-group\",\r\n \"valueCoding\": {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"186019001\",\r\n \"display\": \"Other ethnic, mixed origin\"\r\n }\r\n },\r\n {\r\n \"extension\": [\r\n {\r\n \"url\": \"dateTimeOfDocumentation\",\r\n \"valueDateTime\": \"2020-10-01\"\r\n },\r\n {\r\n \"url\": \"age\",\r\n \"valueAge\": {\r\n \"value\": 68,\r\n \"unit\": \"years\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"a\"\r\n }\r\n }\r\n ],\r\n \"url\": \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/age\"\r\n }\r\n ],\r\n \"identifier\": [\r\n {\r\n \"system\": \"http://www.netzwerk-universitaetsmedizin.de/sid/crr-pseudonym\",\r\n \"value\": \"codex_6348Q7\"\r\n }\r\n ],\r\n \"birthDate\": \"1952-09-30\"\r\n}", "options": { "raw": { "language": "json" @@ -3494,119 +3494,264 @@ "response": [] } ] - }, + } + ] + }, + { + "name": "EHRbase", + "item": [ { - "name": "Encounter", + "name": "OAuth2", "item": [ { - "name": "Create Stat. Versorgunsfall", + "name": "Create EHR", "request": { "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Encounter\",\r\n \"id\": \"5844e89b-c8f3-4e26-bc0f-502e00293874\",\r\n \"status\": \"finished\",\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"VN\"\r\n }\r\n ]\r\n },\r\n \"system\": \"http://medizininformatik-initiative.de/fhir/NamingSystem/Aufnahmenummer/MusterKrankenhaus\",\r\n \"value\": \"F_0000002\",\r\n \"period\": {\r\n \"start\": \"2021-02-13T03:04:00+01:00\",\r\n \"end\": \"2021-03-01T20:42:00+01:00\"\r\n }\r\n }\r\n ],\r\n \"class\": {\r\n \"code\": \"IMP\",\r\n \"display\": \"stationär\",\r\n \"system\": \"http://hl7.org/fhir/v3/ActCode/cs.html\"\r\n },\r\n \"serviceType\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel\",\r\n \"code\": \"3700\",\r\n \"userSelected\": false\r\n }\r\n ]\r\n },\r\n \"serviceProvider\": {\r\n \"identifier\": {\r\n \"system\": \"http://medizininformatik-initiative.de/fhir/NamingSystem/Einrichtungsidentifikator/MusterKrankenhaus\",\r\n \"value\": \"260123451_MusterKrankenhaus\"\r\n }\r\n },\r\n \"diagnosis\": [\r\n {\r\n \"condition\": {\r\n \"reference\": \"Condition/e6b6895c-549b-47c5-a842-41100761385d\"\r\n }\r\n }\r\n ],\r\n \"hospitalization\": {\r\n \"admitSource\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass\",\r\n \"code\": \"N\"\r\n }\r\n ]\r\n },\r\n \"dischargeDisposition\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund\",\r\n \"code\": \"12\"\r\n }\r\n ]\r\n }\r\n },\r\n \"reasonCode\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund\",\r\n \"code\": \"07\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"period\": {\r\n \"start\": \"2021-02-13T03:04:00+01:00\",\r\n \"end\": \"2021-03-01T20:42:00+01:00\"\r\n }\r\n}" + "raw": "{\r\n \"_type\": \"EHR_STATUS\",\r\n \"name\": {\r\n \"_type\": \"DV_TEXT\",\r\n \"value\": \"EHR Status\"\r\n },\r\n \"subject\": {\r\n \"external_ref\": {\r\n\t\t\t\t\"namespace\": \"DEMOGRAPHIC\",\r\n\t\t\t\t\"type\": \"PERSON\",\r\n\t\t\t\t\"id\": {\r\n\t\t\t\t\t\"_type\": \"HIER_OBJECT_ID\",\r\n\t\t\t\t\t\"value\": \"codex_6348Q7\"\r\n\t\t\t\t}\r\n\t\t\t}\r\n },\r\n \"archetype_node_id\": \"openEHR-EHR-EHR_STATUS.generic.v1\",\r\n \"uid\": {\r\n \"_type\": \"HIER_OBJECT_ID\",\r\n \"value\": \"8e2abf44-ad74-47eb-ab53-79ec8cd0fd16::local.ehrbase.org::1\"\r\n },\r\n \"is_modifiable\": true,\r\n \"is_queryable\": true\r\n}", + "options": { + "raw": { + "language": "json" + } + } }, "url": { - "raw": "{{baseUrl}}/fhir/Encounter", + "raw": "http://localhost:8080/ehrbase/rest/openehr/v1/ehr", + "protocol": "http", "host": [ - "{{baseUrl}}" + "localhost" ], + "port": "8080", "path": [ - "fhir", - "Encounter" + "ehrbase", + "rest", + "openehr", + "v1", + "ehr" ] } }, "response": [] }, { - "name": "Create Patienten Aufenthalt", + "name": "AQL Query", "request": { "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"resourceType\": \"Encounter\",\r\n \"id\": \"28436186-b5b3-4881-b000-8a89abf659b7\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/StructureDefinition/KontaktGesundheitseinrichtung\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"VN\"\r\n }\r\n ]\r\n },\r\n \"system\": \"http://medizininformatik-initiative.de/fhir/NamingSystem/Aufnahmenummer/MusterKrankenhaus\",\r\n \"value\": \"F_0000001\",\r\n \"period\": {\r\n \"start\": \"2021-02-13T03:04:00+01:00\",\r\n \"end\": \"2021-03-01T20:42:00+01:00\"\r\n }\r\n }\r\n ],\r\n \"status\": \"finished\",\r\n \"class\": {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/CodeSystem/EncounterClassAdditionsDE\",\r\n \"code\": \"operation\",\r\n \"display\": \"Operation\"\r\n },\r\n \"type\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Kontaktebene\",\r\n \"code\": \"abteilungskontakt\",\r\n \"display\": \"Abteilungskontakt\",\r\n \"userSelected\": false\r\n }\r\n ]\r\n }\r\n ],\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"diagnosis\": [\r\n {\r\n \"condition\": {\r\n \"reference\": \"Condition/e6b6895c-549b-47c5-a842-41100761385d\"\r\n }\r\n }\r\n ],\r\n \"period\": {\r\n \"start\": \"2021-02-13T03:04:00+01:00\",\r\n \"end\": \"2021-03-01T20:42:00+01:00\"\r\n },\r\n \"reasonCode\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund\",\r\n \"code\": \"01\",\r\n \"display\": \"Krankenhausbehandlung, vollstationär\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"hospitalization\": {\r\n \"admitSource\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass\",\r\n \"code\": \"E\",\r\n \"display\": \"Einweisung durch einen Arzt\"\r\n }\r\n ]\r\n },\r\n \"dischargeDisposition\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund\",\r\n \"code\": \"019\",\r\n \"display\": \"Behandlung regulär beendet, arbeitsfähig entlassen\"\r\n }\r\n ]\r\n }\r\n },\r\n \"location\": [\r\n {\r\n \"location\": {\r\n \"reference\": \"Location/FD7DF5FD052E1CBCF7F41B12804D596C71FFBE1958B58EF06401DD781B2A53D3\"\r\n },\r\n \"status\": \"active\",\r\n \"physicalType\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.hl7.org/fhir/valueset-location-physical-type.html\",\r\n \"code\": \"bd\",\r\n \"userSelected\": false\r\n }\r\n ],\r\n \"text\": \"Bett\"\r\n },\r\n \"period\": {\r\n \"start\": \"2021-02-13T03:04:00+01:00\",\r\n \"end\": \"2021-03-01T20:42:00+01:00\"\r\n }\r\n }\r\n ],\r\n \"serviceType\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel\",\r\n \"code\": \"3700\",\r\n \"userSelected\": false\r\n }\r\n ]\r\n },\r\n \"serviceProvider\": {\r\n \"identifier\": {\r\n \"system\": \"http://medizininformatik-initiative.de/fhir/NamingSystem/Abteilungsidentifikator/MusterKrankenhaus\",\r\n \"value\": \"1500_ACHI\"\r\n }\r\n }\r\n}" + "raw": "{\r\n \"q\": \"SELECT c FROM EHR e CONTAINS COMPOSITION c WHERE e/ehr_status/subject/external_ref/id/value = '{{patientId}}'\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } }, "url": { - "raw": "{{baseUrl}}/fhir/Encounter", + "raw": "http://localhost:8080/ehrbase/rest/openehr/v1/query/aql", + "protocol": "http", "host": [ - "{{baseUrl}}" + "localhost" ], + "port": "8080", "path": [ - "fhir", - "Encounter" + "ehrbase", + "rest", + "openehr", + "v1", + "query", + "aql" ] } }, "response": [] } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{access_token}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "var clientId = pm.environment.get(\"clientId\");", + "var clientSecret = pm.environment.get(\"clientSecret\");", + "var tokenUrl = pm.environment.get(\"tokenUrl\");", + "", + "var details = {", + " \"grant_type\": \"client_credentials\"", + "}", + "", + "var formBody = [];", + "for (var property in details) {", + " var encodedKey = encodeURIComponent(property);", + " var encodedValue = encodeURIComponent(details[property]);", + " formBody.push(encodedKey + \"=\" + encodedValue);", + "}", + "", + "formBody = formBody.join(\"&\");", + "", + "pm.sendRequest({", + " url: tokenUrl,", + " method: 'POST',", + " header: {", + " 'Content-Type': 'application/x-www-form-urlencoded',", + " 'Authorization': 'Basic ' + btoa(clientId + \":\" + clientSecret)", + " },", + " body: formBody", + "}, function (err, response) {", + " const json = response.json();", + " pm.environment.set(\"access_token\", json.access_token);", + "}); " + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + } ] - } - ] - }, - { - "name": "EHRbase", - "item": [ + }, { - "name": "Create EHR", - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "myPassword432", - "type": "string" + "name": "Basic", + "item": [ + { + "name": "Create EHR", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"_type\": \"EHR_STATUS\",\r\n \"name\": {\r\n \"_type\": \"DV_TEXT\",\r\n \"value\": \"EHR Status\"\r\n },\r\n \"subject\": {\r\n \"external_ref\": {\r\n\t\t\t\t\"namespace\": \"DEMOGRAPHIC\",\r\n\t\t\t\t\"type\": \"PERSON\",\r\n\t\t\t\t\"id\": {\r\n\t\t\t\t\t\"_type\": \"HIER_OBJECT_ID\",\r\n\t\t\t\t\t\"value\": \"codex_6348Q7\"\r\n\t\t\t\t}\r\n\t\t\t}\r\n },\r\n \"archetype_node_id\": \"openEHR-EHR-EHR_STATUS.generic.v1\",\r\n \"uid\": {\r\n \"_type\": \"HIER_OBJECT_ID\",\r\n \"value\": \"8e2abf44-ad74-47eb-ab53-79ec8cd0fd16::local.ehrbase.org::1\"\r\n },\r\n \"is_modifiable\": true,\r\n \"is_queryable\": true\r\n}", + "options": { + "raw": { + "language": "json" + } + } }, - { - "key": "username", - "value": "myuser", - "type": "string" + "url": { + "raw": "http://localhost:8080/ehrbase/rest/openehr/v1/ehr", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "ehrbase", + "rest", + "openehr", + "v1", + "ehr" + ] } - ] + }, + "response": [] }, - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"_type\": \"EHR_STATUS\",\r\n \"name\": {\r\n \"_type\": \"DV_TEXT\",\r\n \"value\": \"EHR Status\"\r\n },\r\n \"subject\": {\r\n \"_type\": \"PARTY_SELF\",\r\n\t\t\t\"external_ref\": {\r\n\t\t\t\t\"namespace\": \"DEMOGRAPHIC\",\r\n\t\t\t\t\"type\": \"PERSON\",\r\n\t\t\t\t\"id\": {\r\n\t\t\t\t\t\"_type\": \"HIER_OBJECT_ID\",\r\n\t\t\t\t\t\"value\": \"{{patientId}}\"\r\n\t\t\t\t}\r\n\t\t\t}\r\n },\r\n \"archetype_node_id\": \"openEHR-EHR-EHR_STATUS.generic.v1\",\r\n \"uid\": {\r\n \"_type\": \"HIER_OBJECT_ID\",\r\n \"value\": \"8e2abf44-ad74-47eb-ab53-79ec8cd0fd16::local.ehrbase.org::1\"\r\n },\r\n \"is_modifiable\": true,\r\n \"is_queryable\": true\r\n}", - "options": { - "raw": { - "language": "json" + { + "name": "AQL Query", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"q\": \"SELECT c FROM EHR e CONTAINS COMPOSITION c WHERE e/ehr_status/subject/external_ref/id/value = '{{patientId}}'\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://localhost:8080/ehrbase/rest/openehr/v1/query/aql", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "ehrbase", + "rest", + "openehr", + "v1", + "query", + "aql" + ] } + }, + "response": [] + } + ], + "auth": { + "type": "basic", + "basic": [ + { + "key": "password", + "value": "myPassword432", + "type": "string" + }, + { + "key": "username", + "value": "myuser", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] } }, - "url": { - "raw": "http://localhost:8080/ehrbase/rest/openehr/v1/ehr", - "protocol": "http", - "host": [ - "localhost" - ], - "port": "8080", - "path": [ - "ehrbase", - "rest", - "openehr", - "v1", - "ehr" - ] + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } } - }, - "response": [] + ] + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } } ] }, diff --git a/docker/docker-compose-oauth2.yml b/docker/docker-compose-oauth2.yml new file mode 100644 index 000000000..e25644f1a --- /dev/null +++ b/docker/docker-compose-oauth2.yml @@ -0,0 +1,46 @@ +version: '3' +services: + keycloak: + image: jboss/keycloak + ports: + - 8081:8080 + environment: + KEYCLOAK_USER: admin + KEYCLOAK_PASSWORD: admin + KEYCLOAK_IMPORT: /tmp/ehrbase-realm.json + DB_VENDOR: H2 + volumes: + - ./keycloak/ehrbase-realm.json:/tmp/ehrbase-realm.json + networks: + - ehrbase-network + ehrbase-db: + image: ehrbase/ehrbase-postgres:latest + ports: + - 5432:5432 + networks: + - ehrbase-network + environment: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + EHRBASE_USER: ehrbase + EHRBASE_PASSWORD: ehrbase +# ehrbase: +# image: ehrbase/ehrbase:next +# ports: +# - 8080:8080 +# networks: +# - ehrbase-network +# environment: +# DB_URL: jdbc:postgresql://ehrbase-db:5432/ehrbase +# DB_USER: ehrbase +# DB_PASS: ehrbase +# SECURITY_AUTHTYPE: OAUTH +# SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUERURI: http://keycloak:8080/auth/realms/ehrbase +# SYSTEM_NAME: local.ehrbase.org +# ADMIN_API_ACTIVE: 'true' +# depends_on: +# - keycloak +# - ehrbase-db +# restart: on-failure +networks: + ehrbase-network: { } diff --git a/docker/keycloak/ehrbase-realm.json b/docker/keycloak/ehrbase-realm.json new file mode 100644 index 000000000..d34705825 --- /dev/null +++ b/docker/keycloak/ehrbase-realm.json @@ -0,0 +1,2232 @@ +{ + "id": "ehrbase", + "realm": "ehrbase", + "displayName": "EHRbase", + "notBefore": 0, + "defaultSignatureAlgorithm": "RS256", + "revokeRefreshToken": false, + "refreshTokenMaxReuse": 0, + "accessTokenLifespan": 300, + "accessTokenLifespanForImplicitFlow": 900, + "ssoSessionIdleTimeout": 1800, + "ssoSessionMaxLifespan": 36000, + "ssoSessionIdleTimeoutRememberMe": 0, + "ssoSessionMaxLifespanRememberMe": 0, + "offlineSessionIdleTimeout": 2592000, + "offlineSessionMaxLifespanEnabled": false, + "offlineSessionMaxLifespan": 5184000, + "clientSessionIdleTimeout": 0, + "clientSessionMaxLifespan": 0, + "clientOfflineSessionIdleTimeout": 0, + "clientOfflineSessionMaxLifespan": 0, + "accessCodeLifespan": 60, + "accessCodeLifespanUserAction": 300, + "accessCodeLifespanLogin": 1800, + "actionTokenGeneratedByAdminLifespan": 43200, + "actionTokenGeneratedByUserLifespan": 300, + "oauth2DeviceCodeLifespan": 600, + "oauth2DevicePollingInterval": 5, + "enabled": true, + "sslRequired": "external", + "registrationAllowed": false, + "registrationEmailAsUsername": false, + "rememberMe": false, + "verifyEmail": false, + "loginWithEmailAllowed": true, + "duplicateEmailsAllowed": false, + "resetPasswordAllowed": false, + "editUsernameAllowed": false, + "bruteForceProtected": false, + "permanentLockout": false, + "maxFailureWaitSeconds": 900, + "minimumQuickLoginWaitSeconds": 60, + "waitIncrementSeconds": 60, + "quickLoginCheckMilliSeconds": 1000, + "maxDeltaTimeSeconds": 43200, + "failureFactor": 30, + "roles": { + "realm": [ + { + "id": "9ac3964a-cad0-4dff-be15-2a837e443f20", + "name": "user", + "description": "User", + "composite": false, + "clientRole": false, + "containerId": "ehrbase", + "attributes": {} + }, + { + "id": "99abe2a3-a40a-426b-b8de-7a98f0dea605", + "name": "uma_authorization", + "description": "${role_uma_authorization}", + "composite": false, + "clientRole": false, + "containerId": "ehrbase", + "attributes": {} + }, + { + "id": "4f1e8170-7a4c-44ee-a477-f2fff13d9144", + "name": "admin", + "description": "Administrator", + "composite": false, + "clientRole": false, + "containerId": "ehrbase", + "attributes": {} + }, + { + "id": "67af8397-9883-4eca-b40b-44dc4f52ab59", + "name": "offline_access", + "description": "${role_offline-access}", + "composite": false, + "clientRole": false, + "containerId": "ehrbase", + "attributes": {} + }, + { + "id": "886d36fa-b314-4ffa-aabc-dbde97e143d5", + "name": "default-roles-ehrbase", + "description": "${role_default-roles}", + "composite": true, + "composites": { + "realm": [ + "offline_access", + "uma_authorization" + ], + "client": { + "account": [ + "view-profile", + "manage-account" + ] + } + }, + "clientRole": false, + "containerId": "ehrbase", + "attributes": {} + } + ], + "client": { + "realm-management": [ + { + "id": "d9250ca3-b27a-47af-b9c1-a66e576464c3", + "name": "manage-realm", + "description": "${role_manage-realm}", + "composite": false, + "clientRole": true, + "containerId": "461832ea-d2b2-42b1-b65a-04087c5d1319", + "attributes": {} + }, + { + "id": "30332191-bb98-4a43-a9db-a4bf8dd81de7", + "name": "query-groups", + "description": "${role_query-groups}", + "composite": false, + "clientRole": true, + "containerId": "461832ea-d2b2-42b1-b65a-04087c5d1319", + "attributes": {} + }, + { + "id": "3f9413ec-e85e-49c8-ade5-ee62ae814418", + "name": "query-realms", + "description": "${role_query-realms}", + "composite": false, + "clientRole": true, + "containerId": "461832ea-d2b2-42b1-b65a-04087c5d1319", + "attributes": {} + }, + { + "id": "d8a64a8b-9482-4122-8ee6-03a5fa7ccf47", + "name": "manage-authorization", + "description": "${role_manage-authorization}", + "composite": false, + "clientRole": true, + "containerId": "461832ea-d2b2-42b1-b65a-04087c5d1319", + "attributes": {} + }, + { + "id": "dde97d8c-952d-4120-bba1-a4855fca050c", + "name": "view-authorization", + "description": "${role_view-authorization}", + "composite": false, + "clientRole": true, + "containerId": "461832ea-d2b2-42b1-b65a-04087c5d1319", + "attributes": {} + }, + { + "id": "9c4e58db-cfbe-4db8-91c9-1658d3ca3e18", + "name": "manage-events", + "description": "${role_manage-events}", + "composite": false, + "clientRole": true, + "containerId": "461832ea-d2b2-42b1-b65a-04087c5d1319", + "attributes": {} + }, + { + "id": "cf058123-c451-4f8c-913c-68e8a11c2d45", + "name": "view-clients", + "description": "${role_view-clients}", + "composite": true, + "composites": { + "client": { + "realm-management": [ + "query-clients" + ] + } + }, + "clientRole": true, + "containerId": "461832ea-d2b2-42b1-b65a-04087c5d1319", + "attributes": {} + }, + { + "id": "6078e4bd-c7fa-4390-8995-92e2e6836ebd", + "name": "view-realm", + "description": "${role_view-realm}", + "composite": false, + "clientRole": true, + "containerId": "461832ea-d2b2-42b1-b65a-04087c5d1319", + "attributes": {} + }, + { + "id": "82863d05-5fcc-44ff-b119-acdcc9243369", + "name": "manage-users", + "description": "${role_manage-users}", + "composite": false, + "clientRole": true, + "containerId": "461832ea-d2b2-42b1-b65a-04087c5d1319", + "attributes": {} + }, + { + "id": "50cdd180-e8f8-4c8d-b2c6-90ce822bb90b", + "name": "query-users", + "description": "${role_query-users}", + "composite": false, + "clientRole": true, + "containerId": "461832ea-d2b2-42b1-b65a-04087c5d1319", + "attributes": {} + }, + { + "id": "6eb57aac-8ead-4d4b-9df2-aea1a1652aba", + "name": "realm-admin", + "description": "${role_realm-admin}", + "composite": true, + "composites": { + "client": { + "realm-management": [ + "manage-realm", + "query-groups", + "query-realms", + "manage-authorization", + "view-authorization", + "manage-events", + "view-clients", + "view-realm", + "query-users", + "manage-users", + "create-client", + "view-identity-providers", + "manage-clients", + "impersonation", + "manage-identity-providers", + "view-events", + "view-users", + "query-clients" + ] + } + }, + "clientRole": true, + "containerId": "461832ea-d2b2-42b1-b65a-04087c5d1319", + "attributes": {} + }, + { + "id": "8eff315d-50fd-4614-8c2a-134776c90f6e", + "name": "create-client", + "description": "${role_create-client}", + "composite": false, + "clientRole": true, + "containerId": "461832ea-d2b2-42b1-b65a-04087c5d1319", + "attributes": {} + }, + { + "id": "f54ab2d1-5159-4bb2-8a83-a1c704699e4b", + "name": "view-identity-providers", + "description": "${role_view-identity-providers}", + "composite": false, + "clientRole": true, + "containerId": "461832ea-d2b2-42b1-b65a-04087c5d1319", + "attributes": {} + }, + { + "id": "bf458aec-865b-4952-83cd-1372f62a99fe", + "name": "manage-clients", + "description": "${role_manage-clients}", + "composite": false, + "clientRole": true, + "containerId": "461832ea-d2b2-42b1-b65a-04087c5d1319", + "attributes": {} + }, + { + "id": "efd1a067-e1ae-4061-802c-e43a12bf826c", + "name": "impersonation", + "description": "${role_impersonation}", + "composite": false, + "clientRole": true, + "containerId": "461832ea-d2b2-42b1-b65a-04087c5d1319", + "attributes": {} + }, + { + "id": "0298860f-5fc5-427f-979b-67917ee7ed8f", + "name": "manage-identity-providers", + "description": "${role_manage-identity-providers}", + "composite": false, + "clientRole": true, + "containerId": "461832ea-d2b2-42b1-b65a-04087c5d1319", + "attributes": {} + }, + { + "id": "2d6f666d-0180-4512-9c56-74a6d8c3ab1f", + "name": "view-events", + "description": "${role_view-events}", + "composite": false, + "clientRole": true, + "containerId": "461832ea-d2b2-42b1-b65a-04087c5d1319", + "attributes": {} + }, + { + "id": "363ea6eb-f593-4e2d-8eaa-0f91b4373421", + "name": "view-users", + "description": "${role_view-users}", + "composite": true, + "composites": { + "client": { + "realm-management": [ + "query-users", + "query-groups" + ] + } + }, + "clientRole": true, + "containerId": "461832ea-d2b2-42b1-b65a-04087c5d1319", + "attributes": {} + }, + { + "id": "c0794862-bae2-42b1-83ea-081dc57b09b2", + "name": "query-clients", + "description": "${role_query-clients}", + "composite": false, + "clientRole": true, + "containerId": "461832ea-d2b2-42b1-b65a-04087c5d1319", + "attributes": {} + } + ], + "security-admin-console": [], + "admin-cli": [], + "account-console": [], + "broker": [ + { + "id": "019d8fac-be16-4a04-a57c-a61064e9b9d5", + "name": "read-token", + "description": "${role_read-token}", + "composite": false, + "clientRole": true, + "containerId": "926767ad-f73e-4597-9e37-c6835239004f", + "attributes": {} + } + ], + "fhir-bridge": [], + "account": [ + { + "id": "39bc947e-7af2-40a2-b109-5ecb0e4d5d4d", + "name": "view-consent", + "description": "${role_view-consent}", + "composite": false, + "clientRole": true, + "containerId": "fe193e22-ac1f-4c0d-85e0-83e7bb9f9f7a", + "attributes": {} + }, + { + "id": "8f3c715c-cab8-4f63-b66b-bac36ecb2782", + "name": "view-applications", + "description": "${role_view-applications}", + "composite": false, + "clientRole": true, + "containerId": "fe193e22-ac1f-4c0d-85e0-83e7bb9f9f7a", + "attributes": {} + }, + { + "id": "f35095c0-96fd-4f69-98a6-244a5b431d7e", + "name": "manage-account-links", + "description": "${role_manage-account-links}", + "composite": false, + "clientRole": true, + "containerId": "fe193e22-ac1f-4c0d-85e0-83e7bb9f9f7a", + "attributes": {} + }, + { + "id": "2b326d0f-5505-4cfc-9e2a-1b2f630057b0", + "name": "view-profile", + "description": "${role_view-profile}", + "composite": false, + "clientRole": true, + "containerId": "fe193e22-ac1f-4c0d-85e0-83e7bb9f9f7a", + "attributes": {} + }, + { + "id": "42436ad8-1bc1-4b67-b9e8-65175813debc", + "name": "delete-account", + "description": "${role_delete-account}", + "composite": false, + "clientRole": true, + "containerId": "fe193e22-ac1f-4c0d-85e0-83e7bb9f9f7a", + "attributes": {} + }, + { + "id": "226ca886-5343-429a-9c1c-681002d1d4e4", + "name": "manage-account", + "description": "${role_manage-account}", + "composite": true, + "composites": { + "client": { + "account": [ + "manage-account-links" + ] + } + }, + "clientRole": true, + "containerId": "fe193e22-ac1f-4c0d-85e0-83e7bb9f9f7a", + "attributes": {} + }, + { + "id": "2a3ccf0d-6349-4c9f-9464-143de60b13bd", + "name": "manage-consent", + "description": "${role_manage-consent}", + "composite": true, + "composites": { + "client": { + "account": [ + "view-consent" + ] + } + }, + "clientRole": true, + "containerId": "fe193e22-ac1f-4c0d-85e0-83e7bb9f9f7a", + "attributes": {} + } + ] + } + }, + "groups": [], + "defaultRole": { + "id": "886d36fa-b314-4ffa-aabc-dbde97e143d5", + "name": "default-roles-ehrbase", + "description": "${role_default-roles}", + "composite": true, + "clientRole": false, + "containerId": "ehrbase" + }, + "requiredCredentials": [ + "password" + ], + "otpPolicyType": "totp", + "otpPolicyAlgorithm": "HmacSHA1", + "otpPolicyInitialCounter": 0, + "otpPolicyDigits": 6, + "otpPolicyLookAheadWindow": 1, + "otpPolicyPeriod": 30, + "otpSupportedApplications": [ + "FreeOTP", + "Google Authenticator" + ], + "webAuthnPolicyRpEntityName": "keycloak", + "webAuthnPolicySignatureAlgorithms": [ + "ES256" + ], + "webAuthnPolicyRpId": "", + "webAuthnPolicyAttestationConveyancePreference": "not specified", + "webAuthnPolicyAuthenticatorAttachment": "not specified", + "webAuthnPolicyRequireResidentKey": "not specified", + "webAuthnPolicyUserVerificationRequirement": "not specified", + "webAuthnPolicyCreateTimeout": 0, + "webAuthnPolicyAvoidSameAuthenticatorRegister": false, + "webAuthnPolicyAcceptableAaguids": [], + "webAuthnPolicyPasswordlessRpEntityName": "keycloak", + "webAuthnPolicyPasswordlessSignatureAlgorithms": [ + "ES256" + ], + "webAuthnPolicyPasswordlessRpId": "", + "webAuthnPolicyPasswordlessAttestationConveyancePreference": "not specified", + "webAuthnPolicyPasswordlessAuthenticatorAttachment": "not specified", + "webAuthnPolicyPasswordlessRequireResidentKey": "not specified", + "webAuthnPolicyPasswordlessUserVerificationRequirement": "not specified", + "webAuthnPolicyPasswordlessCreateTimeout": 0, + "webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister": false, + "webAuthnPolicyPasswordlessAcceptableAaguids": [], + "clientProfiles": { + "profiles": [] + }, + "clientPolicies": { + "policies": [ + { + "name": "builtin-default-policy", + "builtin": true, + "enable": false + } + ] + }, + "users": [ + { + "id": "6eb360ef-c488-4f32-923e-c4be05854e04", + "createdTimestamp": 1624899620674, + "username": "service-account-fhir-bridge", + "enabled": true, + "totp": false, + "emailVerified": false, + "serviceAccountClientId": "fhir-bridge", + "disableableCredentialTypes": [], + "requiredActions": [], + "realmRoles": [ + "default-roles-ehrbase" + ], + "notBefore": 0, + "groups": [] + } + ], + "scopeMappings": [ + { + "clientScope": "offline_access", + "roles": [ + "offline_access" + ] + } + ], + "clientScopeMappings": { + "account": [ + { + "client": "account-console", + "roles": [ + "manage-account" + ] + } + ] + }, + "clients": [ + { + "id": "fe193e22-ac1f-4c0d-85e0-83e7bb9f9f7a", + "clientId": "account", + "name": "${client_account}", + "rootUrl": "${authBaseUrl}", + "baseUrl": "/realms/ehrbase/account/", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "redirectUris": [ + "/realms/ehrbase/account/*" + ], + "webOrigins": [], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": false, + "serviceAccountsEnabled": false, + "publicClient": true, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": {}, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": false, + "nodeReRegistrationTimeout": 0, + "defaultClientScopes": [ + "web-origins", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + }, + { + "id": "95340402-57a2-4d53-b95b-445c173e0e85", + "clientId": "account-console", + "name": "${client_account-console}", + "rootUrl": "${authBaseUrl}", + "baseUrl": "/realms/ehrbase/account/", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "redirectUris": [ + "/realms/ehrbase/account/*" + ], + "webOrigins": [], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": false, + "serviceAccountsEnabled": false, + "publicClient": true, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": { + "pkce.code.challenge.method": "S256" + }, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": false, + "nodeReRegistrationTimeout": 0, + "protocolMappers": [ + { + "id": "80fb8c51-5497-42f7-9dae-54947f627a89", + "name": "audience resolve", + "protocol": "openid-connect", + "protocolMapper": "oidc-audience-resolve-mapper", + "consentRequired": false, + "config": {} + } + ], + "defaultClientScopes": [ + "web-origins", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + }, + { + "id": "fa091c68-9527-48f9-9726-9334b36593b4", + "clientId": "admin-cli", + "name": "${client_admin-cli}", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "redirectUris": [], + "webOrigins": [], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": false, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": true, + "serviceAccountsEnabled": false, + "publicClient": true, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": {}, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": false, + "nodeReRegistrationTimeout": 0, + "defaultClientScopes": [ + "web-origins", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + }, + { + "id": "926767ad-f73e-4597-9e37-c6835239004f", + "clientId": "broker", + "name": "${client_broker}", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "redirectUris": [], + "webOrigins": [], + "notBefore": 0, + "bearerOnly": true, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": false, + "serviceAccountsEnabled": false, + "publicClient": false, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": {}, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": false, + "nodeReRegistrationTimeout": 0, + "defaultClientScopes": [ + "web-origins", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + }, + { + "id": "acb46387-8276-4ae2-98eb-90f5a938fb33", + "clientId": "fhir-bridge", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "secret": "e694dbaa-9c19-4712-b607-70ef6379ff39", + "redirectUris": [ + "http://localhost:8888/fhir-bridge/*" + ], + "webOrigins": [], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": true, + "directAccessGrantsEnabled": true, + "serviceAccountsEnabled": true, + "publicClient": false, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": { + "saml.assertion.signature": "false", + "saml.force.post.binding": "false", + "saml.multivalued.roles": "false", + "saml.encrypt": "false", + "oauth2.device.authorization.grant.enabled": "false", + "backchannel.logout.revoke.offline.tokens": "false", + "saml.server.signature": "false", + "saml.server.signature.keyinfo.ext": "false", + "use.refresh.tokens": "true", + "exclude.session.state.from.auth.response": "false", + "oidc.ciba.grant.enabled": "false", + "saml.artifact.binding": "false", + "backchannel.logout.session.required": "true", + "client_credentials.use_refresh_token": "false", + "saml_force_name_id_format": "false", + "saml.client.signature": "false", + "tls.client.certificate.bound.access.tokens": "false", + "saml.authnstatement": "false", + "display.on.consent.screen": "false", + "saml.onetimeuse.condition": "false" + }, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": true, + "nodeReRegistrationTimeout": -1, + "protocolMappers": [ + { + "id": "31550cb9-aff1-4a19-8ef7-d60a23c95f14", + "name": "Client Host", + "protocol": "openid-connect", + "protocolMapper": "oidc-usersessionmodel-note-mapper", + "consentRequired": false, + "config": { + "user.session.note": "clientHost", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "clientHost", + "jsonType.label": "String" + } + }, + { + "id": "ec1b785a-6c0c-49c8-b4fa-2b14506cbcd0", + "name": "Client ID", + "protocol": "openid-connect", + "protocolMapper": "oidc-usersessionmodel-note-mapper", + "consentRequired": false, + "config": { + "user.session.note": "clientId", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "clientId", + "jsonType.label": "String" + } + }, + { + "id": "c1b0a5ce-c653-47af-ac8b-8d751b9f49b2", + "name": "Client IP Address", + "protocol": "openid-connect", + "protocolMapper": "oidc-usersessionmodel-note-mapper", + "consentRequired": false, + "config": { + "user.session.note": "clientAddress", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "clientAddress", + "jsonType.label": "String" + } + } + ], + "defaultClientScopes": [ + "web-origins", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + }, + { + "id": "461832ea-d2b2-42b1-b65a-04087c5d1319", + "clientId": "realm-management", + "name": "${client_realm-management}", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "redirectUris": [], + "webOrigins": [], + "notBefore": 0, + "bearerOnly": true, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": false, + "serviceAccountsEnabled": false, + "publicClient": false, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": {}, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": false, + "nodeReRegistrationTimeout": 0, + "defaultClientScopes": [ + "web-origins", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + }, + { + "id": "5e30add7-daa4-4307-bef7-cd273251c13b", + "clientId": "security-admin-console", + "name": "${client_security-admin-console}", + "rootUrl": "${authAdminUrl}", + "baseUrl": "/admin/ehrbase/console/", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "redirectUris": [ + "/admin/ehrbase/console/*" + ], + "webOrigins": [ + "+" + ], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": false, + "serviceAccountsEnabled": false, + "publicClient": true, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": { + "pkce.code.challenge.method": "S256" + }, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": false, + "nodeReRegistrationTimeout": 0, + "protocolMappers": [ + { + "id": "874eeea1-2327-4f82-8ca3-8ff0b398f68a", + "name": "locale", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "locale", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "locale", + "jsonType.label": "String" + } + } + ], + "defaultClientScopes": [ + "web-origins", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + } + ], + "clientScopes": [ + { + "id": "9e94a419-09fa-42e6-9654-f9e59b49afe0", + "name": "profile", + "description": "OpenID Connect built-in scope: profile", + "protocol": "openid-connect", + "attributes": { + "include.in.token.scope": "true", + "display.on.consent.screen": "true", + "consent.screen.text": "${profileScopeConsentText}" + }, + "protocolMappers": [ + { + "id": "973be9d0-551e-4e3e-af19-9f6e1342808b", + "name": "birthdate", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "birthdate", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "birthdate", + "jsonType.label": "String" + } + }, + { + "id": "ef0029c4-4bfa-44ba-a50d-f69bf623d2db", + "name": "given name", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "firstName", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "given_name", + "jsonType.label": "String" + } + }, + { + "id": "9a07dd69-0eb5-4dc0-9654-441b9dd44668", + "name": "profile", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "profile", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "profile", + "jsonType.label": "String" + } + }, + { + "id": "67395a69-d1dc-4bc2-90c8-6b342fc712f2", + "name": "picture", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "picture", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "picture", + "jsonType.label": "String" + } + }, + { + "id": "a47af0ea-724d-40a9-bfdf-45f16ce0e0a3", + "name": "family name", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "lastName", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "family_name", + "jsonType.label": "String" + } + }, + { + "id": "f80010d3-0375-4b6a-b03b-34ad8a0a1c08", + "name": "username", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "username", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "preferred_username", + "jsonType.label": "String" + } + }, + { + "id": "f9765982-fea8-4678-8d8d-a110922fd347", + "name": "locale", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "locale", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "locale", + "jsonType.label": "String" + } + }, + { + "id": "6ee9f6c1-9485-40aa-b11a-d9209126a2be", + "name": "website", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "website", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "website", + "jsonType.label": "String" + } + }, + { + "id": "e33f1362-6811-4547-957b-10d8e89e683c", + "name": "middle name", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "middleName", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "middle_name", + "jsonType.label": "String" + } + }, + { + "id": "a5c9e81a-4448-45ed-9c3f-7dfef2b8f2ab", + "name": "gender", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "gender", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "gender", + "jsonType.label": "String" + } + }, + { + "id": "66aad55c-7b77-4492-8423-80aa903f3da1", + "name": "zoneinfo", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "zoneinfo", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "zoneinfo", + "jsonType.label": "String" + } + }, + { + "id": "7260a91b-7b3a-4052-89c6-b9ca127844c2", + "name": "nickname", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "nickname", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "nickname", + "jsonType.label": "String" + } + }, + { + "id": "54c430ca-7796-40d3-8219-0b19041efba6", + "name": "updated at", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "updatedAt", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "updated_at", + "jsonType.label": "String" + } + }, + { + "id": "26824963-63ef-40b8-9a17-ddec56db3029", + "name": "full name", + "protocol": "openid-connect", + "protocolMapper": "oidc-full-name-mapper", + "consentRequired": false, + "config": { + "id.token.claim": "true", + "access.token.claim": "true", + "userinfo.token.claim": "true" + } + } + ] + }, + { + "id": "5124df3b-2e35-4b1c-a3d9-8f2cf11b332c", + "name": "offline_access", + "description": "OpenID Connect built-in scope: offline_access", + "protocol": "openid-connect", + "attributes": { + "consent.screen.text": "${offlineAccessScopeConsentText}", + "display.on.consent.screen": "true" + } + }, + { + "id": "de560fde-220e-486c-9c8b-6c975b5012fb", + "name": "address", + "description": "OpenID Connect built-in scope: address", + "protocol": "openid-connect", + "attributes": { + "include.in.token.scope": "true", + "display.on.consent.screen": "true", + "consent.screen.text": "${addressScopeConsentText}" + }, + "protocolMappers": [ + { + "id": "7142316e-37ce-488f-adb1-6891fda131e0", + "name": "address", + "protocol": "openid-connect", + "protocolMapper": "oidc-address-mapper", + "consentRequired": false, + "config": { + "user.attribute.formatted": "formatted", + "user.attribute.country": "country", + "user.attribute.postal_code": "postal_code", + "userinfo.token.claim": "true", + "user.attribute.street": "street", + "id.token.claim": "true", + "user.attribute.region": "region", + "access.token.claim": "true", + "user.attribute.locality": "locality" + } + } + ] + }, + { + "id": "d1163554-70b8-4258-b2e5-0bef2190c57f", + "name": "phone", + "description": "OpenID Connect built-in scope: phone", + "protocol": "openid-connect", + "attributes": { + "include.in.token.scope": "true", + "display.on.consent.screen": "true", + "consent.screen.text": "${phoneScopeConsentText}" + }, + "protocolMappers": [ + { + "id": "42d3e042-460f-486a-ae45-73eb437d0853", + "name": "phone number verified", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "phoneNumberVerified", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "phone_number_verified", + "jsonType.label": "boolean" + } + }, + { + "id": "f7f02ba6-d9eb-4733-8270-d4733110fcda", + "name": "phone number", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "phoneNumber", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "phone_number", + "jsonType.label": "String" + } + } + ] + }, + { + "id": "c1b1702d-a5f3-40cb-a457-744050d4b07e", + "name": "role_list", + "description": "SAML role list", + "protocol": "saml", + "attributes": { + "consent.screen.text": "${samlRoleListScopeConsentText}", + "display.on.consent.screen": "true" + }, + "protocolMappers": [ + { + "id": "a3946305-d9f6-4c79-98b3-176c3c64adf0", + "name": "role list", + "protocol": "saml", + "protocolMapper": "saml-role-list-mapper", + "consentRequired": false, + "config": { + "single": "false", + "attribute.nameformat": "Basic", + "attribute.name": "Role" + } + } + ] + }, + { + "id": "a33619da-9c96-40d1-bf9a-60bcc5d85d88", + "name": "roles", + "description": "OpenID Connect scope for add user roles to the access token", + "protocol": "openid-connect", + "attributes": { + "include.in.token.scope": "false", + "display.on.consent.screen": "true", + "consent.screen.text": "${rolesScopeConsentText}" + }, + "protocolMappers": [ + { + "id": "b1f85836-9912-47ff-8fe7-b5a2121a19cb", + "name": "audience resolve", + "protocol": "openid-connect", + "protocolMapper": "oidc-audience-resolve-mapper", + "consentRequired": false, + "config": {} + }, + { + "id": "5ea4a169-abab-439b-936f-5b842b678855", + "name": "client roles", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-client-role-mapper", + "consentRequired": false, + "config": { + "user.attribute": "foo", + "access.token.claim": "true", + "claim.name": "resource_access.${client_id}.roles", + "jsonType.label": "String", + "multivalued": "true" + } + }, + { + "id": "440ac2c7-9090-441b-83a0-3120c3cb2dce", + "name": "realm roles", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-realm-role-mapper", + "consentRequired": false, + "config": { + "user.attribute": "foo", + "access.token.claim": "true", + "claim.name": "realm_access.roles", + "jsonType.label": "String", + "multivalued": "true" + } + } + ] + }, + { + "id": "f8d3c3d6-d3ed-4b8d-a748-50fd802738f1", + "name": "email", + "description": "OpenID Connect built-in scope: email", + "protocol": "openid-connect", + "attributes": { + "include.in.token.scope": "true", + "display.on.consent.screen": "true", + "consent.screen.text": "${emailScopeConsentText}" + }, + "protocolMappers": [ + { + "id": "d380418a-6a27-4415-a6cd-43da50d40ea0", + "name": "email", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "email", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "email", + "jsonType.label": "String" + } + }, + { + "id": "65e5b566-8ccd-4ac4-8e7b-2360bb11254b", + "name": "email verified", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "emailVerified", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "email_verified", + "jsonType.label": "boolean" + } + } + ] + }, + { + "id": "6d0d1d32-cb47-4fb3-899a-e5c40c804efd", + "name": "microprofile-jwt", + "description": "Microprofile - JWT built-in scope", + "protocol": "openid-connect", + "attributes": { + "include.in.token.scope": "true", + "display.on.consent.screen": "false" + }, + "protocolMappers": [ + { + "id": "4f461403-5eed-4b27-aa6b-bce1ede34673", + "name": "upn", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "username", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "upn", + "jsonType.label": "String" + } + }, + { + "id": "7257fe83-ddd2-4535-b414-6bb00066e6e5", + "name": "groups", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-realm-role-mapper", + "consentRequired": false, + "config": { + "multivalued": "true", + "userinfo.token.claim": "true", + "user.attribute": "foo", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "groups", + "jsonType.label": "String" + } + } + ] + }, + { + "id": "a32c2616-7777-4cfa-8c6b-92fbcd47148b", + "name": "web-origins", + "description": "OpenID Connect scope for add allowed web origins to the access token", + "protocol": "openid-connect", + "attributes": { + "include.in.token.scope": "false", + "display.on.consent.screen": "false", + "consent.screen.text": "" + }, + "protocolMappers": [ + { + "id": "1a5af853-2581-422c-9c9d-cafe11b4b1f1", + "name": "allowed web origins", + "protocol": "openid-connect", + "protocolMapper": "oidc-allowed-origins-mapper", + "consentRequired": false, + "config": {} + } + ] + } + ], + "defaultDefaultClientScopes": [ + "profile", + "web-origins", + "roles", + "role_list", + "email" + ], + "defaultOptionalClientScopes": [ + "offline_access", + "microprofile-jwt", + "phone", + "address" + ], + "browserSecurityHeaders": { + "contentSecurityPolicyReportOnly": "", + "xContentTypeOptions": "nosniff", + "xRobotsTag": "none", + "xFrameOptions": "SAMEORIGIN", + "contentSecurityPolicy": "frame-src 'self'; frame-ancestors 'self'; object-src 'none';", + "xXSSProtection": "1; mode=block", + "strictTransportSecurity": "max-age=31536000; includeSubDomains" + }, + "smtpServer": {}, + "eventsEnabled": false, + "eventsListeners": [ + "jboss-logging" + ], + "enabledEventTypes": [], + "adminEventsEnabled": false, + "adminEventsDetailsEnabled": false, + "identityProviders": [], + "identityProviderMappers": [], + "components": { + "org.keycloak.services.clientregistration.policy.ClientRegistrationPolicy": [ + { + "id": "15890b5f-c5f0-4e00-acde-79873ccbd8d6", + "name": "Allowed Client Scopes", + "providerId": "allowed-client-templates", + "subType": "authenticated", + "subComponents": {}, + "config": { + "allow-default-scopes": [ + "true" + ] + } + }, + { + "id": "47b37a99-b0b7-4523-806a-fc3c26af394c", + "name": "Full Scope Disabled", + "providerId": "scope", + "subType": "anonymous", + "subComponents": {}, + "config": {} + }, + { + "id": "1e1371bf-49cf-4875-9f31-06476e718539", + "name": "Allowed Client Scopes", + "providerId": "allowed-client-templates", + "subType": "anonymous", + "subComponents": {}, + "config": { + "allow-default-scopes": [ + "true" + ] + } + }, + { + "id": "8362c4a1-51d4-4a41-b732-a652b3fd672d", + "name": "Consent Required", + "providerId": "consent-required", + "subType": "anonymous", + "subComponents": {}, + "config": {} + }, + { + "id": "c85c91bb-bc12-4cae-a1f0-f5dfc5a7ac86", + "name": "Allowed Protocol Mapper Types", + "providerId": "allowed-protocol-mappers", + "subType": "anonymous", + "subComponents": {}, + "config": { + "allowed-protocol-mapper-types": [ + "oidc-sha256-pairwise-sub-mapper", + "oidc-usermodel-attribute-mapper", + "oidc-full-name-mapper", + "saml-user-property-mapper", + "oidc-address-mapper", + "oidc-usermodel-property-mapper", + "saml-role-list-mapper", + "saml-user-attribute-mapper" + ] + } + }, + { + "id": "ff24de24-9666-4989-bbd4-04e271f6a0e6", + "name": "Max Clients Limit", + "providerId": "max-clients", + "subType": "anonymous", + "subComponents": {}, + "config": { + "max-clients": [ + "200" + ] + } + }, + { + "id": "97df7613-e4e3-4771-ae58-56e333525472", + "name": "Allowed Protocol Mapper Types", + "providerId": "allowed-protocol-mappers", + "subType": "authenticated", + "subComponents": {}, + "config": { + "allowed-protocol-mapper-types": [ + "oidc-usermodel-property-mapper", + "oidc-address-mapper", + "saml-role-list-mapper", + "saml-user-property-mapper", + "oidc-full-name-mapper", + "oidc-usermodel-attribute-mapper", + "saml-user-attribute-mapper", + "oidc-sha256-pairwise-sub-mapper" + ] + } + }, + { + "id": "52ceb2fd-02ec-49bf-83ab-0116b5441f04", + "name": "Trusted Hosts", + "providerId": "trusted-hosts", + "subType": "anonymous", + "subComponents": {}, + "config": { + "host-sending-registration-request-must-match": [ + "true" + ], + "client-uris-must-match": [ + "true" + ] + } + } + ], + "org.keycloak.keys.KeyProvider": [ + { + "id": "f7979fb9-cb74-48c2-b23a-7c46c20074bd", + "name": "hmac-generated", + "providerId": "hmac-generated", + "subComponents": {}, + "config": { + "priority": [ + "100" + ], + "algorithm": [ + "HS256" + ] + } + }, + { + "id": "8ef879d0-201e-4fbe-9d06-bf5297c011cc", + "name": "aes-generated", + "providerId": "aes-generated", + "subComponents": {}, + "config": { + "priority": [ + "100" + ] + } + }, + { + "id": "e80659cd-f7d5-40ce-9413-072e24151a8b", + "name": "rsa-generated", + "providerId": "rsa-generated", + "subComponents": {}, + "config": { + "priority": [ + "100" + ] + } + } + ] + }, + "internationalizationEnabled": false, + "supportedLocales": [], + "authenticationFlows": [ + { + "id": "e7e3b622-b4ad-46b1-be0b-f83865f574e5", + "alias": "Account verification options", + "description": "Method with which to verity the existing account", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "idp-email-verification", + "authenticatorFlow": false, + "requirement": "ALTERNATIVE", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticatorFlow": true, + "requirement": "ALTERNATIVE", + "priority": 20, + "flowAlias": "Verify Existing Account by Re-authentication", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "ce744e82-6d5b-4365-bfc7-299168f26ea9", + "alias": "Authentication Options", + "description": "Authentication options.", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "basic-auth", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "basic-auth-otp", + "authenticatorFlow": false, + "requirement": "DISABLED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "auth-spnego", + "authenticatorFlow": false, + "requirement": "DISABLED", + "priority": 30, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "3c0ff294-bc32-4397-9b58-9d0d895c272d", + "alias": "Browser - Conditional OTP", + "description": "Flow to determine if the OTP is required for the authentication", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "conditional-user-configured", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "auth-otp-form", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "3cce108d-c7ba-4dde-b408-71500f71214e", + "alias": "Direct Grant - Conditional OTP", + "description": "Flow to determine if the OTP is required for the authentication", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "conditional-user-configured", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "direct-grant-validate-otp", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "f031da20-c048-4131-b3b2-7ebbd7a0683b", + "alias": "First broker login - Conditional OTP", + "description": "Flow to determine if the OTP is required for the authentication", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "conditional-user-configured", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "auth-otp-form", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "e0916bb3-ecdf-4858-9917-67623eac8cd0", + "alias": "Handle Existing Account", + "description": "Handle what to do if there is existing account with same email/username like authenticated identity provider", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "idp-confirm-link", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticatorFlow": true, + "requirement": "REQUIRED", + "priority": 20, + "flowAlias": "Account verification options", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "b773ba28-0460-46e8-9003-549f72f7faeb", + "alias": "Reset - Conditional OTP", + "description": "Flow to determine if the OTP should be reset or not. Set to REQUIRED to force.", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "conditional-user-configured", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "reset-otp", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "13c92145-c7b0-4d8e-9f2d-12e102765a39", + "alias": "User creation or linking", + "description": "Flow for the existing/non-existing user alternatives", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticatorConfig": "create unique user config", + "authenticator": "idp-create-user-if-unique", + "authenticatorFlow": false, + "requirement": "ALTERNATIVE", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticatorFlow": true, + "requirement": "ALTERNATIVE", + "priority": 20, + "flowAlias": "Handle Existing Account", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "e335dcbe-1019-4382-b2d8-3a6adcfbf3b9", + "alias": "Verify Existing Account by Re-authentication", + "description": "Reauthentication of existing account", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "idp-username-password-form", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticatorFlow": true, + "requirement": "CONDITIONAL", + "priority": 20, + "flowAlias": "First broker login - Conditional OTP", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "4a5ed627-c591-4f0c-8fc2-3890cd24b25b", + "alias": "browser", + "description": "browser based authentication", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "auth-cookie", + "authenticatorFlow": false, + "requirement": "ALTERNATIVE", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "auth-spnego", + "authenticatorFlow": false, + "requirement": "DISABLED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "identity-provider-redirector", + "authenticatorFlow": false, + "requirement": "ALTERNATIVE", + "priority": 25, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticatorFlow": true, + "requirement": "ALTERNATIVE", + "priority": 30, + "flowAlias": "forms", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "4eb0609e-ba70-417c-bbe5-ce366b8d1300", + "alias": "clients", + "description": "Base authentication for clients", + "providerId": "client-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "client-secret", + "authenticatorFlow": false, + "requirement": "ALTERNATIVE", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "client-jwt", + "authenticatorFlow": false, + "requirement": "ALTERNATIVE", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "client-secret-jwt", + "authenticatorFlow": false, + "requirement": "ALTERNATIVE", + "priority": 30, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "client-x509", + "authenticatorFlow": false, + "requirement": "ALTERNATIVE", + "priority": 40, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "236b5fda-2106-48c2-ae03-992b29e05cc8", + "alias": "direct grant", + "description": "OpenID Connect Resource Owner Grant", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "direct-grant-validate-username", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "direct-grant-validate-password", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticatorFlow": true, + "requirement": "CONDITIONAL", + "priority": 30, + "flowAlias": "Direct Grant - Conditional OTP", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "d3b64182-f7d1-4d01-8c08-02de0f6e9139", + "alias": "docker auth", + "description": "Used by Docker clients to authenticate against the IDP", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "docker-http-basic-authenticator", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "f514202c-4e54-45f9-bf21-93c73615ffc9", + "alias": "first broker login", + "description": "Actions taken after first broker login with identity provider account, which is not yet linked to any Keycloak account", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticatorConfig": "review profile config", + "authenticator": "idp-review-profile", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticatorFlow": true, + "requirement": "REQUIRED", + "priority": 20, + "flowAlias": "User creation or linking", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "00128b12-dada-43ad-a62c-174a9dd4da8e", + "alias": "forms", + "description": "Username, password, otp and other auth forms.", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "auth-username-password-form", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticatorFlow": true, + "requirement": "CONDITIONAL", + "priority": 20, + "flowAlias": "Browser - Conditional OTP", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "3f855ecb-3f3a-4020-bfbc-e3930f109048", + "alias": "http challenge", + "description": "An authentication flow based on challenge-response HTTP Authentication Schemes", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "no-cookie-redirect", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticatorFlow": true, + "requirement": "REQUIRED", + "priority": 20, + "flowAlias": "Authentication Options", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "5d014e9a-4f20-4053-bb3e-f5cc9fe42472", + "alias": "registration", + "description": "registration flow", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "registration-page-form", + "authenticatorFlow": true, + "requirement": "REQUIRED", + "priority": 10, + "flowAlias": "registration form", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "8299f102-377b-4900-b6f3-1dbe397e24d3", + "alias": "registration form", + "description": "registration form", + "providerId": "form-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "registration-user-creation", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "registration-profile-action", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 40, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "registration-password-action", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 50, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "registration-recaptcha-action", + "authenticatorFlow": false, + "requirement": "DISABLED", + "priority": 60, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "e760ec57-975c-434b-b860-39a2d068d00f", + "alias": "reset credentials", + "description": "Reset credentials for a user if they forgot their password or something", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "reset-credentials-choose-user", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "reset-credential-email", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "reset-password", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 30, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticatorFlow": true, + "requirement": "CONDITIONAL", + "priority": 40, + "flowAlias": "Reset - Conditional OTP", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "a614fdac-c39f-45a2-8bfd-9de5b0f98a4b", + "alias": "saml ecp", + "description": "SAML ECP Profile Authentication Flow", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "http-basic-authenticator", + "authenticatorFlow": false, + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + } + ], + "authenticatorConfig": [ + { + "id": "042828aa-9682-44c5-9f0f-ce81e4cadcc5", + "alias": "create unique user config", + "config": { + "require.password.update.after.registration": "false" + } + }, + { + "id": "311949b3-8cb4-419a-a1c9-4f4dfc1add3f", + "alias": "review profile config", + "config": { + "update.profile.on.first.login": "missing" + } + } + ], + "requiredActions": [ + { + "alias": "CONFIGURE_TOTP", + "name": "Configure OTP", + "providerId": "CONFIGURE_TOTP", + "enabled": true, + "defaultAction": false, + "priority": 10, + "config": {} + }, + { + "alias": "terms_and_conditions", + "name": "Terms and Conditions", + "providerId": "terms_and_conditions", + "enabled": false, + "defaultAction": false, + "priority": 20, + "config": {} + }, + { + "alias": "UPDATE_PASSWORD", + "name": "Update Password", + "providerId": "UPDATE_PASSWORD", + "enabled": true, + "defaultAction": false, + "priority": 30, + "config": {} + }, + { + "alias": "UPDATE_PROFILE", + "name": "Update Profile", + "providerId": "UPDATE_PROFILE", + "enabled": true, + "defaultAction": false, + "priority": 40, + "config": {} + }, + { + "alias": "VERIFY_EMAIL", + "name": "Verify Email", + "providerId": "VERIFY_EMAIL", + "enabled": true, + "defaultAction": false, + "priority": 50, + "config": {} + }, + { + "alias": "delete_account", + "name": "Delete Account", + "providerId": "delete_account", + "enabled": false, + "defaultAction": false, + "priority": 60, + "config": {} + }, + { + "alias": "update_user_locale", + "name": "Update User Locale", + "providerId": "update_user_locale", + "enabled": true, + "defaultAction": false, + "priority": 1000, + "config": {} + } + ], + "browserFlow": "browser", + "registrationFlow": "registration", + "directGrantFlow": "direct grant", + "resetCredentialsFlow": "reset credentials", + "clientAuthenticationFlow": "clients", + "dockerAuthenticationFlow": "docker auth", + "attributes": { + "cibaBackchannelTokenDeliveryMode": "poll", + "cibaExpiresIn": "120", + "cibaAuthRequestedUserHint": "login_hint", + "oauth2DeviceCodeLifespan": "600", + "clientOfflineSessionMaxLifespan": "0", + "oauth2DevicePollingInterval": "5", + "clientSessionIdleTimeout": "0", + "clientSessionMaxLifespan": "0", + "clientOfflineSessionIdleTimeout": "0", + "cibaInterval": "5" + }, + "keycloakVersion": "13.0.0", + "userManagedAccessAllowed": false +} \ No newline at end of file diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/AccessTokenResponse.java b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/AccessTokenResponse.java new file mode 100644 index 000000000..14c8724a8 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/AccessTokenResponse.java @@ -0,0 +1,76 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.config.ehrbase; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * AccessTokenResponse model. + */ +public class AccessTokenResponse { + + private final String accessToken; + + private final long expiresIn; + + private final long refreshExpiresIn; + + private final String tokenType; + + private final String idToken; + + private final String scope; + + + public AccessTokenResponse(@JsonProperty("access_token") String accessToken, + @JsonProperty("expires_in") long expiresIn, + @JsonProperty("refresh_expires_in") long refreshExpiresIn, + @JsonProperty("token_type") String tokenType, + @JsonProperty("id_token") String idToken, + @JsonProperty("scope") String scope) { + this.accessToken = accessToken; + this.tokenType = tokenType; + this.expiresIn = expiresIn; + this.refreshExpiresIn = refreshExpiresIn; + this.idToken = idToken; + this.scope = scope; + } + + public String getAccessToken() { + return accessToken; + } + + public long getExpiresIn() { + return expiresIn; + } + + public long getRefreshExpiresIn() { + return refreshExpiresIn; + } + + public String getTokenType() { + return tokenType; + } + + public String getIdToken() { + return idToken; + } + + public String getScope() { + return scope; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/AccessTokenService.java b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/AccessTokenService.java new file mode 100644 index 000000000..c3dab9ea9 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/AccessTokenService.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.config.ehrbase; + +import org.springframework.web.reactive.function.BodyInserters; +import org.springframework.web.reactive.function.client.WebClient; + +import java.time.Instant; +import java.time.temporal.ChronoUnit; + +/** + * Service that handles requesting OAuth2 access token to the configured authorization server. + * + * @since 1.2.0 + */ +@SuppressWarnings("java:S6212") +public class AccessTokenService { + + private final WebClient webClient; + + private final String clientId; + + private final String clientSecret; + + private String token; + + private Instant expirationTime; + + public AccessTokenService(String tokenUrl, String clientId, String clientSecret) { + webClient = WebClient.builder().baseUrl(tokenUrl).build(); + this.clientId = clientId; + this.clientSecret = clientSecret; + } + + public String getToken() { + if (token == null || isTokenExpired()) { + token = requestAccessToken(); + } + return token; + } + + private String requestAccessToken() { + Instant requestTime = Instant.now(); + + AccessTokenResponse response = webClient.post() + .body(BodyInserters.fromFormData("grant_type", "client_credentials") + .with("client_id", clientId) + .with("client_secret", clientSecret)) + .retrieve() + .bodyToMono(AccessTokenResponse.class) + .blockOptional() + .orElseThrow(() -> new IllegalArgumentException("Response must not be null")); + + // Set token expiration time + expirationTime = requestTime.plus(response.getExpiresIn(), ChronoUnit.SECONDS); + + return response.getAccessToken(); + } + + private boolean isTokenExpired() { + return Instant.now().isAfter(expirationTime); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseConfiguration.java index a371ae29a..3e136070f 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseConfiguration.java @@ -26,10 +26,11 @@ import org.ehrbase.client.openehrclient.defaultrestclient.DefaultRestClient; import org.ehrbase.fhirbridge.ehr.ResourceTemplateProvider; import org.ehrbase.webtemplate.templateprovider.TemplateProvider; +import org.springframework.beans.factory.ObjectProvider; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Import; import java.net.URI; import java.net.URISyntaxException; @@ -41,7 +42,7 @@ */ @Configuration @EnableConfigurationProperties(EhrbaseProperties.class) -@Import(EhrbaseTemplateInitializer.class) +@SuppressWarnings("java:S6212") public class EhrbaseConfiguration { private final EhrbaseProperties properties; @@ -56,25 +57,45 @@ public OpenEhrClientConfig restClientConfig() throws URISyntaxException { } @Bean - public TemplateProvider templateProvider() { + public ResourceTemplateProvider templateProvider() { return new ResourceTemplateProvider(properties.getTemplate().getPrefix()); } @Bean - public DefaultRestClient openEhrClient(OpenEhrClientConfig restClientConfig, TemplateProvider templateProvider) { - return new DefaultRestClient(restClientConfig, templateProvider, httpClient()); + public DefaultRestClient openEhrClient(OpenEhrClientConfig restClientConfig, + TemplateProvider templateProvider, + HttpClient ehrbaseHttpClient) { + return new DefaultRestClient(restClientConfig, templateProvider, ehrbaseHttpClient); } - private HttpClient httpClient() { - var builder = HttpClientBuilder.create(); + @Bean + public HttpClient ehrbaseHttpClient(ObjectProvider<AccessTokenService> accessTokenService) { + HttpClientBuilder builder = HttpClientBuilder.create(); EhrbaseProperties.Security security = properties.getSecurity(); if (security.getType() == EhrbaseProperties.AuthorizationType.BASIC) { CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); - credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(security.getUser(), security.getPassword())); + EhrbaseProperties.User user = security.getUser(); + credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(user.getName(), user.getPassword())); builder.setDefaultCredentialsProvider(credentialsProvider); + } else if (security.getType() == EhrbaseProperties.AuthorizationType.OAUTH2) { + builder.addInterceptorFirst(new TokenAuthenticationInterceptor(accessTokenService.getIfAvailable())); } return builder.build(); } + + @Bean + @ConditionalOnProperty(name = "fhir-bridge.ehrbase.security.type", havingValue = "oauth2") + public AccessTokenService accessTokenService() { + EhrbaseProperties.OAuth2 oauth2 = properties.getSecurity().getOAuth2(); + return new AccessTokenService(oauth2.getTokenUrl(), oauth2.getClientId(), oauth2.getClientSecret()); + } + + @Bean + public EhrbaseTemplateInitializer templateInitializer(ResourceTemplateProvider templateProvider, + DefaultRestClient openEhrClient, + ObjectProvider<AccessTokenService> accessTokenService) { + return new EhrbaseTemplateInitializer(properties, templateProvider, openEhrClient, accessTokenService.getIfAvailable()); + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseProperties.java b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseProperties.java index 5a664a6a4..ca8d07278 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseProperties.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseProperties.java @@ -52,13 +52,9 @@ public static class Security { private AuthorizationType type; - private String user; + private final User user = new User(); - private String password; - - private String adminUser; - - private String adminPassword; + private final OAuth2 oAuth2 = new OAuth2(); public AuthorizationType getType() { return type; @@ -68,12 +64,54 @@ public void setType(AuthorizationType type) { this.type = type; } - public String getUser() { + public User getUser() { return user; } - public void setUser(String user) { - this.user = user; + public OAuth2 getOAuth2() { + return oAuth2; + } + } + + public static class Template { + + private String prefix; + + private boolean forceUpdate; + + public String getPrefix() { + return prefix; + } + + public void setPrefix(String prefix) { + this.prefix = prefix; + } + + public boolean isForceUpdate() { + return forceUpdate; + } + + public void setForceUpdate(boolean forceUpdate) { + this.forceUpdate = forceUpdate; + } + } + + public static class User { + + private String name; + + private String password; + + private String adminName; + + private String adminPassword; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; } public String getPassword() { @@ -84,12 +122,12 @@ public void setPassword(String password) { this.password = password; } - public String getAdminUser() { - return adminUser; + public String getAdminName() { + return adminName; } - public void setAdminUser(String adminUser) { - this.adminUser = adminUser; + public void setAdminName(String adminName) { + this.adminName = adminName; } public String getAdminPassword() { @@ -101,31 +139,42 @@ public void setAdminPassword(String adminPassword) { } } - public static class Template { - private String prefix; + public static class OAuth2 { - private boolean forceUpdate; + private String tokenUrl; - public String getPrefix() { - return prefix; + private String clientId; + + private String clientSecret; + + public String getTokenUrl() { + return tokenUrl; } - public void setPrefix(String prefix) { - this.prefix = prefix; + public void setTokenUrl(String tokenUrl) { + this.tokenUrl = tokenUrl; } - public boolean isForceUpdate() { - return forceUpdate; + public String getClientId() { + return clientId; } - public void setForceUpdate(boolean forceUpdate) { - this.forceUpdate = forceUpdate; + public void setClientId(String clientId) { + this.clientId = clientId; + } + + public String getClientSecret() { + return clientSecret; + } + + public void setClientSecret(String clientSecret) { + this.clientSecret = clientSecret; } } public enum AuthorizationType { - BASIC, NONE + NONE, BASIC, OAUTH2 } } diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseTemplateInitializer.java b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseTemplateInitializer.java index f628aec05..1cacba3cb 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseTemplateInitializer.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/EhrbaseTemplateInitializer.java @@ -24,6 +24,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.InitializingBean; import org.springframework.http.MediaType; +import org.springframework.web.reactive.function.client.ClientRequest; import org.springframework.web.reactive.function.client.ExchangeFilterFunctions; import org.springframework.web.reactive.function.client.WebClient; import org.springframework.web.reactive.function.client.WebClientException; @@ -37,6 +38,7 @@ * * @since 1.0.0 */ +@SuppressWarnings("java:S6212") public class EhrbaseTemplateInitializer implements InitializingBean { private static final Logger LOG = LoggerFactory.getLogger(EhrbaseTemplateInitializer.class); @@ -47,12 +49,15 @@ public class EhrbaseTemplateInitializer implements InitializingBean { private final OpenEhrClient openEhrClient; + private final AccessTokenService accessTokenService; + private final WebClient webClient; - public EhrbaseTemplateInitializer(EhrbaseProperties properties, ResourceTemplateProvider templateProvider, OpenEhrClient openEhrClient) { + public EhrbaseTemplateInitializer(EhrbaseProperties properties, ResourceTemplateProvider templateProvider, OpenEhrClient openEhrClient, AccessTokenService accessTokenService) { this.properties = properties; this.templateProvider = templateProvider; this.openEhrClient = openEhrClient; + this.accessTokenService = accessTokenService; this.webClient = adminWebClient(); } @@ -108,7 +113,12 @@ private WebClient adminWebClient() { var security = properties.getSecurity(); if (security.getType() == EhrbaseProperties.AuthorizationType.BASIC) { - webClientBuilder.filter(ExchangeFilterFunctions.basicAuthentication(security.getAdminUser(), security.getAdminPassword())); + EhrbaseProperties.User user = properties.getSecurity().getUser(); + webClientBuilder.filter(ExchangeFilterFunctions.basicAuthentication(user.getAdminName(), user.getAdminPassword())); + } else if (security.getType() == EhrbaseProperties.AuthorizationType.OAUTH2) { + webClientBuilder.filter((request, next) -> next.exchange(ClientRequest.from(request) + .headers(headers -> headers.setBearerAuth(accessTokenService.getToken())) + .build())); } return webClientBuilder.build(); diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/TokenAuthenticationInterceptor.java b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/TokenAuthenticationInterceptor.java new file mode 100644 index 000000000..253f5afac --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/config/ehrbase/TokenAuthenticationInterceptor.java @@ -0,0 +1,45 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package org.ehrbase.fhirbridge.config.ehrbase; + +import org.apache.http.HttpException; +import org.apache.http.HttpHeaders; +import org.apache.http.HttpRequest; +import org.apache.http.HttpRequestInterceptor; +import org.apache.http.protocol.HttpContext; + +import java.io.IOException; + +/** + * {@link HttpRequestInterceptor} implementation that handles Authorization header using Bearer token. + * + * @since 1.2.0 + */ +public class TokenAuthenticationInterceptor implements HttpRequestInterceptor { + + private final AccessTokenService accessTokenService; + + public TokenAuthenticationInterceptor(AccessTokenService accessTokenService) { + this.accessTokenService = accessTokenService; + } + + @Override + public void process(HttpRequest httpRequest, HttpContext httpContext) throws HttpException, IOException { + httpRequest.setHeader(HttpHeaders.AUTHORIZATION, "Bearer " + accessTokenService.getToken()); + } +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 567ab9a48..c9b176134 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -20,10 +20,15 @@ fhir-bridge: base-url: http://localhost:8080/ehrbase/rest/openehr/v1/ security: type: basic - user: myuser - password: myPassword432 - admin-user: myadmin - admin-password: mySuperAwesomePassword123 + user: + name: myuser + password: myPassword432 + admin-name: myadmin + admin-password: mySuperAwesomePassword123 +# oauth2: +# token-url: +# client-id: +# client-secret: template: prefix: classpath:/opt/ force-update: false From 5c05b4e82bcb131267ca0961788c0ba4be51848a Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Wed, 30 Jun 2021 12:14:39 +0200 Subject: [PATCH 109/141] updated immunization --- .../ImpfstatusComposition.java | 2 +- .../definition/ImpfungAction.java | 2 +- .../ImpfungImpfungGegenElement.java | 2 +- .../UnbekannterImpfstatusEvaluation.java | 2 +- .../definition/VerabreichteDosenCluster.java | 2 +- ...e-immunization-for-patient-complete-2.json | 50 +++++++++++ ...e-immunization-for-patient-complete-3.json | 50 +++++++++++ ...e-immunization-for-patient-complete-4.json | 34 ++++++++ ...e-immunization-for-patient-complete-5.json | 50 +++++++++++ ...ate-immunization-for-patient-complete.json | 82 ++++++++++--------- ...ate-immunization-for-patient-not-done.json | 6 +- 11 files changed, 237 insertions(+), 45 deletions(-) create mode 100644 src/test/resources/Immunization/create-immunization-for-patient-complete-2.json create mode 100644 src/test/resources/Immunization/create-immunization-for-patient-complete-3.json create mode 100644 src/test/resources/Immunization/create-immunization-for-patient-complete-4.json create mode 100644 src/test/resources/Immunization/create-immunization-for-patient-complete-5.json diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java index 167f841e7..d29138ee1 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java @@ -28,7 +28,7 @@ @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T17:09:24.092597+02:00", + date = "2021-06-30T11:44:02.722457+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @Template("Impfstatus") diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungAction.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungAction.java index 93c3be4b9..5c9010850 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungAction.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungAction.java @@ -18,7 +18,7 @@ @Archetype("openEHR-EHR-ACTION.medication.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T17:09:24.124296+02:00", + date = "2021-06-30T11:44:02.752999+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class ImpfungAction implements EntryEntity { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungImpfungGegenElement.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungImpfungGegenElement.java index 1763ff337..091c25d82 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungImpfungGegenElement.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/ImpfungImpfungGegenElement.java @@ -10,7 +10,7 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T17:09:24.167218+02:00", + date = "2021-06-30T11:44:02.795736+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class ImpfungImpfungGegenElement implements LocatableEntity { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluation.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluation.java index 3a7f665f7..58a97a871 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluation.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/UnbekannterImpfstatusEvaluation.java @@ -16,7 +16,7 @@ @Archetype("openEHR-EHR-EVALUATION.absence.v2") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T17:09:24.181128+02:00", + date = "2021-06-30T11:44:02.806658+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class UnbekannterImpfstatusEvaluation implements EntryEntity { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenCluster.java index d75ede7f3..181e7cbb2 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenCluster.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/definition/VerabreichteDosenCluster.java @@ -17,7 +17,7 @@ @Archetype("openEHR-EHR-CLUSTER.dosage.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-05-04T17:09:24.160617+02:00", + date = "2021-06-30T11:44:02.790384+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class VerabreichteDosenCluster implements LocatableEntity { diff --git a/src/test/resources/Immunization/create-immunization-for-patient-complete-2.json b/src/test/resources/Immunization/create-immunization-for-patient-complete-2.json new file mode 100644 index 000000000..bb4a8e0f3 --- /dev/null +++ b/src/test/resources/Immunization/create-immunization-for-patient-complete-2.json @@ -0,0 +1,50 @@ +{ + "resourceType": "Immunization", + "id": "c17f192c-f765-4729-818a-4ee55be5c87b", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization" + ] + }, + "status": "completed", + "vaccineCode": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "1119349007", + "display": "Vaccine product containing only Severe acute respiratory syndrome coronavirus 2 messenger ribonucleic acid (medicinal product)" + } + ] + }, + "patient": { + "reference": "Patient/21acfc9c-1fd6-43e6-a8fe-c6b6341b0fab", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "occurrenceDateTime": "2020-12-27", + "protocolApplied": [ + { + "targetDisease": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "840539006", + "display": "Disease caused by Severe acute respiratory syndrome coronavirus 2 (disorder)" + } + ] + } + ], + "_doseNumberString": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/src/test/resources/Immunization/create-immunization-for-patient-complete-3.json b/src/test/resources/Immunization/create-immunization-for-patient-complete-3.json new file mode 100644 index 000000000..54b014527 --- /dev/null +++ b/src/test/resources/Immunization/create-immunization-for-patient-complete-3.json @@ -0,0 +1,50 @@ +{ + "resourceType": "Immunization", + "id": "85bd2fab-256b-43d6-9671-4f97c1407d0f", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization" + ] + }, + "status": "completed", + "vaccineCode": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "333598008", + "display": "Pneumococcal vaccine" + } + ] + }, + "patient": { + "reference": "Patient/c786ac3c-0579-4aa2-adda-db784b214ad6", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "occurrenceDateTime": "2020-10-06", + "protocolApplied": [ + { + "targetDisease": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "16814004", + "display": "Pneumococcal infectious disease" + } + ] + } + ], + "_doseNumberString": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/src/test/resources/Immunization/create-immunization-for-patient-complete-4.json b/src/test/resources/Immunization/create-immunization-for-patient-complete-4.json new file mode 100644 index 000000000..f3162ef2b --- /dev/null +++ b/src/test/resources/Immunization/create-immunization-for-patient-complete-4.json @@ -0,0 +1,34 @@ +{ + "resourceType": "Immunization", + "id": "b7db30a0-4ffd-4dd6-b3e5-53e2730789e6", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization" + ] + }, + "status": "not-done", + "vaccineCode": { + "coding": [ + { + "system": "http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips", + "code": "no-known-immunizations", + "display": "No known immunizations" + } + ] + }, + "patient": { + "reference": "Patient/c786ac3c-0579-4aa2-adda-db784b214ad6", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "_occurrenceDateTime": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + } +} \ No newline at end of file diff --git a/src/test/resources/Immunization/create-immunization-for-patient-complete-5.json b/src/test/resources/Immunization/create-immunization-for-patient-complete-5.json new file mode 100644 index 000000000..bb4a8e0f3 --- /dev/null +++ b/src/test/resources/Immunization/create-immunization-for-patient-complete-5.json @@ -0,0 +1,50 @@ +{ + "resourceType": "Immunization", + "id": "c17f192c-f765-4729-818a-4ee55be5c87b", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization" + ] + }, + "status": "completed", + "vaccineCode": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "1119349007", + "display": "Vaccine product containing only Severe acute respiratory syndrome coronavirus 2 messenger ribonucleic acid (medicinal product)" + } + ] + }, + "patient": { + "reference": "Patient/21acfc9c-1fd6-43e6-a8fe-c6b6341b0fab", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "occurrenceDateTime": "2020-12-27", + "protocolApplied": [ + { + "targetDisease": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "840539006", + "display": "Disease caused by Severe acute respiratory syndrome coronavirus 2 (disorder)" + } + ] + } + ], + "_doseNumberString": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/src/test/resources/Immunization/create-immunization-for-patient-complete.json b/src/test/resources/Immunization/create-immunization-for-patient-complete.json index 4435da64a..eabf4989e 100644 --- a/src/test/resources/Immunization/create-immunization-for-patient-complete.json +++ b/src/test/resources/Immunization/create-immunization-for-patient-complete.json @@ -1,46 +1,50 @@ { - "id": "85bd2fab-256b-43d6-9671-4f97c1407d0f", - "meta": { - "profile": [ - "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization" - ] - }, - "occurrenceDateTime": "2020-10-06", - "patient": { - "reference": "Patient/c786ac3c-0579-4aa2-adda-db784b214ad6" - }, - "protocolApplied": [ - { - "_doseNumberString": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", - "valueCode": "unknown" - } - ] - }, - "targetDisease": [ + "id": "85bd2fab-256b-43d6-9671-4f97c1407d0f", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization" + ] + }, + "occurrenceDateTime": "2020-10-06", + "patient": { + "reference": "Patient/c786ac3c-0579-4aa2-adda-db784b214ad6", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "protocolApplied": [ + { + "_doseNumberString": { + "extension": [ { - "coding": [ - { - "code": "16814004", - "display": "Pneumococcal infectious disease", - "system": "http://snomed.info/sct" - } - ] + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" } ] - } - ], - "status": "completed", - "vaccineCode": { - "coding": [ + }, + "targetDisease": [ { - "code": "333598008", - "display": "Pneumococcal vaccine", - "system": "http://snomed.info/sct" + "coding": [ + { + "code": "16814004", + "display": "Pneumococcal infectious disease", + "system": "http://snomed.info/sct" + } + ] } ] - }, - "resourceType": "Immunization" - } \ No newline at end of file + } + ], + "status": "completed", + "vaccineCode": { + "coding": [ + { + "code": "333598008", + "display": "Pneumococcal vaccine", + "system": "http://snomed.info/sct" + } + ] + }, + "resourceType": "Immunization" +} \ No newline at end of file diff --git a/src/test/resources/Immunization/create-immunization-for-patient-not-done.json b/src/test/resources/Immunization/create-immunization-for-patient-not-done.json index 6933061f2..1ada25e04 100644 --- a/src/test/resources/Immunization/create-immunization-for-patient-not-done.json +++ b/src/test/resources/Immunization/create-immunization-for-patient-not-done.json @@ -14,7 +14,11 @@ ] }, "patient": { - "reference": "Patient/c786ac3c-0579-4aa2-adda-db784b214ad6" + "reference": "Patient/c786ac3c-0579-4aa2-adda-db784b214ad6", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } }, "status": "not-done", "vaccineCode": { From c083dfa72f97d1d20644f71526834a0449576da2 Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Wed, 30 Jun 2021 13:15:43 +0200 Subject: [PATCH 110/141] finished --- .../fhir-bridge.postman_collection.json | 223 ++++++++++++++++-- .../ImpfstatusCompositionConverter.java | 2 +- .../impfstatus/ImpfungActionConverter.java | 8 +- .../immunization/HistoryOfVaccinationIT.java | 78 +++++- ...e-immunization-for-patient-complete-4.json | 42 +++- ...e-immunization-for-patient-complete-5.json | 50 ---- .../invalid-impstoff-defining-code.json | 50 ++++ .../invalid-target-disease-code-missing.json | 27 +++ .../invalid-target-disease-snomed-code.json | 50 ++++ .../invalid-target-disease-system.json | 50 ++++ ...e-immunization-for-patient-complete-2.json | 172 ++++++++++++++ ...e-immunization-for-patient-complete-3.json | 172 ++++++++++++++ ...e-immunization-for-patient-complete-4.json | 172 ++++++++++++++ ...ate-immunization-for-patient-complete.json | 172 ++++++++++++++ ...ate-immunization-for-patient-not-done.json | 134 +++++++++++ 15 files changed, 1308 insertions(+), 94 deletions(-) delete mode 100644 src/test/resources/Immunization/create-immunization-for-patient-complete-5.json create mode 100644 src/test/resources/Immunization/invalid-impstoff-defining-code.json create mode 100644 src/test/resources/Immunization/invalid-target-disease-code-missing.json create mode 100644 src/test/resources/Immunization/invalid-target-disease-snomed-code.json create mode 100644 src/test/resources/Immunization/invalid-target-disease-system.json create mode 100644 src/test/resources/Immunization/paragon-create-immunization-for-patient-complete-2.json create mode 100644 src/test/resources/Immunization/paragon-create-immunization-for-patient-complete-3.json create mode 100644 src/test/resources/Immunization/paragon-create-immunization-for-patient-complete-4.json create mode 100644 src/test/resources/Immunization/paragon-create-immunization-for-patient-complete.json create mode 100644 src/test/resources/Immunization/paragon-create-immunization-for-patient-not-done.json diff --git a/config/postman/fhir-bridge.postman_collection.json b/config/postman/fhir-bridge.postman_collection.json index a50f13f7c..f1505ae76 100644 --- a/config/postman/fhir-bridge.postman_collection.json +++ b/config/postman/fhir-bridge.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "88670883-eab4-4d74-adc2-600bdf47800e", + "_postman_id": "b9895344-5b62-4abf-9a03-aad8d8284d41", "name": "fhir-bridge", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, @@ -217,6 +217,32 @@ } }, "response": [] + }, + { + "name": "AntiBodyPanel", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"Bundle\",\n \"id\": \"bundle-transaction-bga\",\n \"meta\": {\n \"lastUpdated\": \"2020-09-24T05:33:00Z\"\n },\n \"type\": \"transaction\",\n \"entry\": [\n {\n \"fullUrl\": \"urn:uuid:220767b9-5760-40b8-8741-8772dae04c3f\",\n \"resource\": {\n \"resourceType\": \"Observation\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-ab-pnl-ser-pl-ia\"\n ]\n },\n \"identifier\": [\n {\n \"type\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n \"code\": \"OBI\"\n }\n ]\n },\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\n \"value\": \"94504-8_SARS-CoV-2-Ab-Panel\",\n \"assigner\": {\n \"reference\": \"Organization/Charité\"\n }\n }\n ],\n \"status\": \"final\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"26436-6\"\n },\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n \"code\": \"laboratory\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"94504-8\",\n \"display\": \"SARS-CoV-2 (COVID-19) Ab panel - Serum or Plasma by Immunoassay\"\n }\n ],\n \"text\": \"SARS-CoV-2 antibodies panel\"\n },\n \"subject\": {\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\",\n \"hasMember\": [\n {\n \"reference\": \"urn:uuid:22732de8-3eb6-477e-81d6-28fb906b3e4e\"\n },\n {\n \"reference\": \"urn:uuid:70ca7d00-0d8b-42bb-9508-a8fc76e5c7ad\"\n },\n {\n \"reference\": \"urn:uuid:7e746710-fad4-474b-8a28-422863f3a2b8\"\n },\n {\n \"reference\": \"urn:uuid:f35f17da-f642-402d-8cf4-ff70607713a7\"\n },\n {\n \"reference\": \"urn:uuid:7297b0fd-3be7-4b88-a63a-6ba651152c41\"\n },\n {\n \"reference\": \"urn:uuid:da1fa3fe-a8a3-44b6-94c6-3497269436ec\"\n },\n {\n \"reference\": \"urn:uuid:b5adbc53-a1ee-4a57-9ede-fae4b4462bfb\"\n },\n {\n \"reference\": \"urn:uuid:b08b1687-2ea1-4b14-9473-dd04389169ec\"\n }\n ]\n },\n \"request\": {\n \"method\": \"POST\",\n \"url\": \"Observation\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:70ca7d00-0d8b-42bb-9508-a8fc76e5c7ad\",\n \"resource\": {\n \"resourceType\": \"Observation\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-ab-ser-pl-ql-ia\"\n ]\n },\n \"identifier\": [\n {\n \"type\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n \"code\": \"OBI\"\n }\n ]\n },\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\n \"value\": \"94762-2_SARS-CoV-2-Ab-Ql\",\n \"assigner\": {\n \"reference\": \"Organization/Charité\"\n }\n }\n ],\n \"status\": \"final\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"26436-6\"\n },\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n \"code\": \"laboratory\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"94762-2\",\n \"display\": \"SARS-CoV-2 (COVID-19) Ab [Presence] in Serum or Plasma by Immunoassay\"\n }\n ],\n \"text\": \"SARS-CoV-2 antibodies qualitative\"\n },\n \"subject\": {\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"260373001\",\n \"display\": \"Detected (qualifier value)\"\n }\n ]\n }\n },\n \"request\": {\n \"method\": \"POST\",\n \"url\": \"Observation\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:22732de8-3eb6-477e-81d6-28fb906b3e4e\",\n \"resource\": {\n \"resourceType\": \"Observation\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-ab-ser-pl-ia-acnc\"\n ]\n },\n \"identifier\": [\n {\n \"type\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n \"code\": \"OBI\"\n }\n ]\n },\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\n \"value\": \"94769-7_SARS-CoV-2-Ab-Qn\",\n \"assigner\": {\n \"reference\": \"Organization/Charité\"\n }\n }\n ],\n \"status\": \"final\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"26436-6\"\n },\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n \"code\": \"laboratory\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"94769-7\",\n \"display\": \"SARS-CoV-2 (COVID-19) Ab [Units/volume] in Serum or Plasma by Immunoassay\"\n }\n ],\n \"text\": \"SARS-CoV-2 antibodies quantitative\"\n },\n \"subject\": {\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\",\n \"valueQuantity\": {\n \"value\": 240,\n \"unit\": \"[IU]/mL\",\n \"system\": \"http://unitsofmeasure.org\",\n \"code\": \"[IU]/mL\"\n }\n },\n \"request\": {\n \"method\": \"POST\",\n \"url\": \"Observation\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:7e746710-fad4-474b-8a28-422863f3a2b8\",\n \"resource\": {\n \"resourceType\": \"Observation\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-iga-ser-pl-ia-acnc\"\n ]\n },\n \"identifier\": [\n {\n \"type\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n \"code\": \"OBI\"\n }\n ]\n },\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\n \"value\": \"94720-0_SARS-CoV-2-IgA-Qn\",\n \"assigner\": {\n \"reference\": \"Organization/Charité\"\n }\n }\n ],\n \"status\": \"final\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"26436-6\"\n },\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n \"code\": \"laboratory\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"94720-0\",\n \"display\": \"SARS-CoV-2 (COVID-19) IgA Ab [Units/volume] in Serum or Plasma by Immunoassay\"\n }\n ],\n \"text\": \"SARS-CoV-2 IgA antibodies quantitative\"\n },\n \"subject\": {\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\",\n \"valueQuantity\": {\n \"value\": 0.5,\n \"unit\": \"[IU]/mL\",\n \"system\": \"http://unitsofmeasure.org\",\n \"code\": \"[IU]/mL\"\n }\n },\n \"request\": {\n \"method\": \"POST\",\n \"url\": \"Observation\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:f35f17da-f642-402d-8cf4-ff70607713a7\",\n \"resource\": {\n \"resourceType\": \"Observation\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-iga-ser-pl-ql-ia\"\n ]\n },\n \"identifier\": [\n {\n \"type\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n \"code\": \"OBI\"\n }\n ]\n },\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\n \"value\": \"94562-6_SARS-CoV-2-IgA-Ql\",\n \"assigner\": {\n \"reference\": \"Organization/Charité\"\n }\n }\n ],\n \"status\": \"final\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"26436-6\"\n },\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n \"code\": \"laboratory\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"94562-6\",\n \"display\": \"SARS-CoV-2 (COVID-19) IgA Ab [Presence] in Serum or Plasma by Immunoassay\"\n }\n ],\n \"text\": \"SARS-CoV-2 IgA antibodies qualitative\"\n },\n \"subject\": {\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"260373001\",\n \"display\": \"Detected (qualifier value)\"\n }\n ]\n }\n },\n \"request\": {\n \"method\": \"POST\",\n \"url\": \"Observation\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:7297b0fd-3be7-4b88-a63a-6ba651152c41\",\n \"resource\": {\n \"resourceType\": \"Observation\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-igg-ser-pl-ia-acnc\"\n ]\n },\n \"identifier\": [\n {\n \"type\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n \"code\": \"OBI\"\n }\n ]\n },\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\n \"value\": \"94505-5_SARS-CoV-2-IgG-Qn\",\n \"assigner\": {\n \"reference\": \"Organization/Charité\"\n }\n }\n ],\n \"status\": \"final\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"26436-6\"\n },\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n \"code\": \"laboratory\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"94505-5\",\n \"display\": \"SARS-CoV-2 (COVID-19) IgG Ab [Units/volume] in Serum or Plasma by Immunoassay\"\n }\n ],\n \"text\": \"SARS-CoV-2 IgG antibodies quantitative\"\n },\n \"subject\": {\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\",\n \"valueQuantity\": {\n \"value\": 20,\n \"unit\": \"[arb'U]/mL\",\n \"system\": \"http://unitsofmeasure.org\",\n \"code\": \"[arb'U]/mL\"\n }\n },\n \"request\": {\n \"method\": \"POST\",\n \"url\": \"Observation\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:da1fa3fe-a8a3-44b6-94c6-3497269436ec\",\n \"resource\": {\n \"resourceType\": \"Observation\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-igg-ser-pl-ql-ia\"\n ]\n },\n \"identifier\": [\n {\n \"type\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n \"code\": \"OBI\"\n }\n ]\n },\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\n \"value\": \"94563-4_SARS-CoV-2-IgG-Ql\",\n \"assigner\": {\n \"reference\": \"Organization/Charité\"\n }\n }\n ],\n \"status\": \"final\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"26436-6\"\n },\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n \"code\": \"laboratory\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"94563-4\",\n \"display\": \"SARS-CoV-2 (COVID-19) IgG Ab [Presence] in Serum or Plasma by Immunoassay\"\n }\n ],\n \"text\": \"SARS-CoV-2 IgG antibodies qualitative\"\n },\n \"subject\": {\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"260373001\",\n \"display\": \"Detected (qualifier value)\"\n }\n ]\n }\n },\n \"request\": {\n \"method\": \"POST\",\n \"url\": \"Observation\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:b5adbc53-a1ee-4a57-9ede-fae4b4462bfb\",\n \"resource\": {\n \"resourceType\": \"Observation\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-igm-ser-pl-ia-acnc\"\n ]\n },\n \"identifier\": [\n {\n \"type\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n \"code\": \"OBI\"\n }\n ]\n },\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\n \"value\": \"94505-5_SARS-CoV-2-IgM-Qn\",\n \"assigner\": {\n \"reference\": \"Organization/Charité\"\n }\n }\n ],\n \"status\": \"final\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"26436-6\"\n },\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n \"code\": \"laboratory\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"94506-3\",\n \"display\": \"SARS-CoV-2 (COVID-19) IgM Ab [Units/volume] in Serum or Plasma by Immunoassay\"\n }\n ],\n \"text\": \"SARS-CoV-2 IgM antibodies quantitative\"\n },\n \"subject\": {\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\",\n \"valueQuantity\": {\n \"value\": 219.5,\n \"unit\": \"[arb'U]/mL\",\n \"system\": \"http://unitsofmeasure.org\",\n \"code\": \"[arb'U]/mL\"\n }\n },\n \"request\": {\n \"method\": \"POST\",\n \"url\": \"Observation\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:b08b1687-2ea1-4b14-9473-dd04389169ec\",\n \"resource\": {\n \"resourceType\": \"Observation\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-igm-ser-pl-ql-ia\"\n ]\n },\n \"identifier\": [\n {\n \"type\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n \"code\": \"OBI\"\n }\n ]\n },\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\n \"value\": \"94564-2_SARS-CoV-2-IgM-Ql\",\n \"assigner\": {\n \"reference\": \"Organization/Charité\"\n }\n }\n ],\n \"status\": \"final\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"26436-6\"\n },\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n \"code\": \"laboratory\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"94564-2\",\n \"display\": \"SARS-CoV-2 (COVID-19) IgM Ab [Presence] in Serum or Plasma by Immunoassay\"\n }\n ],\n \"text\": \"SARS-CoV-2 IgM antibodies qualitative\"\n },\n \"subject\": {\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"260373001\",\n \"display\": \"Detected (qualifier value)\"\n }\n ]\n }\n },\n \"request\": {\n \"method\": \"POST\",\n \"url\": \"Observation\"\n }\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir" + ] + } + }, + "response": [] } ] }, @@ -1007,31 +1033,15 @@ } }, "response": [] - } - ] - }, - { - "name": "Immunization", - "item": [ + }, { - "name": "Create Immunization", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript" - } - } - ], + "name": "Create Radiologischer Befund", "request": { "method": "POST", "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"id\": \"85bd2fab-256b-43d6-9671-4f97c1407d0f\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization\"\r\n ]\r\n },\r\n \"occurrenceDateTime\": \"2020-10-06\",\r\n \"patient\": {\r\n \"reference\": \"/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}\",\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"protocolApplied\": [\r\n {\r\n \"_doseNumberString\": {\r\n \"extension\": [\r\n {\r\n \"url\": \"http://hl7.org/fhir/StructureDefinition/data-absent-reason\",\r\n \"valueCode\": \"unknown\"\r\n }\r\n ]\r\n },\r\n \"targetDisease\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"code\": \"16814004\",\r\n \"display\": \"Pneumococcal infectious disease\",\r\n \"system\": \"http://snomed.info/sct\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"status\": \"completed\",\r\n \"vaccineCode\": {\r\n \"coding\": [\r\n {\r\n \"code\": \"333598008\",\r\n \"display\": \"Pneumococcal vaccine\",\r\n \"system\": \"http://snomed.info/sct\"\r\n }\r\n ]\r\n },\r\n \"resourceType\": \"Immunization\"\r\n}", + "raw": "{\n \"resourceType\": \"DiagnosticReport\",\n \"id\": \"29cd7bc6-2b7b-44b9-8242-3d05fabd3e6a\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/diagnostic-report-radiology\"\n ]\n },\n \"status\": \"final\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"18726-0\",\n \"display\": \"Radiology studies (set)\"\n },\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0074\",\n \"code\": \"RAD\",\n \"display\": \"Radiology\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"18748-4\",\n \"display\": \"Diagnostic imaging study\"\n }\n ]\n },\n \"subject\": {\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"effectiveDateTime\": \"2020-09-30\",\n \"conclusion\": \"Unspezifischer Befund\",\n \"conclusionCode\": [\n {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"118247008:363713009=373068000\",\n \"display\": \"|Radiologic finding (finding)|:|Has interpretation (attribute)|=|Undetermined (qualifier value)|\"\n }\n ]\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -1039,18 +1049,23 @@ } }, "url": { - "raw": "{{baseUrl}}/fhir/Immunization", + "raw": "{{baseUrl}}/fhir/DiagnosticReport", "host": [ "{{baseUrl}}" ], "path": [ "fhir", - "Immunization" + "DiagnosticReport" ] } }, "response": [] - }, + } + ] + }, + { + "name": "Immunization", + "item": [ { "name": "Find Immunization: read", "event": [ @@ -1283,6 +1298,141 @@ } }, "response": [] + }, + { + "name": "Create Immunization", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"id\": \"b7db30a0-4ffd-4dd6-b3e5-53e2730789e6\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization\"\n ]\n },\n \"_occurrenceDateTime\": {\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/data-absent-reason\",\n \"valueCode\": \"unknown\"\n }\n ]\n },\n \"patient\": {\n \"reference\": \"Patient/c786ac3c-0579-4aa2-adda-db784b214ad6\",\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"status\": \"not-done\",\n \"vaccineCode\": {\n \"coding\": [\n {\n \"code\": \"no-known-immunizations\",\n \"display\": \"No known immunizations\",\n \"system\": \"http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips\"\n }\n ]\n },\n \"resourceType\": \"Immunization\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Immunization", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization" + ] + } + }, + "response": [] + }, + { + "name": "Create Immunization 2", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"Immunization\",\n \"id\": \"c17f192c-f765-4729-818a-4ee55be5c87b\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization\"\n ]\n },\n \"status\": \"completed\",\n \"vaccineCode\": {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"1119349007\",\n \"display\": \"Vaccine product containing only Severe acute respiratory syndrome coronavirus 2 messenger ribonucleic acid (medicinal product)\"\n }\n ]\n },\n \"patient\": {\n \"reference\": \"Patient/21acfc9c-1fd6-43e6-a8fe-c6b6341b0fab\",\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"occurrenceDateTime\": \"2020-12-27\",\n \"protocolApplied\": [\n {\n \"targetDisease\": [\n {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"840539006\",\n \"display\": \"Disease caused by Severe acute respiratory syndrome coronavirus 2 (disorder)\"\n }\n ]\n }\n ],\n \"_doseNumberString\": {\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/data-absent-reason\",\n \"valueCode\": \"unknown\"\n }\n ]\n }\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Immunization", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization" + ] + } + }, + "response": [] + }, + { + "name": "Create Immunization 3", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"Immunization\",\n \"id\": \"85bd2fab-256b-43d6-9671-4f97c1407d0f\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization\"\n ]\n },\n \"status\": \"completed\",\n \"vaccineCode\": {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"333598008\",\n \"display\": \"Pneumococcal vaccine\"\n }\n ]\n },\n \"patient\": {\n \"reference\": \"Patient/c786ac3c-0579-4aa2-adda-db784b214ad6\",\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"occurrenceDateTime\": \"2020-10-06\",\n \"protocolApplied\": [\n {\n \"targetDisease\": [\n {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"16814004\",\n \"display\": \"Pneumococcal infectious disease\"\n }\n ]\n }\n ],\n \"_doseNumberString\": {\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/data-absent-reason\",\n \"valueCode\": \"unknown\"\n }\n ]\n }\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Immunization", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization" + ] + } + }, + "response": [] + }, + { + "name": "Create Immunization 4", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"Immunization\",\n \"id\": \"c17f192c-f765-4729-818a-4ee55be5c87b\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization\"\n ]\n },\n \"status\": \"completed\",\n \"vaccineCode\": {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"1119349007\",\n \"display\": \"Vaccine product containing only Severe acute respiratory syndrome coronavirus 2 messenger ribonucleic acid (medicinal product)\"\n }\n ]\n },\n \"patient\": {\n \"reference\": \"Patient/21acfc9c-1fd6-43e6-a8fe-c6b6341b0fab\",\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"occurrenceDateTime\": \"2020-12-27\",\n \"protocolApplied\": [\n {\n \"targetDisease\": [\n {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"840539006\",\n \"display\": \"Disease caused by Severe acute respiratory syndrome coronavirus 2 (disorder)\"\n }\n ]\n }\n ],\n \"_doseNumberString\": {\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/data-absent-reason\",\n \"valueCode\": \"unknown\"\n }\n ]\n }\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Immunization", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization" + ] + } + }, + "response": [] + }, + { + "name": "Create Immunization not done", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"id\": \"b7db30a0-4ffd-4dd6-b3e5-53e2730789e6\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization\"\n ]\n },\n \"_occurrenceDateTime\": {\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/data-absent-reason\",\n \"valueCode\": \"unknown\"\n }\n ]\n },\n \"patient\": {\n \"reference\": \"Patient/c786ac3c-0579-4aa2-adda-db784b214ad6\",\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"status\": \"not-done\",\n \"vaccineCode\": {\n \"coding\": [\n {\n \"code\": \"no-known-immunizations\",\n \"display\": \"No known immunizations\",\n \"system\": \"http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips\"\n }\n ]\n },\n \"resourceType\": \"Immunization\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Immunization", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization" + ] + } + }, + "response": [] } ] }, @@ -3310,6 +3460,33 @@ } }, "response": [] + }, + { + "name": "Create D4L_Questionnaire", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"questionnaire\": \"http://fhir.data4life.care/covid-19/r4/Questionnaire/covid19-recommendation|3.0.0\",\n \"status\": \"completed\",\n \"authored\": \"2020-05-04T14:15:00-05:00\",\n \"subject\": {\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"item\": [\n {\n \"linkId\": \"P\",\n \"text\": \"Persönliche Informationen\",\n \"item\": [\n {\n \"linkId\": \"P0\",\n \"text\": \"Wie alt sind Sie?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://fhir.data4life.care/covid-19/r4/CodeSystem/age-group\",\n \"code\": \"61-70\"\n }\n }\n ]\n },\n {\n \"linkId\": \"P1\",\n \"text\": \"Sind Sie älter oder gleich 65 Jahre alt?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA33-6\"\n }\n }\n ]\n },\n {\n \"linkId\": \"P2\",\n \"text\": \"Wie ist Ihre aktuelle Wohnsituation?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA6255-9\"\n }\n }\n ]\n },\n {\n \"linkId\": \"P3\",\n \"text\": \"Pflegen oder unterstützen Sie privat mindestens einmal pro Woche eine oder mehrere Personen mit altersbedingten Beschwerden, chronischen Erkrankungen oder Gebrechlichkeit?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"P4\",\n \"text\": \"Sind Sie in einem der folgenden Bereiche tätig?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://fhir.data4life.care/covid-19/r4/CodeSystem/occupation-class\",\n \"code\": \"community\"\n }\n }\n ]\n },\n {\n \"linkId\": \"P5\",\n \"text\": \"Rauchen Sie?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"P6\",\n \"text\": \"Sind Sie schwanger?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA26683-5\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"C\",\n \"text\": \"Kontakte zu COVID-19-Fällen\",\n \"item\": [\n {\n \"linkId\": \"C0\",\n \"text\": \"Hatten Sie engen Kontakt zu einem bestätigten Fall?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA33-6\"\n }\n }\n ]\n },\n {\n \"linkId\": \"CZ\",\n \"text\": \"An welchem Tag war der letzte Kontakt?\",\n \"answer\": [\n {\n \"valueDate\": \"2020-03-27\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"S\",\n \"text\": \"Symptome\",\n \"item\": [\n {\n \"linkId\": \"S0\",\n \"text\": \"Hatten Sie in den letzten 24 Std. Fieber (über 38°C)?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"S1\",\n \"text\": \"Hatten Sie in den letzten 4 Tagen Fieber (über 38°C)?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA33-6\"\n }\n }\n ]\n },\n {\n \"linkId\": \"S2\",\n \"text\": \"Wie hoch war die höchste Temperatur ca.?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://fhir.data4life.care/covid-19/r4/CodeSystem/fever-class\",\n \"code\": \"40C\"\n }\n }\n ]\n },\n {\n \"linkId\": \"S3\",\n \"text\": \"Hatten Sie in den letzten 24 Std. Schüttelfrost?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"S4\",\n \"text\": \"Haben Sie sich in den letzten 24 Std. schlapp oder abgeschlagen gefühlt?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA33-6\"\n }\n }\n ]\n },\n {\n \"linkId\": \"S5\",\n \"text\": \"Hatten Sie in den letzten 24 Std. Gliederschmerzen?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"S6\",\n \"text\": \"Hatten Sie in den letzten 24 Std. anhaltenden Husten?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA33-6\"\n }\n }\n ]\n },\n {\n \"linkId\": \"S7\",\n \"text\": \"Hatten Sie in den letzten 24 Std. Schnupfen?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"S8\",\n \"text\": \"Hatten Sie in den letzten 24 Std. Durchfall?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"S9\",\n \"text\": \"Hatten Sie in den letzten 24 Std. Halsschmerzen?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA33-6\"\n }\n }\n ]\n },\n {\n \"linkId\": \"SA\",\n \"text\": \"Hatten Sie in den letzten 24 Std. Kopfschmerzen?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"SB\",\n \"text\": \"Sind Sie in den letzten 24 Std. schneller außer Atem als sonst?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"SC\",\n \"text\": \"Hatten Sie in den letzten 24 Std. Geschmacks- und/oder Geruchsverlust?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"SZ\",\n \"text\": \"Bezogen auf alle Fragen zu Symptomen: Seit wann haben Sie die von Ihnen angegebenen Symptome?\",\n \"answer\": [\n {\n \"valueDate\": \"2020-03-30\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"D\",\n \"text\": \"Kronische Erkrankungen\",\n \"item\": [\n {\n \"linkId\": \"D0\",\n \"text\": \"Wurde bei Ihnen durch einen Arzt/eine Ärztin eine chronische Lungenerkrankung festgestellt?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"D1\",\n \"text\": \"Wurde bei Ihnen durch einen Arzt/eine Ärztin Diabetes festgestellt?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA33-6\"\n }\n }\n ]\n },\n {\n \"linkId\": \"D2\",\n \"text\": \"Wurde bei Ihnen durch einen Arzt/eine Ärztin eine Herzerkrankung festgestellt?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"D3\",\n \"text\": \"Wurde bei Ihnen durch einen Arzt/eine Ärztin Adipositas (Fettsucht) festgestellt?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"M\",\n \"text\": \"Medikation\",\n \"item\": [\n {\n \"linkId\": \"M0\",\n \"text\": \"Nehmen Sie aktuell Cortison ein (in Tablettenform)?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"M1\",\n \"text\": \"Nehmen Sie aktuell Immunsuppressiva?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"M2\",\n \"text\": \"Haben Sie sich im Zeitraum von Oktober 2019 bis heute gegen Grippe impfen lassen?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA33-6\"\n }\n }\n ]\n }\n ]\n }\n ],\n \"language\": \"de\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/QuestionnaireResponse", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "QuestionnaireResponse" + ] + } + }, + "response": [] } ] } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfstatusCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfstatusCompositionConverter.java index 000c91db0..99cbef230 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfstatusCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfstatusCompositionConverter.java @@ -15,7 +15,7 @@ public class ImpfstatusCompositionConverter extends ImmunizationToCompositionCon @Override protected ImpfstatusComposition convertInternal(Immunization resource) { ImpfstatusComposition impfstatusComposition = new ImpfstatusComposition(); - if(!resource.getOccurrenceDateTimeType().hasExtension() || resource.getVaccineCode().getCoding().get(0).getSystem().equals("http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips")){ + if(!resource.getOccurrenceDateTimeType().hasExtension() || !resource.getVaccineCode().getCoding().get(0).getSystem().equals("http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips")){ impfstatusComposition.setImpfung(List.of(new ImpfungActionConverter().convert(resource))); }else{ impfstatusComposition.setUnbekannterImpfstatus(new UnbekannterImpfstatusEvaluationConverter().convert(resource)); diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfungActionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfungActionConverter.java index 93b737672..cb210d49d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfungActionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/impfstatus/ImpfungActionConverter.java @@ -31,12 +31,12 @@ private CurrentStateDefiningCode mapCurentState(Immunization resource) { String statusCode = resource.getStatus().toCode(); if (statusCode.equals(CurrentStateDefiningCode.ABORTED.getValue())) { return CurrentStateDefiningCode.ABORTED; - }else if (statusCode.equals(CurrentStateDefiningCode.COMPLETED.getValue())) { + } else if (statusCode.equals(CurrentStateDefiningCode.COMPLETED.getValue())) { return CurrentStateDefiningCode.COMPLETED; - }else if (statusCode.equals(CurrentStateDefiningCode.ACTIVE.getValue())) { + } else if (statusCode.equals(CurrentStateDefiningCode.ACTIVE.getValue())) { return CurrentStateDefiningCode.ACTIVE; - }else{ - throw new UnprocessableEntityException("The status code" + statusCode+ " is wrong or not supported by the fhir-bridge. Supported are: aborted, completed and active"); + } else { + throw new UnprocessableEntityException("The status code" + statusCode + " is wrong or not supported by the fhir-bridge. Supported are: aborted, completed and active"); } } diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/immunization/HistoryOfVaccinationIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/immunization/HistoryOfVaccinationIT.java index 9eb37b17a..91641076d 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/immunization/HistoryOfVaccinationIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/immunization/HistoryOfVaccinationIT.java @@ -8,6 +8,10 @@ import org.ehrbase.fhirbridge.ehr.opt.geccoradiologischerbefundcomposition.definition.BildgebendesUntersuchungsergebnisObservation; import org.ehrbase.fhirbridge.ehr.opt.geccoradiologischerbefundcomposition.definition.RadiologischerBefundKategorieElement; import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.ImpfstatusComposition; +import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.ImpfungAction; +import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.ImpfungImpfungGegenElement; +import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.UnbekannterImpfstatusEvaluation; +import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.VerabreichteDosenCluster; import org.ehrbase.fhirbridge.fhir.AbstractMappingTestSetupIT; import org.hl7.fhir.r4.model.DiagnosticReport; import org.hl7.fhir.r4.model.Immunization; @@ -15,6 +19,7 @@ import org.javers.core.JaversBuilder; import org.javers.core.diff.Diff; import org.javers.core.metamodel.clazz.ValueObjectDefinition; +import org.junit.jupiter.api.Test; import java.io.IOException; import java.time.temporal.TemporalAccessor; @@ -27,15 +32,77 @@ * Integration tests for {@link Immunization} using History of Vaccination profile. */ public class HistoryOfVaccinationIT extends AbstractMappingTestSetupIT { - public HistoryOfVaccinationIT(String directory, Class clazz) { + public HistoryOfVaccinationIT() { super("Immunization/", Immunization.class); } + @Test + void createImmunization() throws IOException { + create("create-immunization-for-patient-complete.json"); + } + + @Test + void mappingCreateImmunization1() throws IOException{ + testMapping("create-immunization-for-patient-complete.json", + "paragon-create-immunization-for-patient-complete.json"); + } + + @Test + void mappingCreateImmunization2() throws IOException{ + testMapping("create-immunization-for-patient-complete-2.json", + "paragon-create-immunization-for-patient-complete-2.json"); + } + + + @Test + void mappingCreateImmunization3() throws IOException{ + testMapping("create-immunization-for-patient-complete-3.json", + "paragon-create-immunization-for-patient-complete-3.json"); + } + + + @Test + void mappingCreateImmunization4() throws IOException{ + testMapping("create-immunization-for-patient-complete-4.json", + "paragon-create-immunization-for-patient-complete-4.json"); + } + + @Test + void mappingCreateImmunizationNotDone() throws IOException{ + testMapping("create-immunization-for-patient-not-done.json", + "paragon-create-immunization-for-patient-not-done.json"); + } + + @Test + void createInvalidImpstoffDefiningCode() throws IOException { + Exception exception = executeMappingException("invalid-impstoff-defining-code.json"); + assertEquals("Invalid Code or vaccineCode3335asd98008 entered", exception.getMessage()); + } + + @Test + void createInvalidDiseaseCodeMissing() throws IOException { + Exception exception = executeMappingException("invalid-target-disease-code-missing.json"); + assertEquals("Target Disease code and dose missing", exception.getMessage()); + } + + + @Test + void createInvalidDiseaseSnomedCode() throws IOException { + Exception exception = executeMappingException("invalid-target-disease-snomed-code.json"); + assertEquals("Invalid Snomed Code 16814asd004 entered", exception.getMessage()); + } + + + @Test + void createInvalidTargetDiseaseSystem() throws IOException { + Exception exception = executeMappingException("invalid-target-disease-system.json"); + assertEquals("Target Disease System is wrong, has to be SNOMED.", exception.getMessage()); + } @Override public Exception executeMappingException(String path) throws IOException { Immunization immunization = (Immunization) testFileLoader.loadResource(path); - return assertThrows(ConversionException.class, () -> { + return assertThrows(Exception.class, () -> { new ImpfstatusCompositionConverter().convert(immunization); }); } @@ -49,11 +116,16 @@ public void testMapping(String resourcePath, String paragonPath) throws IOExcept assertEquals(diff.getChanges().size(), 0); } + @Override public Javers getJavers() { return JaversBuilder.javers() .registerValue(TemporalAccessor.class, new CustomTemporalAcessorComparator()) - .registerValueObject(new ValueObjectDefinition(ImpfstatusComposition.class, List.of("location", "feederAudit"))) + .registerValueObject(new ValueObjectDefinition(ImpfstatusComposition.class, List.of("location", "feederAudit", "startTimeValue"))) // excluded startTimeValue since its a special case in this mapping + .registerValueObject(UnbekannterImpfstatusEvaluation.class) + .registerValueObject(ImpfungAction.class) + .registerValueObject(VerabreichteDosenCluster.class) + .registerValueObject(ImpfungImpfungGegenElement.class) .build(); } diff --git a/src/test/resources/Immunization/create-immunization-for-patient-complete-4.json b/src/test/resources/Immunization/create-immunization-for-patient-complete-4.json index f3162ef2b..bb4a8e0f3 100644 --- a/src/test/resources/Immunization/create-immunization-for-patient-complete-4.json +++ b/src/test/resources/Immunization/create-immunization-for-patient-complete-4.json @@ -1,34 +1,50 @@ { "resourceType": "Immunization", - "id": "b7db30a0-4ffd-4dd6-b3e5-53e2730789e6", + "id": "c17f192c-f765-4729-818a-4ee55be5c87b", "meta": { "profile": [ "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization" ] }, - "status": "not-done", + "status": "completed", "vaccineCode": { "coding": [ { - "system": "http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips", - "code": "no-known-immunizations", - "display": "No known immunizations" + "system": "http://snomed.info/sct", + "code": "1119349007", + "display": "Vaccine product containing only Severe acute respiratory syndrome coronavirus 2 messenger ribonucleic acid (medicinal product)" } ] }, "patient": { - "reference": "Patient/c786ac3c-0579-4aa2-adda-db784b214ad6", + "reference": "Patient/21acfc9c-1fd6-43e6-a8fe-c6b6341b0fab", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" } }, - "_occurrenceDateTime": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", - "valueCode": "unknown" + "occurrenceDateTime": "2020-12-27", + "protocolApplied": [ + { + "targetDisease": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "840539006", + "display": "Disease caused by Severe acute respiratory syndrome coronavirus 2 (disorder)" + } + ] + } + ], + "_doseNumberString": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] } - ] - } + } + ] } \ No newline at end of file diff --git a/src/test/resources/Immunization/create-immunization-for-patient-complete-5.json b/src/test/resources/Immunization/create-immunization-for-patient-complete-5.json deleted file mode 100644 index bb4a8e0f3..000000000 --- a/src/test/resources/Immunization/create-immunization-for-patient-complete-5.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "resourceType": "Immunization", - "id": "c17f192c-f765-4729-818a-4ee55be5c87b", - "meta": { - "profile": [ - "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization" - ] - }, - "status": "completed", - "vaccineCode": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "1119349007", - "display": "Vaccine product containing only Severe acute respiratory syndrome coronavirus 2 messenger ribonucleic acid (medicinal product)" - } - ] - }, - "patient": { - "reference": "Patient/21acfc9c-1fd6-43e6-a8fe-c6b6341b0fab", - "identifier": { - "system": "urn:ietf:rfc:4122", - "value": "{{patientId}}" - } - }, - "occurrenceDateTime": "2020-12-27", - "protocolApplied": [ - { - "targetDisease": [ - { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "840539006", - "display": "Disease caused by Severe acute respiratory syndrome coronavirus 2 (disorder)" - } - ] - } - ], - "_doseNumberString": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", - "valueCode": "unknown" - } - ] - } - } - ] -} \ No newline at end of file diff --git a/src/test/resources/Immunization/invalid-impstoff-defining-code.json b/src/test/resources/Immunization/invalid-impstoff-defining-code.json new file mode 100644 index 000000000..ef0fa4395 --- /dev/null +++ b/src/test/resources/Immunization/invalid-impstoff-defining-code.json @@ -0,0 +1,50 @@ +{ + "id": "85bd2fab-256b-43d6-9671-4f97c1407d0f", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization" + ] + }, + "occurrenceDateTime": "2020-10-06", + "patient": { + "reference": "Patient/c786ac3c-0579-4aa2-adda-db784b214ad6", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "protocolApplied": [ + { + "_doseNumberString": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "targetDisease": [ + { + "coding": [ + { + "code": "16814004", + "display": "Pneumococcal infectious disease", + "system": "http://snomed.info/sct" + } + ] + } + ] + } + ], + "status": "completed", + "vaccineCode": { + "coding": [ + { + "code": "3335asd98008", + "display": "Pneumococcal vaccine", + "system": "http://snomed.info/sct" + } + ] + }, + "resourceType": "Immunization" +} \ No newline at end of file diff --git a/src/test/resources/Immunization/invalid-target-disease-code-missing.json b/src/test/resources/Immunization/invalid-target-disease-code-missing.json new file mode 100644 index 000000000..eede44b45 --- /dev/null +++ b/src/test/resources/Immunization/invalid-target-disease-code-missing.json @@ -0,0 +1,27 @@ +{ + "id": "85bd2fab-256b-43d6-9671-4f97c1407d0f", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization" + ] + }, + "occurrenceDateTime": "2020-10-06", + "patient": { + "reference": "Patient/c786ac3c-0579-4aa2-adda-db784b214ad6", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "status": "completed", + "vaccineCode": { + "coding": [ + { + "code": "333598008", + "display": "Pneumococcal vaccine", + "system": "http://snomed.info/sct" + } + ] + }, + "resourceType": "Immunization" +} \ No newline at end of file diff --git a/src/test/resources/Immunization/invalid-target-disease-snomed-code.json b/src/test/resources/Immunization/invalid-target-disease-snomed-code.json new file mode 100644 index 000000000..203a929ef --- /dev/null +++ b/src/test/resources/Immunization/invalid-target-disease-snomed-code.json @@ -0,0 +1,50 @@ +{ + "id": "85bd2fab-256b-43d6-9671-4f97c1407d0f", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization" + ] + }, + "occurrenceDateTime": "2020-10-06", + "patient": { + "reference": "Patient/c786ac3c-0579-4aa2-adda-db784b214ad6", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "protocolApplied": [ + { + "_doseNumberString": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "targetDisease": [ + { + "coding": [ + { + "code": "16814asd004", + "display": "Pneumococcal infectious disease", + "system": "http://snomed.info/sct" + } + ] + } + ] + } + ], + "status": "completed", + "vaccineCode": { + "coding": [ + { + "code": "333598008", + "display": "Pneumococcal vaccine", + "system": "http://snomed.info/sct" + } + ] + }, + "resourceType": "Immunization" +} \ No newline at end of file diff --git a/src/test/resources/Immunization/invalid-target-disease-system.json b/src/test/resources/Immunization/invalid-target-disease-system.json new file mode 100644 index 000000000..7f73796f6 --- /dev/null +++ b/src/test/resources/Immunization/invalid-target-disease-system.json @@ -0,0 +1,50 @@ +{ + "id": "85bd2fab-256b-43d6-9671-4f97c1407d0f", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization" + ] + }, + "occurrenceDateTime": "2020-10-06", + "patient": { + "reference": "Patient/c786ac3c-0579-4aa2-adda-db784b214ad6", + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "protocolApplied": [ + { + "_doseNumberString": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "targetDisease": [ + { + "coding": [ + { + "code": "16814004", + "display": "Pneumococcal infectious disease", + "system": "http://snoasdmed.info/sct" + } + ] + } + ] + } + ], + "status": "completed", + "vaccineCode": { + "coding": [ + { + "code": "333598008", + "display": "Pneumococcal vaccine", + "system": "http://snomed.info/sct" + } + ] + }, + "resourceType": "Immunization" +} \ No newline at end of file diff --git a/src/test/resources/Immunization/paragon-create-immunization-for-patient-complete-2.json b/src/test/resources/Immunization/paragon-create-immunization-for-patient-complete-2.json new file mode 100644 index 000000000..e3a8f8806 --- /dev/null +++ b/src/test/resources/Immunization/paragon-create-immunization-for-patient-complete-2.json @@ -0,0 +1,172 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Impfstatus" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "Impfstatus" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Immunization/5/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-12-27T00:00:00+01:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + } + }, + "content" : [ { + "_type" : "ACTION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Impfung" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-12-27T00:00:00+01:00" + }, + "description" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Impfstoff" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Vaccine product containing only Severe acute respiratory syndrome coronavirus 2 messenger ribonucleic acid (medicinal product)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "1119349007" + } + }, + "archetype_node_id" : "at0020" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Impfung gegen" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Disease caused by Severe acute respiratory syndrome coronavirus 2 (disorder)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "840539006" + } + }, + "archetype_node_id" : "at0021" + } ], + "archetype_node_id" : "at0017" + }, + "ism_transition" : { + "_type" : "ISM_TRANSITION", + "current_state" : { + "_type" : "DV_CODED_TEXT", + "value" : "completed", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "532" + } + } + }, + "archetype_node_id" : "openEHR-EHR-ACTION.medication.v1" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/test/resources/Immunization/paragon-create-immunization-for-patient-complete-3.json b/src/test/resources/Immunization/paragon-create-immunization-for-patient-complete-3.json new file mode 100644 index 000000000..bf6ede7ee --- /dev/null +++ b/src/test/resources/Immunization/paragon-create-immunization-for-patient-complete-3.json @@ -0,0 +1,172 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Impfstatus" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "Impfstatus" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Immunization/7/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-06T00:00:00+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + } + }, + "content" : [ { + "_type" : "ACTION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Impfung" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-06T00:00:00+02:00" + }, + "description" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Impfstoff" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Pneumococcal vaccine", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "333598008" + } + }, + "archetype_node_id" : "at0020" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Impfung gegen" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Pneumococcal infectious disease", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "16814004" + } + }, + "archetype_node_id" : "at0021" + } ], + "archetype_node_id" : "at0017" + }, + "ism_transition" : { + "_type" : "ISM_TRANSITION", + "current_state" : { + "_type" : "DV_CODED_TEXT", + "value" : "completed", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "532" + } + } + }, + "archetype_node_id" : "openEHR-EHR-ACTION.medication.v1" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/test/resources/Immunization/paragon-create-immunization-for-patient-complete-4.json b/src/test/resources/Immunization/paragon-create-immunization-for-patient-complete-4.json new file mode 100644 index 000000000..20fbfac53 --- /dev/null +++ b/src/test/resources/Immunization/paragon-create-immunization-for-patient-complete-4.json @@ -0,0 +1,172 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Impfstatus" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "Impfstatus" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Immunization/9/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-12-27T00:00:00+01:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + } + }, + "content" : [ { + "_type" : "ACTION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Impfung" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-12-27T00:00:00+01:00" + }, + "description" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Impfstoff" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Vaccine product containing only Severe acute respiratory syndrome coronavirus 2 messenger ribonucleic acid (medicinal product)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "1119349007" + } + }, + "archetype_node_id" : "at0020" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Impfung gegen" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Disease caused by Severe acute respiratory syndrome coronavirus 2 (disorder)", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "840539006" + } + }, + "archetype_node_id" : "at0021" + } ], + "archetype_node_id" : "at0017" + }, + "ism_transition" : { + "_type" : "ISM_TRANSITION", + "current_state" : { + "_type" : "DV_CODED_TEXT", + "value" : "completed", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "532" + } + } + }, + "archetype_node_id" : "openEHR-EHR-ACTION.medication.v1" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/test/resources/Immunization/paragon-create-immunization-for-patient-complete.json b/src/test/resources/Immunization/paragon-create-immunization-for-patient-complete.json new file mode 100644 index 000000000..3c8fb3536 --- /dev/null +++ b/src/test/resources/Immunization/paragon-create-immunization-for-patient-complete.json @@ -0,0 +1,172 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Impfstatus" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "Impfstatus" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Immunization/2/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-06T00:00:00+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + } + }, + "content" : [ { + "_type" : "ACTION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Impfung" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "time" : { + "_type" : "DV_DATE_TIME", + "value" : "2020-10-06T00:00:00+02:00" + }, + "description" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Tree" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Impfstoff" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Pneumococcal vaccine", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "333598008" + } + }, + "archetype_node_id" : "at0020" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Impfung gegen" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "Pneumococcal infectious disease", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "SNOMED Clinical Terms" + }, + "code_string" : "16814004" + } + }, + "archetype_node_id" : "at0021" + } ], + "archetype_node_id" : "at0017" + }, + "ism_transition" : { + "_type" : "ISM_TRANSITION", + "current_state" : { + "_type" : "DV_CODED_TEXT", + "value" : "completed", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "532" + } + } + }, + "archetype_node_id" : "openEHR-EHR-ACTION.medication.v1" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/test/resources/Immunization/paragon-create-immunization-for-patient-not-done.json b/src/test/resources/Immunization/paragon-create-immunization-for-patient-not-done.json new file mode 100644 index 000000000..2de067f15 --- /dev/null +++ b/src/test/resources/Immunization/paragon-create-immunization-for-patient-not-done.json @@ -0,0 +1,134 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Impfstatus" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "Impfstatus" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Immunization/11/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2021-06-30T12:46:34,307538+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + } + }, + "content" : [ { + "_type" : "EVALUATION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Unbekannter Impfstatus" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Baum" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Aussage über Abwesenheit" + }, + "value" : { + "_type" : "DV_CODED_TEXT", + "value" : "No known immunizations", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "HL7 NoImmunizationInfoUvIps" + }, + "code_string" : "no-known-immunizations" + } + }, + "archetype_node_id" : "at0002" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-EVALUATION.absence.v2" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file From 069ee02294f1e9c10c93accfeb75eec2768b1081 Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Wed, 30 Jun 2021 13:33:14 +0200 Subject: [PATCH 111/141] finished --- .../fhir-bridge.postman_collection.json | 428 +++++++++++++++++- .../camel/route/ImmunizationRoutes.java | 14 +- .../ImpfstatusComposition.java | 3 +- .../fhirbridge/fhir/common/Profile.java | 6 +- .../FindImmunizationAuditStrategy.java | 4 +- 5 files changed, 440 insertions(+), 15 deletions(-) diff --git a/config/postman/fhir-bridge.postman_collection.json b/config/postman/fhir-bridge.postman_collection.json index ab974a839..11c188b10 100644 --- a/config/postman/fhir-bridge.postman_collection.json +++ b/config/postman/fhir-bridge.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "4a3b60bc-e061-4b50-80a7-67bca2a95dcb", + "_postman_id": "581f7043-2209-46fb-949c-027d0f87cbc0", "name": "fhir-bridge", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, @@ -213,6 +213,32 @@ } }, "response": [] + }, + { + "name": "AntiBodyPanel", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"Bundle\",\n \"id\": \"bundle-transaction-bga\",\n \"meta\": {\n \"lastUpdated\": \"2020-09-24T05:33:00Z\"\n },\n \"type\": \"transaction\",\n \"entry\": [\n {\n \"fullUrl\": \"urn:uuid:220767b9-5760-40b8-8741-8772dae04c3f\",\n \"resource\": {\n \"resourceType\": \"Observation\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-ab-pnl-ser-pl-ia\"\n ]\n },\n \"identifier\": [\n {\n \"type\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n \"code\": \"OBI\"\n }\n ]\n },\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\n \"value\": \"94504-8_SARS-CoV-2-Ab-Panel\",\n \"assigner\": {\n \"reference\": \"Organization/Charité\"\n }\n }\n ],\n \"status\": \"final\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"26436-6\"\n },\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n \"code\": \"laboratory\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"94504-8\",\n \"display\": \"SARS-CoV-2 (COVID-19) Ab panel - Serum or Plasma by Immunoassay\"\n }\n ],\n \"text\": \"SARS-CoV-2 antibodies panel\"\n },\n \"subject\": {\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\",\n \"hasMember\": [\n {\n \"reference\": \"urn:uuid:22732de8-3eb6-477e-81d6-28fb906b3e4e\"\n },\n {\n \"reference\": \"urn:uuid:70ca7d00-0d8b-42bb-9508-a8fc76e5c7ad\"\n },\n {\n \"reference\": \"urn:uuid:7e746710-fad4-474b-8a28-422863f3a2b8\"\n },\n {\n \"reference\": \"urn:uuid:f35f17da-f642-402d-8cf4-ff70607713a7\"\n },\n {\n \"reference\": \"urn:uuid:7297b0fd-3be7-4b88-a63a-6ba651152c41\"\n },\n {\n \"reference\": \"urn:uuid:da1fa3fe-a8a3-44b6-94c6-3497269436ec\"\n },\n {\n \"reference\": \"urn:uuid:b5adbc53-a1ee-4a57-9ede-fae4b4462bfb\"\n },\n {\n \"reference\": \"urn:uuid:b08b1687-2ea1-4b14-9473-dd04389169ec\"\n }\n ]\n },\n \"request\": {\n \"method\": \"POST\",\n \"url\": \"Observation\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:70ca7d00-0d8b-42bb-9508-a8fc76e5c7ad\",\n \"resource\": {\n \"resourceType\": \"Observation\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-ab-ser-pl-ql-ia\"\n ]\n },\n \"identifier\": [\n {\n \"type\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n \"code\": \"OBI\"\n }\n ]\n },\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\n \"value\": \"94762-2_SARS-CoV-2-Ab-Ql\",\n \"assigner\": {\n \"reference\": \"Organization/Charité\"\n }\n }\n ],\n \"status\": \"final\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"26436-6\"\n },\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n \"code\": \"laboratory\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"94762-2\",\n \"display\": \"SARS-CoV-2 (COVID-19) Ab [Presence] in Serum or Plasma by Immunoassay\"\n }\n ],\n \"text\": \"SARS-CoV-2 antibodies qualitative\"\n },\n \"subject\": {\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"260373001\",\n \"display\": \"Detected (qualifier value)\"\n }\n ]\n }\n },\n \"request\": {\n \"method\": \"POST\",\n \"url\": \"Observation\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:22732de8-3eb6-477e-81d6-28fb906b3e4e\",\n \"resource\": {\n \"resourceType\": \"Observation\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-ab-ser-pl-ia-acnc\"\n ]\n },\n \"identifier\": [\n {\n \"type\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n \"code\": \"OBI\"\n }\n ]\n },\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\n \"value\": \"94769-7_SARS-CoV-2-Ab-Qn\",\n \"assigner\": {\n \"reference\": \"Organization/Charité\"\n }\n }\n ],\n \"status\": \"final\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"26436-6\"\n },\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n \"code\": \"laboratory\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"94769-7\",\n \"display\": \"SARS-CoV-2 (COVID-19) Ab [Units/volume] in Serum or Plasma by Immunoassay\"\n }\n ],\n \"text\": \"SARS-CoV-2 antibodies quantitative\"\n },\n \"subject\": {\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\",\n \"valueQuantity\": {\n \"value\": 240,\n \"unit\": \"[IU]/mL\",\n \"system\": \"http://unitsofmeasure.org\",\n \"code\": \"[IU]/mL\"\n }\n },\n \"request\": {\n \"method\": \"POST\",\n \"url\": \"Observation\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:7e746710-fad4-474b-8a28-422863f3a2b8\",\n \"resource\": {\n \"resourceType\": \"Observation\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-iga-ser-pl-ia-acnc\"\n ]\n },\n \"identifier\": [\n {\n \"type\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n \"code\": \"OBI\"\n }\n ]\n },\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\n \"value\": \"94720-0_SARS-CoV-2-IgA-Qn\",\n \"assigner\": {\n \"reference\": \"Organization/Charité\"\n }\n }\n ],\n \"status\": \"final\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"26436-6\"\n },\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n \"code\": \"laboratory\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"94720-0\",\n \"display\": \"SARS-CoV-2 (COVID-19) IgA Ab [Units/volume] in Serum or Plasma by Immunoassay\"\n }\n ],\n \"text\": \"SARS-CoV-2 IgA antibodies quantitative\"\n },\n \"subject\": {\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\",\n \"valueQuantity\": {\n \"value\": 0.5,\n \"unit\": \"[IU]/mL\",\n \"system\": \"http://unitsofmeasure.org\",\n \"code\": \"[IU]/mL\"\n }\n },\n \"request\": {\n \"method\": \"POST\",\n \"url\": \"Observation\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:f35f17da-f642-402d-8cf4-ff70607713a7\",\n \"resource\": {\n \"resourceType\": \"Observation\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-iga-ser-pl-ql-ia\"\n ]\n },\n \"identifier\": [\n {\n \"type\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n \"code\": \"OBI\"\n }\n ]\n },\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\n \"value\": \"94562-6_SARS-CoV-2-IgA-Ql\",\n \"assigner\": {\n \"reference\": \"Organization/Charité\"\n }\n }\n ],\n \"status\": \"final\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"26436-6\"\n },\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n \"code\": \"laboratory\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"94562-6\",\n \"display\": \"SARS-CoV-2 (COVID-19) IgA Ab [Presence] in Serum or Plasma by Immunoassay\"\n }\n ],\n \"text\": \"SARS-CoV-2 IgA antibodies qualitative\"\n },\n \"subject\": {\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"260373001\",\n \"display\": \"Detected (qualifier value)\"\n }\n ]\n }\n },\n \"request\": {\n \"method\": \"POST\",\n \"url\": \"Observation\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:7297b0fd-3be7-4b88-a63a-6ba651152c41\",\n \"resource\": {\n \"resourceType\": \"Observation\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-igg-ser-pl-ia-acnc\"\n ]\n },\n \"identifier\": [\n {\n \"type\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n \"code\": \"OBI\"\n }\n ]\n },\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\n \"value\": \"94505-5_SARS-CoV-2-IgG-Qn\",\n \"assigner\": {\n \"reference\": \"Organization/Charité\"\n }\n }\n ],\n \"status\": \"final\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"26436-6\"\n },\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n \"code\": \"laboratory\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"94505-5\",\n \"display\": \"SARS-CoV-2 (COVID-19) IgG Ab [Units/volume] in Serum or Plasma by Immunoassay\"\n }\n ],\n \"text\": \"SARS-CoV-2 IgG antibodies quantitative\"\n },\n \"subject\": {\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\",\n \"valueQuantity\": {\n \"value\": 20,\n \"unit\": \"[arb'U]/mL\",\n \"system\": \"http://unitsofmeasure.org\",\n \"code\": \"[arb'U]/mL\"\n }\n },\n \"request\": {\n \"method\": \"POST\",\n \"url\": \"Observation\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:da1fa3fe-a8a3-44b6-94c6-3497269436ec\",\n \"resource\": {\n \"resourceType\": \"Observation\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-igg-ser-pl-ql-ia\"\n ]\n },\n \"identifier\": [\n {\n \"type\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n \"code\": \"OBI\"\n }\n ]\n },\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\n \"value\": \"94563-4_SARS-CoV-2-IgG-Ql\",\n \"assigner\": {\n \"reference\": \"Organization/Charité\"\n }\n }\n ],\n \"status\": \"final\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"26436-6\"\n },\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n \"code\": \"laboratory\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"94563-4\",\n \"display\": \"SARS-CoV-2 (COVID-19) IgG Ab [Presence] in Serum or Plasma by Immunoassay\"\n }\n ],\n \"text\": \"SARS-CoV-2 IgG antibodies qualitative\"\n },\n \"subject\": {\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"260373001\",\n \"display\": \"Detected (qualifier value)\"\n }\n ]\n }\n },\n \"request\": {\n \"method\": \"POST\",\n \"url\": \"Observation\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:b5adbc53-a1ee-4a57-9ede-fae4b4462bfb\",\n \"resource\": {\n \"resourceType\": \"Observation\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-igm-ser-pl-ia-acnc\"\n ]\n },\n \"identifier\": [\n {\n \"type\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n \"code\": \"OBI\"\n }\n ]\n },\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\n \"value\": \"94505-5_SARS-CoV-2-IgM-Qn\",\n \"assigner\": {\n \"reference\": \"Organization/Charité\"\n }\n }\n ],\n \"status\": \"final\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"26436-6\"\n },\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n \"code\": \"laboratory\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"94506-3\",\n \"display\": \"SARS-CoV-2 (COVID-19) IgM Ab [Units/volume] in Serum or Plasma by Immunoassay\"\n }\n ],\n \"text\": \"SARS-CoV-2 IgM antibodies quantitative\"\n },\n \"subject\": {\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\",\n \"valueQuantity\": {\n \"value\": 219.5,\n \"unit\": \"[arb'U]/mL\",\n \"system\": \"http://unitsofmeasure.org\",\n \"code\": \"[arb'U]/mL\"\n }\n },\n \"request\": {\n \"method\": \"POST\",\n \"url\": \"Observation\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:b08b1687-2ea1-4b14-9473-dd04389169ec\",\n \"resource\": {\n \"resourceType\": \"Observation\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-igm-ser-pl-ql-ia\"\n ]\n },\n \"identifier\": [\n {\n \"type\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n \"code\": \"OBI\"\n }\n ]\n },\n \"system\": \"https://www.charite.de/fhir/CodeSystem/lab-identifiers\",\n \"value\": \"94564-2_SARS-CoV-2-IgM-Ql\",\n \"assigner\": {\n \"reference\": \"Organization/Charité\"\n }\n }\n ],\n \"status\": \"final\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"26436-6\"\n },\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n \"code\": \"laboratory\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"94564-2\",\n \"display\": \"SARS-CoV-2 (COVID-19) IgM Ab [Presence] in Serum or Plasma by Immunoassay\"\n }\n ],\n \"text\": \"SARS-CoV-2 IgM antibodies qualitative\"\n },\n \"subject\": {\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"effectiveDateTime\": \"2020-10-19T08:43:33+02:00\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"260373001\",\n \"display\": \"Detected (qualifier value)\"\n }\n ]\n }\n },\n \"request\": {\n \"method\": \"POST\",\n \"url\": \"Observation\"\n }\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir" + ] + } + }, + "response": [] } ] }, @@ -3492,6 +3518,33 @@ } }, "response": [] + }, + { + "name": "Create D4L_Questionnaire", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"questionnaire\": \"http://fhir.data4life.care/covid-19/r4/Questionnaire/covid19-recommendation|3.0.0\",\n \"status\": \"completed\",\n \"authored\": \"2020-05-04T14:15:00-05:00\",\n \"subject\": {\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"item\": [\n {\n \"linkId\": \"P\",\n \"text\": \"Persönliche Informationen\",\n \"item\": [\n {\n \"linkId\": \"P0\",\n \"text\": \"Wie alt sind Sie?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://fhir.data4life.care/covid-19/r4/CodeSystem/age-group\",\n \"code\": \"61-70\"\n }\n }\n ]\n },\n {\n \"linkId\": \"P1\",\n \"text\": \"Sind Sie älter oder gleich 65 Jahre alt?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA33-6\"\n }\n }\n ]\n },\n {\n \"linkId\": \"P2\",\n \"text\": \"Wie ist Ihre aktuelle Wohnsituation?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA6255-9\"\n }\n }\n ]\n },\n {\n \"linkId\": \"P3\",\n \"text\": \"Pflegen oder unterstützen Sie privat mindestens einmal pro Woche eine oder mehrere Personen mit altersbedingten Beschwerden, chronischen Erkrankungen oder Gebrechlichkeit?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"P4\",\n \"text\": \"Sind Sie in einem der folgenden Bereiche tätig?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://fhir.data4life.care/covid-19/r4/CodeSystem/occupation-class\",\n \"code\": \"community\"\n }\n }\n ]\n },\n {\n \"linkId\": \"P5\",\n \"text\": \"Rauchen Sie?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"P6\",\n \"text\": \"Sind Sie schwanger?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA26683-5\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"C\",\n \"text\": \"Kontakte zu COVID-19-Fällen\",\n \"item\": [\n {\n \"linkId\": \"C0\",\n \"text\": \"Hatten Sie engen Kontakt zu einem bestätigten Fall?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA33-6\"\n }\n }\n ]\n },\n {\n \"linkId\": \"CZ\",\n \"text\": \"An welchem Tag war der letzte Kontakt?\",\n \"answer\": [\n {\n \"valueDate\": \"2020-03-27\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"S\",\n \"text\": \"Symptome\",\n \"item\": [\n {\n \"linkId\": \"S0\",\n \"text\": \"Hatten Sie in den letzten 24 Std. Fieber (über 38°C)?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"S1\",\n \"text\": \"Hatten Sie in den letzten 4 Tagen Fieber (über 38°C)?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA33-6\"\n }\n }\n ]\n },\n {\n \"linkId\": \"S2\",\n \"text\": \"Wie hoch war die höchste Temperatur ca.?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://fhir.data4life.care/covid-19/r4/CodeSystem/fever-class\",\n \"code\": \"40C\"\n }\n }\n ]\n },\n {\n \"linkId\": \"S3\",\n \"text\": \"Hatten Sie in den letzten 24 Std. Schüttelfrost?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"S4\",\n \"text\": \"Haben Sie sich in den letzten 24 Std. schlapp oder abgeschlagen gefühlt?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA33-6\"\n }\n }\n ]\n },\n {\n \"linkId\": \"S5\",\n \"text\": \"Hatten Sie in den letzten 24 Std. Gliederschmerzen?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"S6\",\n \"text\": \"Hatten Sie in den letzten 24 Std. anhaltenden Husten?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA33-6\"\n }\n }\n ]\n },\n {\n \"linkId\": \"S7\",\n \"text\": \"Hatten Sie in den letzten 24 Std. Schnupfen?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"S8\",\n \"text\": \"Hatten Sie in den letzten 24 Std. Durchfall?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"S9\",\n \"text\": \"Hatten Sie in den letzten 24 Std. Halsschmerzen?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA33-6\"\n }\n }\n ]\n },\n {\n \"linkId\": \"SA\",\n \"text\": \"Hatten Sie in den letzten 24 Std. Kopfschmerzen?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"SB\",\n \"text\": \"Sind Sie in den letzten 24 Std. schneller außer Atem als sonst?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"SC\",\n \"text\": \"Hatten Sie in den letzten 24 Std. Geschmacks- und/oder Geruchsverlust?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"SZ\",\n \"text\": \"Bezogen auf alle Fragen zu Symptomen: Seit wann haben Sie die von Ihnen angegebenen Symptome?\",\n \"answer\": [\n {\n \"valueDate\": \"2020-03-30\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"D\",\n \"text\": \"Kronische Erkrankungen\",\n \"item\": [\n {\n \"linkId\": \"D0\",\n \"text\": \"Wurde bei Ihnen durch einen Arzt/eine Ärztin eine chronische Lungenerkrankung festgestellt?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"D1\",\n \"text\": \"Wurde bei Ihnen durch einen Arzt/eine Ärztin Diabetes festgestellt?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA33-6\"\n }\n }\n ]\n },\n {\n \"linkId\": \"D2\",\n \"text\": \"Wurde bei Ihnen durch einen Arzt/eine Ärztin eine Herzerkrankung festgestellt?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"D3\",\n \"text\": \"Wurde bei Ihnen durch einen Arzt/eine Ärztin Adipositas (Fettsucht) festgestellt?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"M\",\n \"text\": \"Medikation\",\n \"item\": [\n {\n \"linkId\": \"M0\",\n \"text\": \"Nehmen Sie aktuell Cortison ein (in Tablettenform)?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"M1\",\n \"text\": \"Nehmen Sie aktuell Immunsuppressiva?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA32-8\"\n }\n }\n ]\n },\n {\n \"linkId\": \"M2\",\n \"text\": \"Haben Sie sich im Zeitraum von Oktober 2019 bis heute gegen Grippe impfen lassen?\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://loinc.org\",\n \"code\": \"LA33-6\"\n }\n }\n ]\n }\n ]\n }\n ],\n \"language\": \"de\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/QuestionnaireResponse", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "QuestionnaireResponse" + ] + } + }, + "response": [] } ] }, @@ -3555,6 +3608,379 @@ "response": [] } ] + }, + { + "name": "Immunization", + "item": [ + { + "name": "Find Immunization: read", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/fhir/Immunization/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "2" + } + ] + } + }, + "response": [] + }, + { + "name": "Find Immunization: vread", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/fhir/Immunization/:id/_history/:vid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization", + ":id", + "_history", + ":vid" + ], + "variable": [ + { + "key": "id", + "value": "1" + }, + { + "key": "vid", + "value": "1" + } + ] + } + }, + "response": [] + }, + { + "name": "Find Immunization: search", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/fhir/Immunization?status=error", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization" + ], + "query": [ + { + "key": "_id", + "value": "2", + "disabled": true + }, + { + "key": "_language", + "value": null, + "disabled": true + }, + { + "key": "_profile", + "value": null, + "disabled": true + }, + { + "key": "_source", + "value": null, + "disabled": true + }, + { + "key": "_security", + "value": null, + "disabled": true + }, + { + "key": "_tag", + "value": null, + "disabled": true + }, + { + "key": "_content", + "value": null, + "disabled": true + }, + { + "key": "_text", + "value": null, + "disabled": true + }, + { + "key": "_filter", + "value": null, + "disabled": true + }, + { + "key": "date", + "value": null, + "disabled": true + }, + { + "key": "identifier", + "value": null, + "disabled": true + }, + { + "key": "location", + "value": null, + "disabled": true + }, + { + "key": "lot-number", + "value": null, + "disabled": true + }, + { + "key": "manufacturer", + "value": null, + "disabled": true + }, + { + "key": "patient", + "value": null, + "disabled": true + }, + { + "key": "performer", + "value": null, + "disabled": true + }, + { + "key": "reaction", + "value": "", + "disabled": true + }, + { + "key": "reaction-date", + "value": null, + "disabled": true + }, + { + "key": "reason-code", + "value": null, + "disabled": true + }, + { + "key": "reason-reference", + "value": null, + "disabled": true + }, + { + "key": "series", + "value": null, + "disabled": true + }, + { + "key": "status", + "value": "error" + }, + { + "key": "status-reason", + "value": null, + "disabled": true + }, + { + "key": "target-disease", + "value": "", + "disabled": true + }, + { + "key": "vaccine-code", + "value": null, + "disabled": true + } + ] + } + }, + "response": [] + }, + { + "name": "Create Immunization", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"id\": \"b7db30a0-4ffd-4dd6-b3e5-53e2730789e6\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization\"\n ]\n },\n \"_occurrenceDateTime\": {\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/data-absent-reason\",\n \"valueCode\": \"unknown\"\n }\n ]\n },\n \"patient\": {\n \"reference\": \"Patient/c786ac3c-0579-4aa2-adda-db784b214ad6\",\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"status\": \"not-done\",\n \"vaccineCode\": {\n \"coding\": [\n {\n \"code\": \"no-known-immunizations\",\n \"display\": \"No known immunizations\",\n \"system\": \"http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips\"\n }\n ]\n },\n \"resourceType\": \"Immunization\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Immunization", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization" + ] + } + }, + "response": [] + }, + { + "name": "Create Immunization 2", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"Immunization\",\n \"id\": \"c17f192c-f765-4729-818a-4ee55be5c87b\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization\"\n ]\n },\n \"status\": \"completed\",\n \"vaccineCode\": {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"1119349007\",\n \"display\": \"Vaccine product containing only Severe acute respiratory syndrome coronavirus 2 messenger ribonucleic acid (medicinal product)\"\n }\n ]\n },\n \"patient\": {\n \"reference\": \"Patient/21acfc9c-1fd6-43e6-a8fe-c6b6341b0fab\",\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"occurrenceDateTime\": \"2020-12-27\",\n \"protocolApplied\": [\n {\n \"targetDisease\": [\n {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"840539006\",\n \"display\": \"Disease caused by Severe acute respiratory syndrome coronavirus 2 (disorder)\"\n }\n ]\n }\n ],\n \"_doseNumberString\": {\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/data-absent-reason\",\n \"valueCode\": \"unknown\"\n }\n ]\n }\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Immunization", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization" + ] + } + }, + "response": [] + }, + { + "name": "Create Immunization 3", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"Immunization\",\n \"id\": \"85bd2fab-256b-43d6-9671-4f97c1407d0f\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization\"\n ]\n },\n \"status\": \"completed\",\n \"vaccineCode\": {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"333598008\",\n \"display\": \"Pneumococcal vaccine\"\n }\n ]\n },\n \"patient\": {\n \"reference\": \"Patient/c786ac3c-0579-4aa2-adda-db784b214ad6\",\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"occurrenceDateTime\": \"2020-10-06\",\n \"protocolApplied\": [\n {\n \"targetDisease\": [\n {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"16814004\",\n \"display\": \"Pneumococcal infectious disease\"\n }\n ]\n }\n ],\n \"_doseNumberString\": {\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/data-absent-reason\",\n \"valueCode\": \"unknown\"\n }\n ]\n }\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Immunization", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization" + ] + } + }, + "response": [] + }, + { + "name": "Create Immunization 4", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"Immunization\",\n \"id\": \"c17f192c-f765-4729-818a-4ee55be5c87b\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization\"\n ]\n },\n \"status\": \"completed\",\n \"vaccineCode\": {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"1119349007\",\n \"display\": \"Vaccine product containing only Severe acute respiratory syndrome coronavirus 2 messenger ribonucleic acid (medicinal product)\"\n }\n ]\n },\n \"patient\": {\n \"reference\": \"Patient/21acfc9c-1fd6-43e6-a8fe-c6b6341b0fab\",\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"occurrenceDateTime\": \"2020-12-27\",\n \"protocolApplied\": [\n {\n \"targetDisease\": [\n {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"840539006\",\n \"display\": \"Disease caused by Severe acute respiratory syndrome coronavirus 2 (disorder)\"\n }\n ]\n }\n ],\n \"_doseNumberString\": {\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/data-absent-reason\",\n \"valueCode\": \"unknown\"\n }\n ]\n }\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Immunization", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization" + ] + } + }, + "response": [] + }, + { + "name": "Create Immunization not done", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"id\": \"b7db30a0-4ffd-4dd6-b3e5-53e2730789e6\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization\"\n ]\n },\n \"_occurrenceDateTime\": {\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/data-absent-reason\",\n \"valueCode\": \"unknown\"\n }\n ]\n },\n \"patient\": {\n \"reference\": \"Patient/c786ac3c-0579-4aa2-adda-db784b214ad6\",\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"status\": \"not-done\",\n \"vaccineCode\": {\n \"coding\": [\n {\n \"code\": \"no-known-immunizations\",\n \"display\": \"No known immunizations\",\n \"system\": \"http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips\"\n }\n ]\n },\n \"resourceType\": \"Immunization\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Immunization", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization" + ] + } + }, + "response": [] + } + ] } ] }, diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ImmunizationRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ImmunizationRoutes.java index fa1e61201..91badd633 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ImmunizationRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ImmunizationRoutes.java @@ -17,7 +17,7 @@ package org.ehrbase.fhirbridge.camel.route; -import org.ehrbase.fhirbridge.camel.FhirBridgeConstants; +import org.ehrbase.fhirbridge.camel.CamelConstants; import org.springframework.stereotype.Component; /** @@ -40,7 +40,7 @@ public void configure() throws Exception { .process("auditCreateResourceProcessor") .end() .process("resourceProfileValidator") - .setHeader(FhirBridgeConstants.METHOD_OUTCOME, method("immunizationDao", "create(${body}, ${headers.FhirRequestDetails})")) + .setHeader(CamelConstants.METHOD_OUTCOME, method("immunizationDao", "create(${body}, ${headers.FhirRequestDetails})")) .process("ehrIdLookupProcessor") .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") @@ -48,13 +48,9 @@ public void configure() throws Exception { // 'Find Immunization' route definition from("immunization-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") - .choice() - .when(isSearchOperation()) - .to("bean:immunizationDao?method=search(${body}, ${headers.FhirRequestDetails})") - .process("bundleProviderResponseProcessor") - .otherwise() - .to("bean:immunizationDao?method=read(${body}, ${headers.FhirRequestDetails})"); - + .routeId("find-immunization-route") + .process("findImmunizationProcessor"); + // @formatter:on } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java index d29138ee1..50fe4fb40 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/impfstatuscomposition/ImpfstatusComposition.java @@ -20,7 +20,6 @@ import org.ehrbase.client.classgenerator.shareddefinition.Setting; import org.ehrbase.client.classgenerator.shareddefinition.Territory; import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.ehr.Composition; import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.ImpfungAction; import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.UnbekannterImpfstatusEvaluation; @@ -32,7 +31,7 @@ comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @Template("Impfstatus") -public class ImpfstatusComposition implements CompositionEntity, Composition { +public class ImpfstatusComposition implements CompositionEntity { /** * Path: Impfstatus/category */ diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java index c235e8a50..f29ef5501 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java @@ -3,13 +3,14 @@ import org.hl7.fhir.r4.model.Condition; import org.hl7.fhir.r4.model.Consent; import org.hl7.fhir.r4.model.DiagnosticReport; +import org.hl7.fhir.r4.model.Encounter; +import org.hl7.fhir.r4.model.Immunization; import org.hl7.fhir.r4.model.MedicationStatement; import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.r4.model.Procedure; import org.hl7.fhir.r4.model.QuestionnaireResponse; import org.hl7.fhir.r4.model.Resource; -import org.hl7.fhir.r4.model.Encounter; import java.util.Arrays; import java.util.LinkedHashSet; @@ -40,6 +41,9 @@ public enum Profile { DIAGNOSE_COMPLICATIONS_COVID_19(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/complications-covid-19"), DIAGNOSE_DEPENDENCE_ON_VENTILATOR(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/dependence-on-ventilator"), + // Immunization Profiles + + HISTORY_OF_VACCINATION(Immunization.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization"), // Consent Profiles DO_NOT_RESUSCITATE_ORDER(Consent.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/do-not-resuscitate-order"), diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationAuditStrategy.java index b1a919a05..2b3e8747a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/FindImmunizationAuditStrategy.java @@ -16,7 +16,7 @@ package org.ehrbase.fhirbridge.fhir.immunization; -import org.ehrbase.fhirbridge.fhir.common.audit.FhirBridgeEventType; +import org.ehrbase.fhirbridge.fhir.FhirBridgeEventType; import org.openehealth.ipf.commons.audit.AuditContext; import org.openehealth.ipf.commons.audit.model.AuditMessage; import org.openehealth.ipf.commons.ihe.core.atna.event.QueryInformationBuilder; @@ -37,7 +37,7 @@ public FindImmunizationAuditStrategy() { @Override public AuditMessage[] makeAuditMessage(AuditContext auditContext, FhirQueryAuditDataset auditDataset) { - return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FindImmunization) + return new QueryInformationBuilder<>(auditContext, auditDataset, FhirBridgeEventType.FIND_MEDICATION_STATEMENT) .addPatients(auditDataset.getPatientIds()) .getMessages(); } From 4cabc3c8b2cf699c210aa3a620de67e5667c6d3c Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Wed, 30 Jun 2021 14:03:28 +0200 Subject: [PATCH 112/141] Replace 'Create Immunization' by 'Provide Immunization' using generic Camel processors --- ...java => ProvideImmunizationComponent.java} | 13 ++-- .../camel/route/ImmunizationRoutes.java | 20 +++--- .../config/HapiFhirJpaConfiguration.java | 34 +++-------- .../config/camel/ProcessorConfiguration.java | 21 ++++--- .../CreateImmunizationProvider.java | 42 ------------- ... => ProvideImmunizationAuditStrategy.java} | 6 +- .../ProvideImmunizationProvider.java | 61 +++++++++++++++++++ ...va => ProvideImmunizationTransaction.java} | 16 ++--- .../camel/component/immunization-create | 1 - .../camel/component/immunization-provide | 1 + .../immunization/HistoryOfVaccinationIT.java | 4 +- 11 files changed, 112 insertions(+), 107 deletions(-) rename src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/{CreateImmunizationComponent.java => ProvideImmunizationComponent.java} (67%) delete mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationProvider.java rename src/main/java/org/ehrbase/fhirbridge/fhir/immunization/{CreateImmunizationAuditStrategy.java => ProvideImmunizationAuditStrategy.java} (81%) create mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/immunization/ProvideImmunizationProvider.java rename src/main/java/org/ehrbase/fhirbridge/fhir/immunization/{CreateImmunizationTransaction.java => ProvideImmunizationTransaction.java} (69%) delete mode 100644 src/main/resources/META-INF/services/org/apache/camel/component/immunization-create create mode 100644 src/main/resources/META-INF/services/org/apache/camel/component/immunization-provide diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/CreateImmunizationComponent.java b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/ProvideImmunizationComponent.java similarity index 67% rename from src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/CreateImmunizationComponent.java rename to src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/ProvideImmunizationComponent.java index 36c8955e0..e1482bc40 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/CreateImmunizationComponent.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/component/fhir/immunization/ProvideImmunizationComponent.java @@ -16,19 +16,20 @@ package org.ehrbase.fhirbridge.camel.component.fhir.immunization; -import org.ehrbase.fhirbridge.fhir.immunization.CreateImmunizationTransaction; +import org.ehrbase.fhirbridge.fhir.immunization.ProvideImmunizationTransaction; import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; import org.openehealth.ipf.platform.camel.ihe.fhir.core.custom.CustomFhirComponent; /** - * {@link CustomFhirComponent} that handles 'Create Immunization' transaction. + * {@link org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirComponent FhirComponent} + * for 'Provide Immunization' transaction. * * @since 1.2.0 */ -@SuppressWarnings({"java:S110"}) -public class CreateImmunizationComponent extends CustomFhirComponent<GenericFhirAuditDataset> { +@SuppressWarnings("java:S110") +public class ProvideImmunizationComponent extends CustomFhirComponent<GenericFhirAuditDataset> { - public CreateImmunizationComponent() { - super(new CreateImmunizationTransaction()); + public ProvideImmunizationComponent() { + super(new ProvideImmunizationTransaction()); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ImmunizationRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ImmunizationRoutes.java index 91badd633..c7d7d5dbf 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ImmunizationRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ImmunizationRoutes.java @@ -17,7 +17,6 @@ package org.ehrbase.fhirbridge.camel.route; -import org.ehrbase.fhirbridge.camel.CamelConstants; import org.springframework.stereotype.Component; /** @@ -35,22 +34,19 @@ public void configure() throws Exception { super.configure(); // 'Create Immunization' route definition - from("immunization-create:consumer?fhirContext=#fhirContext") + from("immunization-provide:consumer?fhirContext=#fhirContext") + .routeId("provide-immunization-route") .onCompletion() - .process("auditCreateResourceProcessor") + .process("provideResourceAuditHandler") .end() - .process("resourceProfileValidator") - .setHeader(CamelConstants.METHOD_OUTCOME, method("immunizationDao", "create(${body}, ${headers.FhirRequestDetails})")) - .process("ehrIdLookupProcessor") - .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") - .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") - .process("resourceResponseProcessor"); + .process("fhirProfileValidator") + .process("provideImmunizationPersistenceProcessor") + .to("direct:internal-provide-resource"); // 'Find Immunization' route definition from("immunization-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") - .routeId("find-immunization-route") - .process("findImmunizationProcessor"); - + .routeId("find-immunization-route") + .process("findImmunizationProcessor"); // @formatter:on } } diff --git a/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java index 09e06363c..1d4ecdd6d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java @@ -17,11 +17,7 @@ package org.ehrbase.fhirbridge.config; import ca.uhn.fhir.jpa.api.config.DaoConfig; -import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; -import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoCodeSystem; -import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoConceptMap; -import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoSearchParameter; -import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoValueSet; +import ca.uhn.fhir.jpa.api.dao.*; import ca.uhn.fhir.jpa.config.r4.BaseR4Config; import ca.uhn.fhir.jpa.dao.JpaResourceDao; import ca.uhn.fhir.jpa.dao.r4.FhirResourceDaoCodeSystemR4; @@ -30,25 +26,7 @@ import ca.uhn.fhir.jpa.dao.r4.FhirResourceDaoValueSetR4; import ca.uhn.fhir.jpa.model.config.PartitionSettings; import ca.uhn.fhir.jpa.model.entity.ModelConfig; -import org.hl7.fhir.r4.model.AuditEvent; -import org.hl7.fhir.r4.model.CodeSystem; -import org.hl7.fhir.r4.model.CodeableConcept; -import org.hl7.fhir.r4.model.Coding; -import org.hl7.fhir.r4.model.ConceptMap; -import org.hl7.fhir.r4.model.Condition; -import org.hl7.fhir.r4.model.Consent; -import org.hl7.fhir.r4.model.Device; -import org.hl7.fhir.r4.model.DiagnosticReport; -import org.hl7.fhir.r4.model.Encounter; -import org.hl7.fhir.r4.model.Group; -import org.hl7.fhir.r4.model.Location; -import org.hl7.fhir.r4.model.MedicationStatement; -import org.hl7.fhir.r4.model.Observation; -import org.hl7.fhir.r4.model.Patient; -import org.hl7.fhir.r4.model.Procedure; -import org.hl7.fhir.r4.model.QuestionnaireResponse; -import org.hl7.fhir.r4.model.SearchParameter; -import org.hl7.fhir.r4.model.ValueSet; +import org.hl7.fhir.r4.model.*; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -139,6 +117,14 @@ public IFhirResourceDao<Group> groupDao() { return groupDao; } + @Bean + public IFhirResourceDao<Immunization> immunizationDao() { + JpaResourceDao<Immunization> resourceDao = new JpaResourceDao<>(); + resourceDao.setResourceType(Immunization.class); + resourceDao.setContext(fhirContext()); + return resourceDao; + } + @Bean public IFhirResourceDao<Location> locationDao() { JpaResourceDao<Location> locationDao = new JpaResourceDao<>(); diff --git a/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java index 4a87930db..32d0f8587 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java @@ -4,16 +4,7 @@ import org.ehrbase.fhirbridge.camel.processor.FindResourceProcessor; import org.ehrbase.fhirbridge.camel.processor.ProvideResourcePersistenceProcessor; import org.ehrbase.fhirbridge.core.repository.ResourceMapRepository; -import org.hl7.fhir.r4.model.AuditEvent; -import org.hl7.fhir.r4.model.Condition; -import org.hl7.fhir.r4.model.Consent; -import org.hl7.fhir.r4.model.DiagnosticReport; -import org.hl7.fhir.r4.model.MedicationStatement; -import org.hl7.fhir.r4.model.Observation; -import org.hl7.fhir.r4.model.Encounter; -import org.hl7.fhir.r4.model.Patient; -import org.hl7.fhir.r4.model.Procedure; -import org.hl7.fhir.r4.model.QuestionnaireResponse; +import org.hl7.fhir.r4.model.*; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -46,6 +37,11 @@ public ProvideResourcePersistenceProcessor<Encounter> provideEncounterPersistenc return new ProvideResourcePersistenceProcessor<>(encounterDao, Encounter.class, resourceMapRepository); } + @Bean + public ProvideResourcePersistenceProcessor<Immunization> provideImmunizationPersistenceProcessor(IFhirResourceDao<Immunization> immunizationDao) { + return new ProvideResourcePersistenceProcessor<>(immunizationDao, Immunization.class, resourceMapRepository); + } + @Bean public ProvideResourcePersistenceProcessor<Observation> provideObservationPersistenceProcessor(IFhirResourceDao<Observation> observationDao) { return new ProvideResourcePersistenceProcessor<>(observationDao, Observation.class, resourceMapRepository); @@ -96,6 +92,11 @@ public FindResourceProcessor<Encounter> findEncounterProcessor(IFhirResourceDao< return new FindResourceProcessor<>(encounterDao); } + @Bean + public FindResourceProcessor<Immunization> findImmunizationProcessor(IFhirResourceDao<Immunization> immunizationDao) { + return new FindResourceProcessor<>(immunizationDao); + } + @Bean public FindResourceProcessor<Observation> findObservationProcessor(IFhirResourceDao<Observation> observationDao) { return new FindResourceProcessor<>(observationDao); diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationProvider.java deleted file mode 100644 index f2616aa1d..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationProvider.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.fhir.immunization; - -import ca.uhn.fhir.rest.annotation.Create; -import ca.uhn.fhir.rest.annotation.ResourceParam; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.api.server.RequestDetails; -import org.hl7.fhir.r4.model.Immunization; -import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * Concrete implementation of {@link AbstractPlainProvider} that provides REST support - * for 'Create Immunization' transaction. - * - * @since 1.2.0 - */ -public class CreateImmunizationProvider extends AbstractPlainProvider { - - @Create - public MethodOutcome create(@ResourceParam Immunization observation, RequestDetails requestDetails, - HttpServletRequest request, HttpServletResponse response) { - return requestAction(observation, null, request, response, requestDetails); - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationAuditStrategy.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/ProvideImmunizationAuditStrategy.java similarity index 81% rename from src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationAuditStrategy.java rename to src/main/java/org/ehrbase/fhirbridge/fhir/immunization/ProvideImmunizationAuditStrategy.java index 4ec293b26..110256785 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationAuditStrategy.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/ProvideImmunizationAuditStrategy.java @@ -23,13 +23,13 @@ import java.util.Optional; /** - * Custom implementation of {@link GenericFhirAuditStrategy} for 'Create Immunization' transaction. + * Custom implementation of {@link GenericFhirAuditStrategy} for 'Provide Immunization' transaction. * * @since 1.2.0 */ -public class CreateImmunizationAuditStrategy extends GenericFhirAuditStrategy<Immunization> { +public class ProvideImmunizationAuditStrategy extends GenericFhirAuditStrategy<Immunization> { - public CreateImmunizationAuditStrategy() { + public ProvideImmunizationAuditStrategy() { super(true, OperationOutcomeOperations.INSTANCE, immunization -> Optional.of(immunization.getPatient())); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/ProvideImmunizationProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/ProvideImmunizationProvider.java new file mode 100644 index 000000000..a5a793249 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/ProvideImmunizationProvider.java @@ -0,0 +1,61 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.fhir.immunization; + +import ca.uhn.fhir.rest.annotation.*; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import org.hl7.fhir.r4.model.IdType; +import org.hl7.fhir.r4.model.Immunization; +import org.openehealth.ipf.commons.ihe.fhir.AbstractPlainProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Implementation of {@link AbstractPlainProvider} that handles 'Provide Immunization' transaction + * using {@link Create} and {@link Update} operations. + * + * @since 1.2.0 + */ +@SuppressWarnings("unused") +public class ProvideImmunizationProvider extends AbstractPlainProvider { + + private static final Logger LOG = LoggerFactory.getLogger(ProvideImmunizationProvider.class); + + @Create + public MethodOutcome create(@ResourceParam Immunization immunization, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide Immunization' transaction using 'create' operation..."); + return requestAction(immunization, null, request, response, requestDetails); + } + + @Update + public MethodOutcome update(@ResourceParam Immunization immunization, + @IdParam IdType id, + @ConditionalUrlParam String conditionalUrl, + RequestDetails requestDetails, + HttpServletRequest request, + HttpServletResponse response) { + LOG.trace("Executing 'Provide Immunization' transaction using 'update' operation..."); + return requestAction(immunization, null, request, response, requestDetails); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationTransaction.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/ProvideImmunizationTransaction.java similarity index 69% rename from src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationTransaction.java rename to src/main/java/org/ehrbase/fhirbridge/fhir/immunization/ProvideImmunizationTransaction.java index 259abc30d..e209b7ef0 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/CreateImmunizationTransaction.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/ProvideImmunizationTransaction.java @@ -22,20 +22,22 @@ import org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditDataset; /** - * {@link FhirTransactionConfiguration} for 'Create Immunization'. + * 'Provide Immunization' {@link org.openehealth.ipf.commons.ihe.core.TransactionConfiguration TransactionConfiguration}. + * <p> + * Note: Server-side only * * @since 1.2.0 */ -public class CreateImmunizationTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { +public class ProvideImmunizationTransaction extends FhirTransactionConfiguration<GenericFhirAuditDataset> { - public CreateImmunizationTransaction() { - super("immunization-create", - "Create Immunization", + public ProvideImmunizationTransaction() { + super("immunization-provide", + "Provide Immunization Transaction", false, null, - new CreateImmunizationAuditStrategy(), + new ProvideImmunizationAuditStrategy(), FhirVersionEnum.R4, - new CreateImmunizationProvider(), + new ProvideImmunizationProvider(), null, FhirTransactionValidator.NO_VALIDATION); } diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/immunization-create b/src/main/resources/META-INF/services/org/apache/camel/component/immunization-create deleted file mode 100644 index 79360c9ea..000000000 --- a/src/main/resources/META-INF/services/org/apache/camel/component/immunization-create +++ /dev/null @@ -1 +0,0 @@ -class=org.ehrbase.fhirbridge.camel.component.fhir.immunization.CreateImmunizationComponent \ No newline at end of file diff --git a/src/main/resources/META-INF/services/org/apache/camel/component/immunization-provide b/src/main/resources/META-INF/services/org/apache/camel/component/immunization-provide new file mode 100644 index 000000000..d38aa020e --- /dev/null +++ b/src/main/resources/META-INF/services/org/apache/camel/component/immunization-provide @@ -0,0 +1 @@ +class=org.ehrbase.fhirbridge.camel.component.fhir.immunization.ProvideImmunizationComponent \ No newline at end of file diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/immunization/HistoryOfVaccinationIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/immunization/HistoryOfVaccinationIT.java index 91641076d..cea0354c2 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/immunization/HistoryOfVaccinationIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/immunization/HistoryOfVaccinationIT.java @@ -31,7 +31,7 @@ /** * Integration tests for {@link Immunization} using History of Vaccination profile. */ -public class HistoryOfVaccinationIT extends AbstractMappingTestSetupIT { +class HistoryOfVaccinationIT extends AbstractMappingTestSetupIT { public HistoryOfVaccinationIT() { super("Immunization/", Immunization.class); } @@ -113,7 +113,7 @@ public void testMapping(String resourcePath, String paragonPath) throws IOExcept ImpfstatusCompositionConverter impfstatusCompositionConverter = new ImpfstatusCompositionConverter(); ImpfstatusComposition mappedImpfstatusComposition = impfstatusCompositionConverter.convert(immunization); Diff diff = compareCompositions(getJavers(), paragonPath, mappedImpfstatusComposition); - assertEquals(diff.getChanges().size(), 0); + assertEquals(0, diff.getChanges().size()); } From 7dd4716d647728f83f5f441f4ec71281acb54349 Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Wed, 30 Jun 2021 14:15:38 +0200 Subject: [PATCH 113/141] added merge --- .../config/HapiFhirJpaConfiguration.java | 27 +++++++++++++++++-- .../config/camel/ProcessorConfiguration.java | 12 ++++++++- .../ProvideImmunizationProvider.java | 6 ++++- .../fhirbridge/fhir/support/Resources.java | 7 +++++ 4 files changed, 48 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java index 1d4ecdd6d..413b21ac3 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java @@ -17,7 +17,11 @@ package org.ehrbase.fhirbridge.config; import ca.uhn.fhir.jpa.api.config.DaoConfig; -import ca.uhn.fhir.jpa.api.dao.*; +import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; +import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoCodeSystem; +import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoConceptMap; +import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoSearchParameter; +import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoValueSet; import ca.uhn.fhir.jpa.config.r4.BaseR4Config; import ca.uhn.fhir.jpa.dao.JpaResourceDao; import ca.uhn.fhir.jpa.dao.r4.FhirResourceDaoCodeSystemR4; @@ -26,7 +30,26 @@ import ca.uhn.fhir.jpa.dao.r4.FhirResourceDaoValueSetR4; import ca.uhn.fhir.jpa.model.config.PartitionSettings; import ca.uhn.fhir.jpa.model.entity.ModelConfig; -import org.hl7.fhir.r4.model.*; +import org.hl7.fhir.r4.model.AuditEvent; +import org.hl7.fhir.r4.model.CodeSystem; +import org.hl7.fhir.r4.model.CodeableConcept; +import org.hl7.fhir.r4.model.Coding; +import org.hl7.fhir.r4.model.ConceptMap; +import org.hl7.fhir.r4.model.Condition; +import org.hl7.fhir.r4.model.Consent; +import org.hl7.fhir.r4.model.Device; +import org.hl7.fhir.r4.model.DiagnosticReport; +import org.hl7.fhir.r4.model.Encounter; +import org.hl7.fhir.r4.model.Group; +import org.hl7.fhir.r4.model.Immunization; +import org.hl7.fhir.r4.model.Location; +import org.hl7.fhir.r4.model.MedicationStatement; +import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.r4.model.Patient; +import org.hl7.fhir.r4.model.Procedure; +import org.hl7.fhir.r4.model.QuestionnaireResponse; +import org.hl7.fhir.r4.model.SearchParameter; +import org.hl7.fhir.r4.model.ValueSet; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java index 32d0f8587..e784a45b4 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java @@ -4,7 +4,17 @@ import org.ehrbase.fhirbridge.camel.processor.FindResourceProcessor; import org.ehrbase.fhirbridge.camel.processor.ProvideResourcePersistenceProcessor; import org.ehrbase.fhirbridge.core.repository.ResourceMapRepository; -import org.hl7.fhir.r4.model.*; +import org.hl7.fhir.r4.model.AuditEvent; +import org.hl7.fhir.r4.model.Condition; +import org.hl7.fhir.r4.model.Consent; +import org.hl7.fhir.r4.model.DiagnosticReport; +import org.hl7.fhir.r4.model.Encounter; +import org.hl7.fhir.r4.model.Immunization; +import org.hl7.fhir.r4.model.MedicationStatement; +import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.r4.model.Patient; +import org.hl7.fhir.r4.model.Procedure; +import org.hl7.fhir.r4.model.QuestionnaireResponse; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/ProvideImmunizationProvider.java b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/ProvideImmunizationProvider.java index a5a793249..cf2441ca5 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/ProvideImmunizationProvider.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/immunization/ProvideImmunizationProvider.java @@ -16,7 +16,11 @@ package org.ehrbase.fhirbridge.fhir.immunization; -import ca.uhn.fhir.rest.annotation.*; +import ca.uhn.fhir.rest.annotation.ConditionalUrlParam; +import ca.uhn.fhir.rest.annotation.Create; +import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.annotation.ResourceParam; +import ca.uhn.fhir.rest.annotation.Update; import ca.uhn.fhir.rest.api.MethodOutcome; import ca.uhn.fhir.rest.api.server.RequestDetails; import org.hl7.fhir.r4.model.IdType; diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java index f57ffd49e..0a24c72c1 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java @@ -7,6 +7,7 @@ import org.hl7.fhir.r4.model.Consent; import org.hl7.fhir.r4.model.DiagnosticReport; import org.hl7.fhir.r4.model.Encounter; +import org.hl7.fhir.r4.model.Immunization; import org.hl7.fhir.r4.model.MedicationStatement; import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.PrimitiveType; @@ -57,6 +58,8 @@ public static Optional<Reference> getSubject(Resource resource) { return getSubject((DiagnosticReport) resource); case Encounter: return getSubject((Encounter) resource); + case Immunization: + return getSubject((Immunization) resource); case MedicationStatement: return getSubject((MedicationStatement) resource); case Observation: @@ -78,6 +81,10 @@ public static Optional<Reference> getSubject(Consent consent) { return consent.hasPatient() ? Optional.of(consent.getPatient()) : Optional.empty(); } + public static Optional<Reference> getSubject(Immunization immunization) { + return immunization.hasPatient() ? Optional.of(immunization.getPatient()) : Optional.empty(); + } + public static Optional<Reference> getSubject(DiagnosticReport diagnosticReport) { return diagnosticReport.hasSubject() ? Optional.of(diagnosticReport.getSubject()) : Optional.empty(); } From 265bc3ccd3156ba5b5ebdcb8bb11f1beb6be91fc Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Wed, 30 Jun 2021 19:01:47 +0200 Subject: [PATCH 114/141] Merge Postman Collection and Environment --- .../fhir-bridge.postman_collection.json | 434 ++++++++++++++++++ .../fhir-bridge.postman_environment.json | 26 +- 2 files changed, 457 insertions(+), 3 deletions(-) diff --git a/config/postman/fhir-bridge.postman_collection.json b/config/postman/fhir-bridge.postman_collection.json index 1db8ac2e4..1010f76d8 100644 --- a/config/postman/fhir-bridge.postman_collection.json +++ b/config/postman/fhir-bridge.postman_collection.json @@ -1159,6 +1159,440 @@ } ] }, + { + "name": "Encounter", + "item": [ + { + "name": "Create Stat. Versorgunsfall", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Encounter\",\r\n \"id\": \"5844e89b-c8f3-4e26-bc0f-502e00293874\",\r\n \"status\": \"finished\",\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"VN\"\r\n }\r\n ]\r\n },\r\n \"system\": \"http://medizininformatik-initiative.de/fhir/NamingSystem/Aufnahmenummer/MusterKrankenhaus\",\r\n \"value\": \"F_0000002\",\r\n \"period\": {\r\n \"start\": \"2021-02-13T03:04:00+01:00\",\r\n \"end\": \"2021-03-01T20:42:00+01:00\"\r\n }\r\n }\r\n ],\r\n \"class\": {\r\n \"code\": \"IMP\",\r\n \"display\": \"stationär\",\r\n \"system\": \"http://hl7.org/fhir/v3/ActCode/cs.html\"\r\n },\r\n \"serviceType\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel\",\r\n \"code\": \"3700\",\r\n \"userSelected\": false\r\n }\r\n ]\r\n },\r\n \"serviceProvider\": {\r\n \"identifier\": {\r\n \"system\": \"http://medizininformatik-initiative.de/fhir/NamingSystem/Einrichtungsidentifikator/MusterKrankenhaus\",\r\n \"value\": \"260123451_MusterKrankenhaus\"\r\n }\r\n },\r\n \"diagnosis\": [\r\n {\r\n \"condition\": {\r\n \"reference\": \"Condition/e6b6895c-549b-47c5-a842-41100761385d\"\r\n }\r\n }\r\n ],\r\n \"hospitalization\": {\r\n \"admitSource\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass\",\r\n \"code\": \"N\"\r\n }\r\n ]\r\n },\r\n \"dischargeDisposition\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund\",\r\n \"code\": \"12\"\r\n }\r\n ]\r\n }\r\n },\r\n \"reasonCode\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund\",\r\n \"code\": \"07\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"period\": {\r\n \"start\": \"2021-02-13T03:04:00+01:00\",\r\n \"end\": \"2021-03-01T20:42:00+01:00\"\r\n }\r\n}" + }, + "url": { + "raw": "{{baseUrl}}/fhir/Encounter", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Encounter" + ] + } + }, + "response": [] + }, + { + "name": "Create Patienten Aufenthalt", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceType\": \"Encounter\",\r\n \"id\": \"28436186-b5b3-4881-b000-8a89abf659b7\",\r\n \"meta\": {\r\n \"profile\": [\r\n \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/StructureDefinition/KontaktGesundheitseinrichtung\"\r\n ]\r\n },\r\n \"identifier\": [\r\n {\r\n \"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\r\n \"code\": \"VN\"\r\n }\r\n ]\r\n },\r\n \"system\": \"http://medizininformatik-initiative.de/fhir/NamingSystem/Aufnahmenummer/MusterKrankenhaus\",\r\n \"value\": \"F_0000001\",\r\n \"period\": {\r\n \"start\": \"2021-02-13T03:04:00+01:00\",\r\n \"end\": \"2021-03-01T20:42:00+01:00\"\r\n }\r\n }\r\n ],\r\n \"status\": \"finished\",\r\n \"class\": {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/CodeSystem/EncounterClassAdditionsDE\",\r\n \"code\": \"operation\",\r\n \"display\": \"Operation\"\r\n },\r\n \"type\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Kontaktebene\",\r\n \"code\": \"abteilungskontakt\",\r\n \"display\": \"Abteilungskontakt\",\r\n \"userSelected\": false\r\n }\r\n ]\r\n }\r\n ],\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"urn:ietf:rfc:4122\",\r\n \"value\": \"{{patientId}}\"\r\n }\r\n },\r\n \"diagnosis\": [\r\n {\r\n \"condition\": {\r\n \"reference\": \"Condition/e6b6895c-549b-47c5-a842-41100761385d\"\r\n }\r\n }\r\n ],\r\n \"period\": {\r\n \"start\": \"2021-02-13T03:04:00+01:00\",\r\n \"end\": \"2021-03-01T20:42:00+01:00\"\r\n },\r\n \"reasonCode\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/modul-fall/core/CodeSystem/Aufnahmegrund\",\r\n \"code\": \"01\",\r\n \"display\": \"Krankenhausbehandlung, vollstationär\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"hospitalization\": {\r\n \"admitSource\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Aufnahmeanlass\",\r\n \"code\": \"E\",\r\n \"display\": \"Einweisung durch einen Arzt\"\r\n }\r\n ]\r\n },\r\n \"dischargeDisposition\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Entlassungsgrund\",\r\n \"code\": \"019\",\r\n \"display\": \"Behandlung regulär beendet, arbeitsfähig entlassen\"\r\n }\r\n ]\r\n }\r\n },\r\n \"location\": [\r\n {\r\n \"location\": {\r\n \"reference\": \"Location/FD7DF5FD052E1CBCF7F41B12804D596C71FFBE1958B58EF06401DD781B2A53D3\"\r\n },\r\n \"status\": \"active\",\r\n \"physicalType\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.hl7.org/fhir/valueset-location-physical-type.html\",\r\n \"code\": \"bd\",\r\n \"userSelected\": false\r\n }\r\n ],\r\n \"text\": \"Bett\"\r\n },\r\n \"period\": {\r\n \"start\": \"2021-02-13T03:04:00+01:00\",\r\n \"end\": \"2021-03-01T20:42:00+01:00\"\r\n }\r\n }\r\n ],\r\n \"serviceType\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel\",\r\n \"code\": \"3700\",\r\n \"userSelected\": false\r\n }\r\n ]\r\n },\r\n \"serviceProvider\": {\r\n \"identifier\": {\r\n \"system\": \"http://medizininformatik-initiative.de/fhir/NamingSystem/Abteilungsidentifikator/MusterKrankenhaus\",\r\n \"value\": \"1500_ACHI\"\r\n }\r\n }\r\n}" + }, + "url": { + "raw": "{{baseUrl}}/fhir/Encounter", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Encounter" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Immunization", + "item": [ + { + "name": "Find Immunization: read", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/fhir/Immunization/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "2" + } + ] + } + }, + "response": [] + }, + { + "name": "Find Immunization: vread", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/fhir/Immunization/:id/_history/:vid", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization", + ":id", + "_history", + ":vid" + ], + "variable": [ + { + "key": "id", + "value": "1" + }, + { + "key": "vid", + "value": "1" + } + ] + } + }, + "response": [] + }, + { + "name": "Find Immunization: search", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/fhir/Immunization?status=error", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization" + ], + "query": [ + { + "key": "_id", + "value": "2", + "disabled": true + }, + { + "key": "_language", + "value": null, + "disabled": true + }, + { + "key": "_profile", + "value": null, + "disabled": true + }, + { + "key": "_source", + "value": null, + "disabled": true + }, + { + "key": "_security", + "value": null, + "disabled": true + }, + { + "key": "_tag", + "value": null, + "disabled": true + }, + { + "key": "_content", + "value": null, + "disabled": true + }, + { + "key": "_text", + "value": null, + "disabled": true + }, + { + "key": "_filter", + "value": null, + "disabled": true + }, + { + "key": "date", + "value": null, + "disabled": true + }, + { + "key": "identifier", + "value": null, + "disabled": true + }, + { + "key": "location", + "value": null, + "disabled": true + }, + { + "key": "lot-number", + "value": null, + "disabled": true + }, + { + "key": "manufacturer", + "value": null, + "disabled": true + }, + { + "key": "patient", + "value": null, + "disabled": true + }, + { + "key": "performer", + "value": null, + "disabled": true + }, + { + "key": "reaction", + "value": "", + "disabled": true + }, + { + "key": "reaction-date", + "value": null, + "disabled": true + }, + { + "key": "reason-code", + "value": null, + "disabled": true + }, + { + "key": "reason-reference", + "value": null, + "disabled": true + }, + { + "key": "series", + "value": null, + "disabled": true + }, + { + "key": "status", + "value": "error" + }, + { + "key": "status-reason", + "value": null, + "disabled": true + }, + { + "key": "target-disease", + "value": "", + "disabled": true + }, + { + "key": "vaccine-code", + "value": null, + "disabled": true + } + ] + } + }, + "response": [] + }, + { + "name": "Create Immunization", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"id\": \"b7db30a0-4ffd-4dd6-b3e5-53e2730789e6\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization\"\n ]\n },\n \"_occurrenceDateTime\": {\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/data-absent-reason\",\n \"valueCode\": \"unknown\"\n }\n ]\n },\n \"patient\": {\n \"reference\": \"Patient/c786ac3c-0579-4aa2-adda-db784b214ad6\",\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"status\": \"not-done\",\n \"vaccineCode\": {\n \"coding\": [\n {\n \"code\": \"no-known-immunizations\",\n \"display\": \"No known immunizations\",\n \"system\": \"http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips\"\n }\n ]\n },\n \"resourceType\": \"Immunization\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Immunization", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization" + ] + } + }, + "response": [] + }, + { + "name": "Create Immunization 2", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"Immunization\",\n \"id\": \"c17f192c-f765-4729-818a-4ee55be5c87b\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization\"\n ]\n },\n \"status\": \"completed\",\n \"vaccineCode\": {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"1119349007\",\n \"display\": \"Vaccine product containing only Severe acute respiratory syndrome coronavirus 2 messenger ribonucleic acid (medicinal product)\"\n }\n ]\n },\n \"patient\": {\n \"reference\": \"Patient/21acfc9c-1fd6-43e6-a8fe-c6b6341b0fab\",\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"occurrenceDateTime\": \"2020-12-27\",\n \"protocolApplied\": [\n {\n \"targetDisease\": [\n {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"840539006\",\n \"display\": \"Disease caused by Severe acute respiratory syndrome coronavirus 2 (disorder)\"\n }\n ]\n }\n ],\n \"_doseNumberString\": {\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/data-absent-reason\",\n \"valueCode\": \"unknown\"\n }\n ]\n }\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Immunization", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization" + ] + } + }, + "response": [] + }, + { + "name": "Create Immunization 3", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"Immunization\",\n \"id\": \"85bd2fab-256b-43d6-9671-4f97c1407d0f\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization\"\n ]\n },\n \"status\": \"completed\",\n \"vaccineCode\": {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"333598008\",\n \"display\": \"Pneumococcal vaccine\"\n }\n ]\n },\n \"patient\": {\n \"reference\": \"Patient/c786ac3c-0579-4aa2-adda-db784b214ad6\",\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"occurrenceDateTime\": \"2020-10-06\",\n \"protocolApplied\": [\n {\n \"targetDisease\": [\n {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"16814004\",\n \"display\": \"Pneumococcal infectious disease\"\n }\n ]\n }\n ],\n \"_doseNumberString\": {\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/data-absent-reason\",\n \"valueCode\": \"unknown\"\n }\n ]\n }\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Immunization", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization" + ] + } + }, + "response": [] + }, + { + "name": "Create Immunization 4", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"Immunization\",\n \"id\": \"c17f192c-f765-4729-818a-4ee55be5c87b\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization\"\n ]\n },\n \"status\": \"completed\",\n \"vaccineCode\": {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"1119349007\",\n \"display\": \"Vaccine product containing only Severe acute respiratory syndrome coronavirus 2 messenger ribonucleic acid (medicinal product)\"\n }\n ]\n },\n \"patient\": {\n \"reference\": \"Patient/21acfc9c-1fd6-43e6-a8fe-c6b6341b0fab\",\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"occurrenceDateTime\": \"2020-12-27\",\n \"protocolApplied\": [\n {\n \"targetDisease\": [\n {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"840539006\",\n \"display\": \"Disease caused by Severe acute respiratory syndrome coronavirus 2 (disorder)\"\n }\n ]\n }\n ],\n \"_doseNumberString\": {\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/data-absent-reason\",\n \"valueCode\": \"unknown\"\n }\n ]\n }\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Immunization", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization" + ] + } + }, + "response": [] + }, + { + "name": "Create Immunization not done", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"id\": \"b7db30a0-4ffd-4dd6-b3e5-53e2730789e6\",\n \"meta\": {\n \"profile\": [\n \"https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization\"\n ]\n },\n \"_occurrenceDateTime\": {\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/data-absent-reason\",\n \"valueCode\": \"unknown\"\n }\n ]\n },\n \"patient\": {\n \"reference\": \"Patient/c786ac3c-0579-4aa2-adda-db784b214ad6\",\n \"identifier\": {\n \"system\": \"urn:ietf:rfc:4122\",\n \"value\": \"{{patientId}}\"\n }\n },\n \"status\": \"not-done\",\n \"vaccineCode\": {\n \"coding\": [\n {\n \"code\": \"no-known-immunizations\",\n \"display\": \"No known immunizations\",\n \"system\": \"http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips\"\n }\n ]\n },\n \"resourceType\": \"Immunization\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/fhir/Immunization", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "fhir", + "Immunization" + ] + } + }, + "response": [] + } + ] + }, { "name": "MedicationStatement", "item": [ diff --git a/config/postman/fhir-bridge.postman_environment.json b/config/postman/fhir-bridge.postman_environment.json index 2abf9c23a..72ccbb242 100644 --- a/config/postman/fhir-bridge.postman_environment.json +++ b/config/postman/fhir-bridge.postman_environment.json @@ -1,5 +1,5 @@ { - "id": "f0768b4d-dafd-40a8-9e5f-bd51cccda99d", + "id": "8b5426eb-2d0e-40a1-829f-aff33117740e", "name": "fhir-bridge", "values": [ { @@ -11,9 +11,29 @@ "key": "patientId", "value": "07f602e0-579e-4fe3-95af-381728bf0d49", "enabled": true + }, + { + "key": "tokenUrl", + "value": "http://localhost:8081/auth/realms/ehrbase/protocol/openid-connect/token", + "enabled": true + }, + { + "key": "clientId", + "value": "fhir-bridge", + "enabled": true + }, + { + "key": "clientSecret", + "value": "e694dbaa-9c19-4712-b607-70ef6379ff39", + "enabled": true + }, + { + "key": "access_token", + "value": "", + "enabled": true } ], "_postman_variable_scope": "environment", - "_postman_exported_at": "2021-01-13T18:07:58.741Z", - "_postman_exported_using": "Postman/7.36.1" + "_postman_exported_at": "2021-06-30T17:00:59.472Z", + "_postman_exported_using": "Postman/8.7.0" } \ No newline at end of file From e2adfe75bf68acf07257eddea2f9b8d64667b068 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Thu, 1 Jul 2021 11:23:38 +0200 Subject: [PATCH 115/141] Add IT for using search for patient using identifier --- .../fhir/AbstractTransactionIT.java | 2 +- .../ProvideConditionTransactionIT.java | 39 ++++++++++++ .../transactions/codex-create-condition.json | 59 +++++++++++++++++++ .../transactions/codex-update-condition.json | 59 +++++++++++++++++++ 4 files changed, 158 insertions(+), 1 deletion(-) create mode 100644 src/test/resources/Condition/transactions/codex-create-condition.json create mode 100644 src/test/resources/Condition/transactions/codex-update-condition.json diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/AbstractTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/AbstractTransactionIT.java index 34fb77235..8184f2fe1 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/AbstractTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/AbstractTransactionIT.java @@ -55,7 +55,7 @@ protected Bundle search(String searchUrl) { .execute(); } - private String getResourceAsString(String resourceLocation) throws IOException { + protected String getResourceAsString(String resourceLocation) throws IOException { Reader reader = new InputStreamReader(new ClassPathResource(resourceLocation).getInputStream(), StandardCharsets.UTF_8); String resource = FileCopyUtils.copyToString(reader); return resource.replaceAll(PATIENT_ID_TOKEN, PATIENT_ID); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionTransactionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionTransactionIT.java index 54af3708d..9b9c62470 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionTransactionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/condition/ProvideConditionTransactionIT.java @@ -1,12 +1,15 @@ package org.ehrbase.fhirbridge.fhir.condition; import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.gclient.IUpdateTyped; import org.ehrbase.fhirbridge.fhir.AbstractTransactionIT; import org.hl7.fhir.r4.model.Condition; +import org.hl7.fhir.r4.model.Patient; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import java.io.IOException; +import java.util.UUID; /** * Integration Tests that validate "Provide Condition" transaction. @@ -43,4 +46,40 @@ void provideConditionConditionalUpdate() throws IOException { Assertions.assertEquals(PATIENT_ID, condition.getSubject().getIdentifier().getValue()); } + + @Test + void provideConditionConditionalUpdateCodex() throws IOException { + String patientIdentifier = UUID.randomUUID().toString(); + + MethodOutcome outcome; + String resource; + + resource = getResourceAsString("Condition/transactions/codex-create-condition.json"); + outcome = client.create() + .resource(resource.replace("{{patientIdentifier}}", patientIdentifier)) + .execute(); + + var id = outcome.getId(); + + resource = getResourceAsString("Condition/transactions/codex-update-condition.json"); + IUpdateTyped update = client.update() + .resource(resource.replace("{{patientIdentifier}}", patientIdentifier)); + + outcome = update.conditional() + .where(Condition.SUBJECT + .hasChainedProperty(Patient.IDENTIFIER.exactly() + .systemAndIdentifier("http://www.netzwerk-universitaetsmedizin.de/sid/crr-pseudonym", patientIdentifier))) + .execute(); + + Assertions.assertEquals(id.getIdPart(), outcome.getId().getIdPart()); + Assertions.assertEquals(id.getVersionIdPartAsLong() + 1, outcome.getId().getVersionIdPartAsLong()); + + var condition = (Condition) outcome.getResource(); + + var clinicalStatus = condition.getClinicalStatus(); + Assertions.assertEquals("resolved", clinicalStatus.getCodingFirstRep().getCode()); + + var verificationStatus = condition.getVerificationStatus(); + Assertions.assertEquals("refuted", verificationStatus.getCodingFirstRep().getCode()); + } } diff --git a/src/test/resources/Condition/transactions/codex-create-condition.json b/src/test/resources/Condition/transactions/codex-create-condition.json new file mode 100644 index 000000000..c7eda9b97 --- /dev/null +++ b/src/test/resources/Condition/transactions/codex-create-condition.json @@ -0,0 +1,59 @@ +{ + "resourceType": "Condition", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/chronic-lung-diseases" + ] + }, + "clinicalStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", + "code": "active", + "display": "Active" + } + ] + }, + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "confirmed", + "display": "Confirmed" + }, + { + "system": "http://snomed.info/sct", + "code": "410605003", + "display": "Confirmed present (qualifier value)" + } + ] + }, + "category": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "418112009", + "display": "Pulmonary medicine" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "51615001", + "display": "Fibrosis of lung" + } + ] + }, + "subject": { + "reference": "/Patient?identifier=http://www.netzwerk-universitaetsmedizin.de/sid/crr-pseudonym|{{patientIdentifier}}", + "identifier": { + "system": "http://www.netzwerk-universitaetsmedizin.de/sid/crr-pseudonym", + "value": "{{patientIdentifier}}" + } + }, + "recordedDate": "2020-10-06" +} diff --git a/src/test/resources/Condition/transactions/codex-update-condition.json b/src/test/resources/Condition/transactions/codex-update-condition.json new file mode 100644 index 000000000..01a6183a7 --- /dev/null +++ b/src/test/resources/Condition/transactions/codex-update-condition.json @@ -0,0 +1,59 @@ +{ + "resourceType": "Condition", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/chronic-lung-diseases" + ] + }, + "clinicalStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", + "code": "resolved", + "display": "Resolved" + } + ] + }, + "verificationStatus": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", + "code": "refuted", + "display": "Refuted" + }, + { + "system": "http://snomed.info/sct", + "code": "410605003", + "display": "Confirmed present (qualifier value)" + } + ] + }, + "category": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "418112009", + "display": "Pulmonary medicine" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "51615001", + "display": "Fibrosis of lung" + } + ] + }, + "subject": { + "reference": "/Patient?identifier=http://www.netzwerk-universitaetsmedizin.de/sid/crr-pseudonym|{{patientIdentifier}}", + "identifier": { + "system": "http://www.netzwerk-universitaetsmedizin.de/sid/crr-pseudonym", + "value": "{{patientIdentifier}}" + } + }, + "recordedDate": "2020-10-06" +} From a3387f99d0f0aa3fc895c7d15138a822f9a2f5cc Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Thu, 1 Jul 2021 20:57:54 +0200 Subject: [PATCH 116/141] Update patient process --- .../fhirbridge/camel/CamelConstants.java | 8 +- .../processor/ProvidePatientProcessor.java | 129 ++++++++++++++++++ .../ProvideResourceAuditHandler.java | 2 +- .../ProvideResourcePersistenceProcessor.java | 14 +- .../ProvideResourceResponseProcessor.java | 40 +++--- .../fhirbridge/camel/route/CommonRoutes.java | 6 +- .../camel/route/EncounterRoutes.java | 2 +- .../fhirbridge/camel/route/PatientRoutes.java | 28 +++- .../config/HapiFhirJpaConfiguration.java | 4 +- .../config/camel/ProcessorConfiguration.java | 28 ++-- .../fhirbridge/core/domain/PatientEhr.java | 69 ++++++++++ ...ourceMap.java => ResourceComposition.java} | 47 ++----- ...ository.java => PatientEhrRepository.java} | 9 +- .../ResourceCompositionRepository.java | 23 ++++ .../db/changelog/db.changelog-1.2.xml | 16 +++ 15 files changed, 325 insertions(+), 100 deletions(-) create mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvidePatientProcessor.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/core/domain/PatientEhr.java rename src/main/java/org/ehrbase/fhirbridge/core/domain/{ResourceMap.java => ResourceComposition.java} (52%) rename src/main/java/org/ehrbase/fhirbridge/core/repository/{ResourceMapRepository.java => PatientEhrRepository.java} (76%) create mode 100644 src/main/java/org/ehrbase/fhirbridge/core/repository/ResourceCompositionRepository.java diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/CamelConstants.java b/src/main/java/org/ehrbase/fhirbridge/camel/CamelConstants.java index f7b8394fd..0b36ddc7d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/CamelConstants.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/CamelConstants.java @@ -17,17 +17,17 @@ package org.ehrbase.fhirbridge.camel; /** - * Constants used in the FHIR Bridge. + * Constants used by the FHIR Bridge. * * @since 1.0.0 */ public final class CamelConstants { - public static final String COMPOSITION_VERSION_UID = "FhirBridgeCompositionVersionUid"; + public static final String COMPOSITION_ID = "CamelFhirBridgeCompositionId"; - public static final String METHOD_OUTCOME = "FhirBridgeMethodOutcome"; + public static final String OUTCOME = "CamelFhirBridgeOutcome"; - public static final String PROFILE = "FhirBridgeProfile"; + public static final String PROFILE = "CamelFhirBridgeProfile"; public static final String RESOURCE_ID = "FhirBridgeResourceId"; diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvidePatientProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvidePatientProcessor.java new file mode 100644 index 000000000..f9859c59f --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvidePatientProcessor.java @@ -0,0 +1,129 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.camel.processor; + +import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.RestOperationTypeEnum; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import com.nedap.archie.rm.datavalues.DvText; +import com.nedap.archie.rm.ehr.EhrStatus; +import com.nedap.archie.rm.generic.PartySelf; +import com.nedap.archie.rm.support.identification.GenericId; +import com.nedap.archie.rm.support.identification.PartyRef; +import org.apache.camel.Exchange; +import org.apache.camel.Processor; +import org.ehrbase.client.openehrclient.OpenEhrClient; +import org.ehrbase.fhirbridge.camel.CamelConstants; +import org.ehrbase.fhirbridge.camel.component.ehr.composition.CompositionConstants; +import org.ehrbase.fhirbridge.core.domain.PatientEhr; +import org.ehrbase.fhirbridge.core.domain.ResourceComposition; +import org.ehrbase.fhirbridge.core.repository.PatientEhrRepository; +import org.ehrbase.fhirbridge.core.repository.ResourceCompositionRepository; +import org.hl7.fhir.r4.model.Patient; +import org.openehealth.ipf.commons.ihe.fhir.Constants; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import java.util.UUID; + +@Component +@SuppressWarnings("java:S6212") +public class ProvidePatientProcessor implements Processor { + + private static final Logger LOG = LoggerFactory.getLogger(ProvidePatientProcessor.class); + + private static final String ARCHETYPE_NODE_ID = "openEHR-EHR-EHR_STATUS.generic.v1"; + + private final IFhirResourceDao<Patient> patientDao; + + private final PatientEhrRepository patientEhrRepository; + + private final ResourceCompositionRepository resourceCompositionRepository; + + private final OpenEhrClient openEhrClient; + + private final String scheme; + + public ProvidePatientProcessor(IFhirResourceDao<Patient> patientDao, + PatientEhrRepository patientEhrRepository, + ResourceCompositionRepository resourceCompositionRepository, + OpenEhrClient openEhrClient) { + this.patientDao = patientDao; + this.patientEhrRepository = patientEhrRepository; + this.resourceCompositionRepository = resourceCompositionRepository; + this.openEhrClient = openEhrClient; + this.scheme = "fhirbridge.ehrbase.org"; // FIXME: Create configuration properties + } + + @Override + public void process(Exchange exchange) throws Exception { + Patient patient = exchange.getIn().getBody(Patient.class); + RequestDetails requestDetails = exchange.getIn().getHeader(Constants.FHIR_REQUEST_DETAILS, RequestDetails.class); + + switch (requestDetails.getRestOperationType()) { + case CREATE: + handleCreate(patient, requestDetails, exchange); + break; + case UPDATE: + handleUpdate(patient, requestDetails, exchange); + break; + default: + throw new IllegalArgumentException("Unsupported operation: " + requestDetails.getRestOperationType()); + } + } + + private void handleCreate(Patient patient, RequestDetails requestDetails, Exchange exchange) { + String conditionalUrl = requestDetails.getConditionalUrl(RestOperationTypeEnum.CREATE); + MethodOutcome outcome = patientDao.create(patient, conditionalUrl, requestDetails); + + UUID ehrId = createEhr(outcome.getId().getIdPart()); + + exchange.getMessage().setHeader(CompositionConstants.EHR_ID, ehrId); + exchange.setProperty(CamelConstants.OUTCOME, outcome); + } + + private void handleUpdate(Patient patient, RequestDetails requestDetails, Exchange exchange) { + String conditionalUrl = requestDetails.getConditionalUrl(RestOperationTypeEnum.UPDATE); + MethodOutcome outcome = patientDao.update(patient, conditionalUrl, requestDetails); + + String patientId = outcome.getId().getIdPart(); + UUID ehrId = patientEhrRepository.findById(patientId) + .map(PatientEhr::getEhrId) + .orElseGet(() -> createEhr(patientId)); + + exchange.setProperty(CamelConstants.OUTCOME, outcome); + exchange.getMessage().setHeader(CompositionConstants.EHR_ID, ehrId); + + resourceCompositionRepository.findById(patientId) + .map(ResourceComposition::getCompositionId) + .ifPresent(compositionId -> exchange.getMessage().setHeader(CamelConstants.COMPOSITION_ID, compositionId)); + } + + private UUID createEhr(String patientId) { + PartySelf subject = new PartySelf(new PartyRef(new GenericId(patientId, scheme), "DEMOGRAPHIC", "PERSON")); + EhrStatus ehrStatus = new EhrStatus(ARCHETYPE_NODE_ID, new DvText("EHR Status"), subject, true, true, null); + UUID ehrId = openEhrClient.ehrEndpoint().createEhr(ehrStatus); + + PatientEhr patientEhr = new PatientEhr(patientId, ehrId); + patientEhrRepository.save(patientEhr); + LOG.debug("Created PatientEhr: {}", patientEhr); + + return ehrId; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceAuditHandler.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceAuditHandler.java index 31e9c689f..f11a09c4c 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceAuditHandler.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceAuditHandler.java @@ -63,7 +63,7 @@ private AuditEvent.AuditEventSourceComponent source() { } private AuditEvent.AuditEventEntityComponent entity(Exchange exchange) { - MethodOutcome outcome = exchange.getProperty(CamelConstants.METHOD_OUTCOME, MethodOutcome.class); + MethodOutcome outcome = exchange.getProperty(CamelConstants.OUTCOME, MethodOutcome.class); RequestDetails requestDetails = exchange.getIn().getHeader(Constants.FHIR_REQUEST_DETAILS, RequestDetails.class); return new AuditEvent.AuditEventEntityComponent() diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourcePersistenceProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourcePersistenceProcessor.java index 692f8a448..17aca18be 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourcePersistenceProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourcePersistenceProcessor.java @@ -23,7 +23,7 @@ import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.ehrbase.fhirbridge.camel.CamelConstants; -import org.ehrbase.fhirbridge.core.repository.ResourceMapRepository; +import org.ehrbase.fhirbridge.core.repository.ResourceCompositionRepository; import org.hl7.fhir.instance.model.api.IBaseResource; import org.openehealth.ipf.commons.ihe.fhir.Constants; import org.slf4j.Logger; @@ -40,13 +40,13 @@ public class ProvideResourcePersistenceProcessor<T extends IBaseResource> implem private final Class<T> resourceType; - private final ResourceMapRepository resourceMapRepository; + private final ResourceCompositionRepository resourceCompositionRepository; public ProvideResourcePersistenceProcessor(IFhirResourceDao<T> resourceDao, Class<T> resourceType, - ResourceMapRepository resourceMapRepository) { + ResourceCompositionRepository resourceCompositionRepository) { this.resourceDao = resourceDao; this.resourceType = resourceType; - this.resourceMapRepository = resourceMapRepository; + this.resourceCompositionRepository = resourceCompositionRepository; } @Override @@ -64,15 +64,15 @@ public void process(Exchange exchange) throws Exception { break; case UPDATE: outcome = handleUpdateResource(resource, requestDetails); - resourceMapRepository.findById(outcome.getId().getIdPart()) - .ifPresent(resourceMap -> exchange.getMessage().setHeader(CamelConstants.COMPOSITION_VERSION_UID, resourceMap.getCompositionVersionUid())); + resourceCompositionRepository.findById(outcome.getId().getIdPart()) + .ifPresent(resourceMap -> exchange.getMessage().setHeader(CamelConstants.COMPOSITION_ID, resourceMap.getCompositionId())); break; default: throw new UnsupportedOperationException("Only 'Create', 'Transaction' or 'Update' operations are supported"); } exchange.getMessage().setHeader(CamelConstants.RESOURCE_ID, outcome.getId().getIdPart()); - exchange.setProperty(CamelConstants.METHOD_OUTCOME, outcome); + exchange.setProperty(CamelConstants.OUTCOME, outcome); } /** diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java index 24ceca635..6ff8debda 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java @@ -21,43 +21,41 @@ import org.apache.camel.Processor; import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; import org.ehrbase.fhirbridge.camel.CamelConstants; -import org.ehrbase.fhirbridge.core.domain.ResourceMap; -import org.ehrbase.fhirbridge.core.repository.ResourceMapRepository; +import org.ehrbase.fhirbridge.core.domain.ResourceComposition; +import org.ehrbase.fhirbridge.core.repository.ResourceCompositionRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; -/** - * {@link Processor} that handles the persistence of the {@link ResourceMap} entity and - * returns the {@link MethodOutcome} stored in the exchange properties. - * - * @since 1.2.0 - */ @Component +@SuppressWarnings("java:S6212") public class ProvideResourceResponseProcessor implements Processor { private static final Logger LOG = LoggerFactory.getLogger(ProvideResourceResponseProcessor.class); - private final ResourceMapRepository resourceMapRepository; + private final ResourceCompositionRepository resourceCompositionRepository; - public ProvideResourceResponseProcessor(ResourceMapRepository resourceMapRepository) { - this.resourceMapRepository = resourceMapRepository; + public ProvideResourceResponseProcessor(ResourceCompositionRepository resourceCompositionRepository) { + this.resourceCompositionRepository = resourceCompositionRepository; } @Override public void process(Exchange exchange) throws Exception { - LOG.trace("Processing exchange..."); + CompositionEntity composition = exchange.getIn().getBody(CompositionEntity.class); + MethodOutcome outcome = exchange.getProperty(CamelConstants.OUTCOME, MethodOutcome.class); - CompositionEntity composition = exchange.getIn().getMandatoryBody(CompositionEntity.class); - String resourceId = exchange.getIn().getHeader(CamelConstants.RESOURCE_ID, String.class); + String resourceId = outcome.getId().getIdPart(); - ResourceMap resourceMap = resourceMapRepository.findById(resourceId) - .orElse(new ResourceMap(resourceId)); - resourceMap.setCompositionVersionUid(composition.getVersionUid().toString()); + ResourceComposition resourceComposition = resourceCompositionRepository.findById(resourceId) + .orElse(new ResourceComposition(resourceId)); + resourceComposition.setCompositionId(getCompositionId(composition)); + resourceCompositionRepository.save(resourceComposition); + LOG.debug("Created/Updated ResourceComposition: {}", resourceComposition); - resourceMapRepository.save(resourceMap); - LOG.debug("Saved ResourceMap: {}", resourceMap); + exchange.getMessage().setBody(outcome); + } - exchange.getMessage().setBody(exchange.getProperty(CamelConstants.METHOD_OUTCOME, MethodOutcome.class)); + private String getCompositionId(CompositionEntity composition) { + return composition.getVersionUid().toString(); } -} +} \ No newline at end of file diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java index 312916029..645ae2c2a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java @@ -20,7 +20,7 @@ public void configure() throws Exception { .routeId("internal-provide-resource") .process("ehrIdLookupProcessor") .doTry() - .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") + .to("bean:fhirResourceConversionService?method=convert(${headers.CamelFhirBridgeProfile}, ${body})") .doCatch(ConversionException.class) .throwException(UnprocessableEntityException.class, "${exception.message}") .end() @@ -29,10 +29,10 @@ public void configure() throws Exception { from("direct:internal-provide-resource-after-converter") .routeId("internal-provide-resource-after-converter-route") .choice() - .when(header(CamelConstants.COMPOSITION_VERSION_UID).isNotNull()) + .when(header(CamelConstants.COMPOSITION_ID).isNotNull()) .process(exchange -> { var composition = exchange.getIn().getMandatoryBody(CompositionEntity.class); - composition.setVersionUid(new VersionUid(exchange.getIn().getHeader(CamelConstants.COMPOSITION_VERSION_UID, String.class))); + composition.setVersionUid(new VersionUid(exchange.getIn().getHeader(CamelConstants.COMPOSITION_ID, String.class))); }) .end() .doTry() diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java index bde347c02..579de37d3 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java @@ -41,7 +41,7 @@ public void configure() throws Exception { .doTry() .choice() .when(header(CamelConstants.PROFILE).isEqualTo(Profile.KONTAKT_GESUNDHEIT_ABTEILUNG)) - .to("bean:fhirResourceConversionService?method=convert(${headers.FhirBridgeProfile}, ${body})") + .to("bean:fhirResourceConversionService?method=convert(${headers.CamelFhirBridgeProfile}, ${body})") .otherwise() .to("bean:fhirResourceConversionService?method=convertDefaultEncounter(${body})") .endDoTry() diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java index de43d061b..4856c6569 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java @@ -16,6 +16,12 @@ package org.ehrbase.fhirbridge.camel.route; +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import org.apache.camel.util.ObjectHelper; +import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; +import org.ehrbase.client.openehrclient.VersionUid; +import org.ehrbase.fhirbridge.camel.CamelConstants; +import org.ehrbase.fhirbridge.ehr.converter.ConversionException; import org.springframework.stereotype.Component; /** @@ -32,15 +38,25 @@ public void configure() throws Exception { // @formatter:off super.configure(); - // Route: Provide Patient + // Provide patient: create, update from("patient-provide:consumer?fhirContext=#fhirContext") .routeId("provide-patient-route") - .onCompletion() - .process("provideResourceAuditHandler") - .end() .process("fhirProfileValidator") - .process("providePatientPersistenceProcessor") - .to("direct:internal-provide-resource"); + .process("providePatientProcessor") + .doTry() + .to("bean:fhirResourceConversionService?method=convert(${headers.CamelFhirBridgeProfile}, ${body})") + .process(exchange -> { + if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(CamelConstants.COMPOSITION_ID))) { + String compositionId = exchange.getIn().getHeader(CamelConstants.COMPOSITION_ID, String.class); + exchange.getIn().getBody(CompositionEntity.class).setVersionUid(new VersionUid(compositionId)); + } + }) + .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") + .doCatch(ConversionException.class) + .throwException(UnprocessableEntityException.class, "${exception.message}") + .end() + .process("provideResourceResponseProcessor"); + // Route: Find Patient from("patient-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") diff --git a/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java index 413b21ac3..f56276b31 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java @@ -61,11 +61,13 @@ */ @Configuration @EnableConfigurationProperties(HapiFhirJpaProperties.class) +@SuppressWarnings("java:S6212") public class HapiFhirJpaConfiguration extends BaseR4Config { @Bean public DaoConfig daoConfig(HapiFhirJpaProperties properties) { - var config = new DaoConfig(); + DaoConfig config = new DaoConfig(); + config.setResourceServerIdStrategy(DaoConfig.IdStrategyEnum.UUID); config.setAllowInlineMatchUrlReferences(properties.isAllowInlineMatchUrlReferences()); config.setAutoCreatePlaceholderReferenceTargets(properties.isAutoCreatePlaceholderReferences()); config.setPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets(properties.isPopulateIdentifierInAutoCreatedPlaceholderReferences()); diff --git a/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java index e784a45b4..f2b704493 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java @@ -3,7 +3,7 @@ import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; import org.ehrbase.fhirbridge.camel.processor.FindResourceProcessor; import org.ehrbase.fhirbridge.camel.processor.ProvideResourcePersistenceProcessor; -import org.ehrbase.fhirbridge.core.repository.ResourceMapRepository; +import org.ehrbase.fhirbridge.core.repository.ResourceCompositionRepository; import org.hl7.fhir.r4.model.AuditEvent; import org.hl7.fhir.r4.model.Condition; import org.hl7.fhir.r4.model.Consent; @@ -21,60 +21,60 @@ @Configuration public class ProcessorConfiguration { - private final ResourceMapRepository resourceMapRepository; + private final ResourceCompositionRepository resourceCompositionRepository; - public ProcessorConfiguration(ResourceMapRepository resourceMapRepository) { - this.resourceMapRepository = resourceMapRepository; + public ProcessorConfiguration(ResourceCompositionRepository resourceCompositionRepository) { + this.resourceCompositionRepository = resourceCompositionRepository; } @Bean public ProvideResourcePersistenceProcessor<Condition> provideConditionPersistenceProcessor(IFhirResourceDao<Condition> conditionDao) { - return new ProvideResourcePersistenceProcessor<>(conditionDao, Condition.class, resourceMapRepository); + return new ProvideResourcePersistenceProcessor<>(conditionDao, Condition.class, resourceCompositionRepository); } @Bean public ProvideResourcePersistenceProcessor<Consent> provideConsentPersistenceProcessor(IFhirResourceDao<Consent> consentDao) { - return new ProvideResourcePersistenceProcessor<>(consentDao, Consent.class, resourceMapRepository); + return new ProvideResourcePersistenceProcessor<>(consentDao, Consent.class, resourceCompositionRepository); } @Bean public ProvideResourcePersistenceProcessor<DiagnosticReport> provideDiagnosticReportPersistenceProcessor(IFhirResourceDao<DiagnosticReport> diagnosticReportDao) { - return new ProvideResourcePersistenceProcessor<>(diagnosticReportDao, DiagnosticReport.class, resourceMapRepository); + return new ProvideResourcePersistenceProcessor<>(diagnosticReportDao, DiagnosticReport.class, resourceCompositionRepository); } @Bean public ProvideResourcePersistenceProcessor<Encounter> provideEncounterPersistenceProcessor(IFhirResourceDao<Encounter> encounterDao) { - return new ProvideResourcePersistenceProcessor<>(encounterDao, Encounter.class, resourceMapRepository); + return new ProvideResourcePersistenceProcessor<>(encounterDao, Encounter.class, resourceCompositionRepository); } @Bean public ProvideResourcePersistenceProcessor<Immunization> provideImmunizationPersistenceProcessor(IFhirResourceDao<Immunization> immunizationDao) { - return new ProvideResourcePersistenceProcessor<>(immunizationDao, Immunization.class, resourceMapRepository); + return new ProvideResourcePersistenceProcessor<>(immunizationDao, Immunization.class, resourceCompositionRepository); } @Bean public ProvideResourcePersistenceProcessor<Observation> provideObservationPersistenceProcessor(IFhirResourceDao<Observation> observationDao) { - return new ProvideResourcePersistenceProcessor<>(observationDao, Observation.class, resourceMapRepository); + return new ProvideResourcePersistenceProcessor<>(observationDao, Observation.class, resourceCompositionRepository); } @Bean public ProvideResourcePersistenceProcessor<MedicationStatement> provideMedicationStatementPersistenceProcessor(IFhirResourceDao<MedicationStatement> medicationStatementDao) { - return new ProvideResourcePersistenceProcessor<>(medicationStatementDao, MedicationStatement.class, resourceMapRepository); + return new ProvideResourcePersistenceProcessor<>(medicationStatementDao, MedicationStatement.class, resourceCompositionRepository); } @Bean public ProvideResourcePersistenceProcessor<Patient> providePatientPersistenceProcessor(IFhirResourceDao<Patient> patientDao) { - return new ProvideResourcePersistenceProcessor<>(patientDao, Patient.class, resourceMapRepository); + return new ProvideResourcePersistenceProcessor<>(patientDao, Patient.class, resourceCompositionRepository); } @Bean public ProvideResourcePersistenceProcessor<Procedure> provideProcedurePersistenceProcessor(IFhirResourceDao<Procedure> procedureDao) { - return new ProvideResourcePersistenceProcessor<>(procedureDao, Procedure.class, resourceMapRepository); + return new ProvideResourcePersistenceProcessor<>(procedureDao, Procedure.class, resourceCompositionRepository); } @Bean public ProvideResourcePersistenceProcessor<QuestionnaireResponse> provideQuestionnaireResponsePersistenceProcessor(IFhirResourceDao<QuestionnaireResponse> questionnaireResponseDao) { - return new ProvideResourcePersistenceProcessor<>(questionnaireResponseDao, QuestionnaireResponse.class, resourceMapRepository); + return new ProvideResourcePersistenceProcessor<>(questionnaireResponseDao, QuestionnaireResponse.class, resourceCompositionRepository); } @Bean diff --git a/src/main/java/org/ehrbase/fhirbridge/core/domain/PatientEhr.java b/src/main/java/org/ehrbase/fhirbridge/core/domain/PatientEhr.java new file mode 100644 index 000000000..5f3375b83 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/core/domain/PatientEhr.java @@ -0,0 +1,69 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.core.domain; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.validation.constraints.NotNull; +import java.util.UUID; + +@Entity +@Table(name = "FB_PATIENT_EHR") +public class PatientEhr { + + @Id + @Column(name = "PATIENT_ID") + private String patientId; + + @NotNull + @Column(name = "EHR_ID") + private UUID ehrId; + + public PatientEhr() { + } + + public PatientEhr(String patientId, UUID ehrId) { + this.patientId = patientId; + this.ehrId = ehrId; + } + + public String getPatientId() { + return patientId; + } + + public void setPatientId(String patientId) { + this.patientId = patientId; + } + + public UUID getEhrId() { + return ehrId; + } + + public void setEhrId(UUID ehrId) { + this.ehrId = ehrId; + } + + @Override + public String toString() { + return "PatientEhr{" + + "patientId='" + patientId + '\'' + + ", ehrId=" + ehrId + + '}'; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/core/domain/ResourceMap.java b/src/main/java/org/ehrbase/fhirbridge/core/domain/ResourceComposition.java similarity index 52% rename from src/main/java/org/ehrbase/fhirbridge/core/domain/ResourceMap.java rename to src/main/java/org/ehrbase/fhirbridge/core/domain/ResourceComposition.java index 3e871dc2e..a33743c2f 100644 --- a/src/main/java/org/ehrbase/fhirbridge/core/domain/ResourceMap.java +++ b/src/main/java/org/ehrbase/fhirbridge/core/domain/ResourceComposition.java @@ -20,28 +20,22 @@ import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; -import java.util.Objects; -/** - * ResourceMap Entity. - * - * @since 1.2.0 - */ @Entity -@Table(name = "FB_RESOURCE_MAP") -public class ResourceMap { +@Table(name = "FB_RESOURCE_COMPOSITION") +public class ResourceComposition { @Id @Column(name = "RESOURCE_ID") private String resourceId; - @Column(name = "COMPOSITION_VERSION_UID") - private String compositionVersionUid; + @Column(name = "COMPOSITION_ID") + private String compositionId; - public ResourceMap() { + public ResourceComposition() { } - public ResourceMap(String resourceId) { + public ResourceComposition(String resourceId) { this.resourceId = resourceId; } @@ -53,36 +47,19 @@ public void setResourceId(String id) { this.resourceId = id; } - public String getCompositionVersionUid() { - return compositionVersionUid; - } - - public void setCompositionVersionUid(String versionUid) { - this.compositionVersionUid = versionUid; + public String getCompositionId() { + return compositionId; } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ResourceMap that = (ResourceMap) o; - return Objects.equals(resourceId, that.resourceId) && Objects.equals(compositionVersionUid, that.compositionVersionUid); - } - - @Override - public int hashCode() { - return Objects.hash(resourceId, compositionVersionUid); + public void setCompositionId(String versionUid) { + this.compositionId = versionUid; } @Override public String toString() { - return "ResourceMap{" + + return "ResourceComposition{" + "resourceId='" + resourceId + '\'' + - ", compositionVersionUid='" + compositionVersionUid + '\'' + + ", compositionId='" + compositionId + '\'' + '}'; } } diff --git a/src/main/java/org/ehrbase/fhirbridge/core/repository/ResourceMapRepository.java b/src/main/java/org/ehrbase/fhirbridge/core/repository/PatientEhrRepository.java similarity index 76% rename from src/main/java/org/ehrbase/fhirbridge/core/repository/ResourceMapRepository.java rename to src/main/java/org/ehrbase/fhirbridge/core/repository/PatientEhrRepository.java index b4559e027..40c778220 100644 --- a/src/main/java/org/ehrbase/fhirbridge/core/repository/ResourceMapRepository.java +++ b/src/main/java/org/ehrbase/fhirbridge/core/repository/PatientEhrRepository.java @@ -16,13 +16,8 @@ package org.ehrbase.fhirbridge.core.repository; -import org.ehrbase.fhirbridge.core.domain.ResourceMap; +import org.ehrbase.fhirbridge.core.domain.PatientEhr; import org.springframework.data.jpa.repository.JpaRepository; -/** - * Spring Data JPA Repository for {@link ResourceMap}. - * - * @since 1.2.0 - */ -public interface ResourceMapRepository extends JpaRepository<ResourceMap, String> { +public interface PatientEhrRepository extends JpaRepository<PatientEhr, String> { } diff --git a/src/main/java/org/ehrbase/fhirbridge/core/repository/ResourceCompositionRepository.java b/src/main/java/org/ehrbase/fhirbridge/core/repository/ResourceCompositionRepository.java new file mode 100644 index 000000000..c80decea7 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/core/repository/ResourceCompositionRepository.java @@ -0,0 +1,23 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.core.repository; + +import org.ehrbase.fhirbridge.core.domain.ResourceComposition; +import org.springframework.data.jpa.repository.JpaRepository; + +public interface ResourceCompositionRepository extends JpaRepository<ResourceComposition, String> { +} diff --git a/src/main/resources/db/changelog/db.changelog-1.2.xml b/src/main/resources/db/changelog/db.changelog-1.2.xml index 1d4f7c4c4..dfbfac5ab 100644 --- a/src/main/resources/db/changelog/db.changelog-1.2.xml +++ b/src/main/resources/db/changelog/db.changelog-1.2.xml @@ -116,4 +116,20 @@ </column> </createTable> </changeSet> + + <changeSet id="4" author="subigre"> + <createTable tableName="FB_PATIENT_EHR"> + <column name="PATIENT_ID" type="varchar(255)"> + <constraints nullable="false" primaryKey="true"/> + </column> + <column name="EHR_ID" type="varchar(36)"> + <constraints nullable="false" unique="true"/> + </column> + </createTable> + + <renameTable oldTableName="FB_RESOURCE_MAP" newTableName="FB_RESOURCE_COMPOSITION"/> + + <renameColumn tableName="FB_RESOURCE_COMPOSITION" oldColumnName="COMPOSITION_VERSION_UID" + newColumnName="COMPOSITION_ID"/> + </changeSet> </databaseChangeLog> \ No newline at end of file From 2d9e13bab1c796a6d06e24215900fddf953fbd0c Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 2 Jul 2021 19:34:19 +0200 Subject: [PATCH 117/141] Code refactoring regarding subject and patient handling --- .../fhirbridge/camel/CamelConstants.java | 2 + .../camel/processor/EhrLookupProcessor.java | 89 ++++++++++ .../camel/processor/FhirRequestProcessor.java | 17 ++ .../processor/FindResourceProcessor.java | 96 ----------- .../processor/PatientReferenceProcessor.java | 96 +++++++++++ .../processor/ProvidePatientProcessor.java | 129 --------------- .../ProvideResourceResponseProcessor.java | 4 +- .../ResourcePersistenceProcessor.java | 128 ++++++++++++++ .../camel/route/AuditEventRoutes.java | 43 ----- .../fhirbridge/camel/route/CommonRoutes.java | 26 +++ .../camel/route/ConditionRoutes.java | 52 ------ .../fhirbridge/camel/route/ConsentRoutes.java | 52 ------ .../camel/route/DiagnosticReportRoutes.java | 15 -- .../camel/route/EncounterRoutes.java | 7 +- .../camel/route/FhirRouteBuilder.java | 156 ++++++++++++++++++ .../camel/route/ImmunizationRoutes.java | 52 ------ .../route/MedicationStatementRoutes.java | 52 ------ .../camel/route/ObservationRoutes.java | 14 -- .../fhirbridge/camel/route/PatientRoutes.java | 68 -------- .../camel/route/ProcedureRoutes.java | 54 ------ .../route/QuestionnaireResponseRoutes.java | 54 ------ .../config/HapiFhirJpaConfiguration.java | 5 +- .../config/camel/ProcessorConfiguration.java | 99 ----------- .../fhirbridge/fhir/support/Resources.java | 106 ++++++++---- src/main/resources/application.yml | 2 +- .../transactions/codex-create-condition.json | 1 - .../transactions/codex-update-condition.json | 1 - .../transactions/find-condition-search.json | 1 - .../provide-condition-create.json | 1 - .../provide-condition-update.json | 1 - .../transactions/find-consent-search.json | 1 - .../transactions/provide-consent-create.json | 1 - .../transactions/provide-consent-update.json | 1 - .../find-diagnostic-report-search.json | 1 - .../provide-diagnostic-report-create.json | 1 - .../provide-diagnostic-report-update.json | 1 - .../find-medication-statement-search.json | 1 - .../provide-medication-statement-create.json | 1 - .../provide-medication-statement-update.json | 1 - .../transactions/find-observation-search.json | 1 - .../provide-observation-create.json | 1 - .../provide-observation-update.json | 1 - .../transactions/find-procedure-search.json | 1 - .../provide-procedure-create.json | 1 - .../provide-procedure-update.json | 1 - .../find-questionnaire-response-search.json | 1 - ...provide-questionnaire-response-create.json | 1 - ...provide-questionnaire-response-update.json | 1 - 48 files changed, 590 insertions(+), 851 deletions(-) create mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrLookupProcessor.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirRequestProcessor.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/processor/FindResourceProcessor.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/processor/PatientReferenceProcessor.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvidePatientProcessor.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourcePersistenceProcessor.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/route/AuditEventRoutes.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/route/FhirRouteBuilder.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/route/ImmunizationRoutes.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/CamelConstants.java b/src/main/java/org/ehrbase/fhirbridge/camel/CamelConstants.java index 0b36ddc7d..27c0ccd74 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/CamelConstants.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/CamelConstants.java @@ -27,6 +27,8 @@ public final class CamelConstants { public static final String OUTCOME = "CamelFhirBridgeOutcome"; + public static final String PATIENT_ID = "CamelFhirPatientId"; + public static final String PROFILE = "CamelFhirBridgeProfile"; public static final String RESOURCE_ID = "FhirBridgeResourceId"; diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrLookupProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrLookupProcessor.java new file mode 100644 index 000000000..93e372212 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrLookupProcessor.java @@ -0,0 +1,89 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.camel.processor; + +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import com.nedap.archie.rm.datavalues.DvText; +import com.nedap.archie.rm.ehr.EhrStatus; +import com.nedap.archie.rm.generic.PartySelf; +import com.nedap.archie.rm.support.identification.HierObjectId; +import com.nedap.archie.rm.support.identification.PartyRef; +import org.apache.camel.Exchange; +import org.ehrbase.client.openehrclient.OpenEhrClient; +import org.ehrbase.fhirbridge.camel.CamelConstants; +import org.ehrbase.fhirbridge.camel.component.ehr.composition.CompositionConstants; +import org.ehrbase.fhirbridge.core.domain.PatientEhr; +import org.ehrbase.fhirbridge.core.repository.PatientEhrRepository; +import org.hl7.fhir.r4.model.ResourceType; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import java.util.UUID; + +@Component +@SuppressWarnings("java:S6212") +public class EhrLookupProcessor implements FhirRequestProcessor { + + private static final Logger LOG = LoggerFactory.getLogger(EhrLookupProcessor.class); + + private static final String ARCHETYPE_NODE_ID = "openEHR-EHR-EHR_STATUS.generic.v1"; + + private final PatientEhrRepository patientEhrRepository; + + private final OpenEhrClient openEhrClient; + + public EhrLookupProcessor(PatientEhrRepository patientEhrRepository, OpenEhrClient openEhrClient) { + this.patientEhrRepository = patientEhrRepository; + this.openEhrClient = openEhrClient; + } + + @Override + public void process(Exchange exchange) throws Exception { + String patientId = getPatientId(exchange); + + UUID ehrId = patientEhrRepository.findById(patientId) + .map(PatientEhr::getEhrId) + .orElseGet(() -> createEhr(patientId)); + + exchange.getMessage().setHeader(CompositionConstants.EHR_ID, ehrId); + } + + private String getPatientId(Exchange exchange) { + RequestDetails requestDetails = getRequestDetails(exchange); + ResourceType resourceType = ResourceType.valueOf(requestDetails.getResourceName()); + + if (resourceType == ResourceType.Patient) { + return exchange.getProperty(CamelConstants.OUTCOME, MethodOutcome.class).getId().getIdPart(); + } else { + return exchange.getIn().getHeader(CamelConstants.PATIENT_ID, String.class); + } + } + + private UUID createEhr(String patientId) { + PartySelf subject = new PartySelf(new PartyRef(new HierObjectId(patientId), "DEMOGRAPHIC", "PERSON")); + EhrStatus ehrStatus = new EhrStatus(ARCHETYPE_NODE_ID, new DvText("EHR Status"), subject, true, true, null); + UUID ehrId = openEhrClient.ehrEndpoint().createEhr(ehrStatus); + + PatientEhr patientEhr = new PatientEhr(patientId, ehrId); + patientEhrRepository.save(patientEhr); + LOG.debug("Created PatientEhr: patientId={}, ehrId={}", patientEhr.getPatientId(), patientEhr.getEhrId()); + + return ehrId; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirRequestProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirRequestProcessor.java new file mode 100644 index 000000000..4551040dd --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirRequestProcessor.java @@ -0,0 +1,17 @@ +package org.ehrbase.fhirbridge.camel.processor; + +import ca.uhn.fhir.rest.api.server.RequestDetails; +import org.apache.camel.Exchange; +import org.apache.camel.Processor; +import org.apache.camel.util.ObjectHelper; +import org.openehealth.ipf.commons.ihe.fhir.Constants; + +public interface FhirRequestProcessor extends Processor { + + default RequestDetails getRequestDetails(Exchange exchange) { + if (ObjectHelper.isEmpty(exchange.getIn().getHeader(Constants.FHIR_REQUEST_DETAILS))) { + throw new IllegalArgumentException("RequestDetails must not be null"); + } + return exchange.getIn().getHeader(Constants.FHIR_REQUEST_DETAILS, RequestDetails.class); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/FindResourceProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/FindResourceProcessor.java deleted file mode 100644 index 34d805eb6..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/FindResourceProcessor.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.camel.processor; - -import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; -import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; -import ca.uhn.fhir.rest.api.RestOperationTypeEnum; -import ca.uhn.fhir.rest.api.server.IBundleProvider; -import ca.uhn.fhir.rest.api.server.RequestDetails; -import org.apache.camel.Exchange; -import org.apache.camel.InvalidPayloadException; -import org.apache.camel.Processor; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.instance.model.api.IIdType; -import org.openehealth.ipf.commons.ihe.fhir.Constants; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - -/** - * Generic Processor that implements 'Find [resource type]' transaction using the provided {@link IFhirResourceDao}. - * - * @param <T> the type of the FHIR resource - * @since 1.2.0 - */ -public class FindResourceProcessor<T extends IBaseResource> implements Processor { - - private static final Logger LOG = LoggerFactory.getLogger(FindResourceProcessor.class); - - private final IFhirResourceDao<T> resourceDao; - - public FindResourceProcessor(IFhirResourceDao<T> resourceDao) { - this.resourceDao = resourceDao; - } - - @Override - public void process(Exchange exchange) throws Exception { - LOG.trace("Processing..."); - - if (isSearchOperation(exchange)) { - handleSearchOperation(exchange); - } else { - handleReadOperation(exchange); - } - } - - private void handleSearchOperation(Exchange exchange) throws InvalidPayloadException { - LOG.debug("Execute 'search' operation"); - - SearchParameterMap parameters = exchange.getIn().getMandatoryBody(SearchParameterMap.class); - - IBundleProvider bundleProvider = resourceDao.search(parameters, extractRequestDetails(exchange)); - - if (exchange.getIn().getHeaders().containsKey(Constants.FHIR_REQUEST_SIZE_ONLY)) { - exchange.getMessage().setHeader(Constants.FHIR_REQUEST_SIZE_ONLY, bundleProvider.size()); - } else { - Integer from = exchange.getIn().getHeader(Constants.FHIR_FROM_INDEX, Integer.class); - Integer to = exchange.getIn().getHeader(Constants.FHIR_TO_INDEX, Integer.class); - exchange.getMessage().setBody(bundleProvider.getResources(from, to)); - } - } - - private void handleReadOperation(Exchange exchange) throws InvalidPayloadException { - LOG.debug("Execute 'read'/'vread' operation"); - - IIdType id = exchange.getIn().getMandatoryBody(IIdType.class); - exchange.getMessage().setBody(resourceDao.read(id, extractRequestDetails(exchange))); - } - - private boolean isSearchOperation(Exchange exchange) { - RequestDetails requestDetails = extractRequestDetails(exchange); - return requestDetails.getRestOperationType() == RestOperationTypeEnum.SEARCH_TYPE; - } - - private RequestDetails extractRequestDetails(Exchange exchange) { - RequestDetails requestDetails = exchange.getIn().getHeader(Constants.FHIR_REQUEST_DETAILS, RequestDetails.class); - if (requestDetails == null) { - throw new IllegalStateException("RequestDetails must not be null"); - } - return requestDetails; - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/PatientReferenceProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/PatientReferenceProcessor.java new file mode 100644 index 000000000..9b12683ba --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/PatientReferenceProcessor.java @@ -0,0 +1,96 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.camel.processor; + +import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; +import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.rest.api.server.IBundleProvider; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; +import ca.uhn.fhir.rest.param.TokenParam; +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import org.apache.camel.Exchange; +import org.ehrbase.fhirbridge.camel.CamelConstants; +import org.ehrbase.fhirbridge.fhir.support.Resources; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.r4.model.Identifier; +import org.hl7.fhir.r4.model.Patient; +import org.hl7.fhir.r4.model.Reference; +import org.hl7.fhir.r4.model.Resource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import java.util.List; +import java.util.Set; + +@Component +@SuppressWarnings("java:S6212") +public class PatientReferenceProcessor implements FhirRequestProcessor { + + private static final Logger LOG = LoggerFactory.getLogger(PatientReferenceProcessor.class); + + private final IFhirResourceDao<Patient> patientDao; + + public PatientReferenceProcessor(IFhirResourceDao<Patient> patientDao) { + this.patientDao = patientDao; + } + + @Override + public void process(Exchange exchange) throws Exception { + RequestDetails requestDetails = getRequestDetails(exchange); + Resource resource = exchange.getIn().getBody(Resource.class); + + if (!Resources.isPatient(resource)) { + Reference subject = Resources.getSubject(resource) + .orElseThrow(() -> new UnprocessableEntityException("Resource should have one patient")); + + IIdType patientId; + if (subject.hasReference()) { + patientId = subject.getReferenceElement(); + } else { + Identifier identifier = subject.getIdentifier(); + SearchParameterMap parameters = new SearchParameterMap(); + parameters.add(Patient.SP_IDENTIFIER, new TokenParam(identifier.getSystem(), identifier.getValue())); + Set<ResourcePersistentId> ids = patientDao.searchForIds(parameters, requestDetails); + + if (ids.isEmpty()) { + patientId = createPatient(identifier, requestDetails); + } else if (ids.size() == 1) { + IBundleProvider bundleProvider = patientDao.search(parameters, requestDetails); + List<IBaseResource> result = bundleProvider.getResources(0, 1); + Patient patient = (Patient) result.get(0); + patientId = patient.getIdElement(); + LOG.debug("Resolved existing Patient: id={}", patientId); + } else { + throw new UnprocessableEntityException("More than one patient"); + } + + subject.setReferenceElement(patientId); + } + + exchange.getIn().setHeader(CamelConstants.PATIENT_ID, patientId.getIdPart()); + } + } + + private IIdType createPatient(Identifier identifier, RequestDetails requestDetails) { + IIdType id = patientDao.create(new Patient().addIdentifier(identifier), requestDetails).getId(); + LOG.debug("Created Patient: id={}", id); + return id; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvidePatientProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvidePatientProcessor.java deleted file mode 100644 index f9859c59f..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvidePatientProcessor.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.camel.processor; - -import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.api.RestOperationTypeEnum; -import ca.uhn.fhir.rest.api.server.RequestDetails; -import com.nedap.archie.rm.datavalues.DvText; -import com.nedap.archie.rm.ehr.EhrStatus; -import com.nedap.archie.rm.generic.PartySelf; -import com.nedap.archie.rm.support.identification.GenericId; -import com.nedap.archie.rm.support.identification.PartyRef; -import org.apache.camel.Exchange; -import org.apache.camel.Processor; -import org.ehrbase.client.openehrclient.OpenEhrClient; -import org.ehrbase.fhirbridge.camel.CamelConstants; -import org.ehrbase.fhirbridge.camel.component.ehr.composition.CompositionConstants; -import org.ehrbase.fhirbridge.core.domain.PatientEhr; -import org.ehrbase.fhirbridge.core.domain.ResourceComposition; -import org.ehrbase.fhirbridge.core.repository.PatientEhrRepository; -import org.ehrbase.fhirbridge.core.repository.ResourceCompositionRepository; -import org.hl7.fhir.r4.model.Patient; -import org.openehealth.ipf.commons.ihe.fhir.Constants; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -import java.util.UUID; - -@Component -@SuppressWarnings("java:S6212") -public class ProvidePatientProcessor implements Processor { - - private static final Logger LOG = LoggerFactory.getLogger(ProvidePatientProcessor.class); - - private static final String ARCHETYPE_NODE_ID = "openEHR-EHR-EHR_STATUS.generic.v1"; - - private final IFhirResourceDao<Patient> patientDao; - - private final PatientEhrRepository patientEhrRepository; - - private final ResourceCompositionRepository resourceCompositionRepository; - - private final OpenEhrClient openEhrClient; - - private final String scheme; - - public ProvidePatientProcessor(IFhirResourceDao<Patient> patientDao, - PatientEhrRepository patientEhrRepository, - ResourceCompositionRepository resourceCompositionRepository, - OpenEhrClient openEhrClient) { - this.patientDao = patientDao; - this.patientEhrRepository = patientEhrRepository; - this.resourceCompositionRepository = resourceCompositionRepository; - this.openEhrClient = openEhrClient; - this.scheme = "fhirbridge.ehrbase.org"; // FIXME: Create configuration properties - } - - @Override - public void process(Exchange exchange) throws Exception { - Patient patient = exchange.getIn().getBody(Patient.class); - RequestDetails requestDetails = exchange.getIn().getHeader(Constants.FHIR_REQUEST_DETAILS, RequestDetails.class); - - switch (requestDetails.getRestOperationType()) { - case CREATE: - handleCreate(patient, requestDetails, exchange); - break; - case UPDATE: - handleUpdate(patient, requestDetails, exchange); - break; - default: - throw new IllegalArgumentException("Unsupported operation: " + requestDetails.getRestOperationType()); - } - } - - private void handleCreate(Patient patient, RequestDetails requestDetails, Exchange exchange) { - String conditionalUrl = requestDetails.getConditionalUrl(RestOperationTypeEnum.CREATE); - MethodOutcome outcome = patientDao.create(patient, conditionalUrl, requestDetails); - - UUID ehrId = createEhr(outcome.getId().getIdPart()); - - exchange.getMessage().setHeader(CompositionConstants.EHR_ID, ehrId); - exchange.setProperty(CamelConstants.OUTCOME, outcome); - } - - private void handleUpdate(Patient patient, RequestDetails requestDetails, Exchange exchange) { - String conditionalUrl = requestDetails.getConditionalUrl(RestOperationTypeEnum.UPDATE); - MethodOutcome outcome = patientDao.update(patient, conditionalUrl, requestDetails); - - String patientId = outcome.getId().getIdPart(); - UUID ehrId = patientEhrRepository.findById(patientId) - .map(PatientEhr::getEhrId) - .orElseGet(() -> createEhr(patientId)); - - exchange.setProperty(CamelConstants.OUTCOME, outcome); - exchange.getMessage().setHeader(CompositionConstants.EHR_ID, ehrId); - - resourceCompositionRepository.findById(patientId) - .map(ResourceComposition::getCompositionId) - .ifPresent(compositionId -> exchange.getMessage().setHeader(CamelConstants.COMPOSITION_ID, compositionId)); - } - - private UUID createEhr(String patientId) { - PartySelf subject = new PartySelf(new PartyRef(new GenericId(patientId, scheme), "DEMOGRAPHIC", "PERSON")); - EhrStatus ehrStatus = new EhrStatus(ARCHETYPE_NODE_ID, new DvText("EHR Status"), subject, true, true, null); - UUID ehrId = openEhrClient.ehrEndpoint().createEhr(ehrStatus); - - PatientEhr patientEhr = new PatientEhr(patientId, ehrId); - patientEhrRepository.save(patientEhr); - LOG.debug("Created PatientEhr: {}", patientEhr); - - return ehrId; - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java index 6ff8debda..5ca81437b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java @@ -45,12 +45,12 @@ public void process(Exchange exchange) throws Exception { MethodOutcome outcome = exchange.getProperty(CamelConstants.OUTCOME, MethodOutcome.class); String resourceId = outcome.getId().getIdPart(); - ResourceComposition resourceComposition = resourceCompositionRepository.findById(resourceId) .orElse(new ResourceComposition(resourceId)); resourceComposition.setCompositionId(getCompositionId(composition)); resourceCompositionRepository.save(resourceComposition); - LOG.debug("Created/Updated ResourceComposition: {}", resourceComposition); + LOG.debug("Saved ResourceComposition: resourceId={}, compositionId={}", + resourceComposition.getResourceId(), resourceComposition.getCompositionId()); exchange.getMessage().setBody(outcome); } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourcePersistenceProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourcePersistenceProcessor.java new file mode 100644 index 000000000..dee8f4e76 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourcePersistenceProcessor.java @@ -0,0 +1,128 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.camel.processor; + +import ca.uhn.fhir.jpa.api.dao.DaoRegistry; +import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; +import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.api.RestOperationTypeEnum; +import ca.uhn.fhir.rest.api.server.IBundleProvider; +import ca.uhn.fhir.rest.api.server.RequestDetails; +import org.apache.camel.Exchange; +import org.ehrbase.fhirbridge.camel.CamelConstants; +import org.ehrbase.fhirbridge.core.domain.ResourceComposition; +import org.ehrbase.fhirbridge.core.repository.ResourceCompositionRepository; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.r4.model.Resource; +import org.openehealth.ipf.commons.ihe.fhir.Constants; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +@Component +@SuppressWarnings({"java:S6212", "rawtypes", "unchecked"}) +public class ResourcePersistenceProcessor implements FhirRequestProcessor { + + private static final Logger LOG = LoggerFactory.getLogger(ResourcePersistenceProcessor.class); + + private final DaoRegistry daoRegistry; + + private final ResourceCompositionRepository resourceCompositionRepository; + + public ResourcePersistenceProcessor(DaoRegistry daoRegistry, ResourceCompositionRepository resourceCompositionRepository) { + this.daoRegistry = daoRegistry; + this.resourceCompositionRepository = resourceCompositionRepository; + } + + @Override + public void process(Exchange exchange) throws Exception { + RequestDetails requestDetails = getRequestDetails(exchange); + IFhirResourceDao resourceDao = getResourceDao(requestDetails.getResourceName()); + + switch (requestDetails.getRestOperationType()) { + case CREATE: + handleCreateOperation(exchange, requestDetails, resourceDao); + break; + case READ: + case VREAD: + handleReadOperation(exchange, requestDetails, resourceDao); + break; + case UPDATE: + handleUpdateOperation(exchange, requestDetails, resourceDao); + break; + case SEARCH_TYPE: + handleSearchOperation(exchange, requestDetails, resourceDao); + break; + default: + throw new IllegalArgumentException("Unsupported operation: " + requestDetails.getRestOperationType()); + } + } + + private void handleCreateOperation(Exchange exchange, RequestDetails requestDetails, IFhirResourceDao resourceDao) { + Resource resource = exchange.getIn().getBody(Resource.class); + String ifNoneExist = requestDetails.getConditionalUrl(RestOperationTypeEnum.CREATE); + + MethodOutcome outcome = resourceDao.create(resource, ifNoneExist, requestDetails); + LOG.debug("Created {}: id={}", resource.getResourceType(), outcome.getId()); + + exchange.setProperty(CamelConstants.OUTCOME, outcome); + } + + private void handleReadOperation(Exchange exchange, RequestDetails requestDetails, IFhirResourceDao resourceDao) { + IIdType id = exchange.getIn().getBody(IIdType.class); + IBaseResource resource = resourceDao.read(id, requestDetails); + exchange.getMessage().setBody(resource); + } + + private void handleUpdateOperation(Exchange exchange, RequestDetails requestDetails, IFhirResourceDao resourceDao) { + LOG.trace("Updating {} resource...", requestDetails.getResourceName()); + + Resource resource = exchange.getIn().getBody(Resource.class); + String matchUrl = requestDetails.getConditionalUrl(RestOperationTypeEnum.UPDATE); + + MethodOutcome outcome = resourceDao.update(resource, matchUrl, requestDetails); + LOG.debug("Updated {}: id={}", resource.getResourceType(), outcome.getId()); + + resourceCompositionRepository.findById(outcome.getId().getIdPart()) + .map(ResourceComposition::getCompositionId) + .ifPresent(compositionId -> exchange.getMessage().setHeader(CamelConstants.COMPOSITION_ID, compositionId)); + + exchange.setProperty(CamelConstants.OUTCOME, outcome); + } + + private void handleSearchOperation(Exchange exchange, RequestDetails requestDetails, IFhirResourceDao resourceDao) { + LOG.trace("Searching {} resources...", requestDetails.getResourceName()); + + SearchParameterMap parameters = exchange.getIn().getBody(SearchParameterMap.class); + + IBundleProvider bundleProvider = resourceDao.search(parameters, requestDetails); + + if (exchange.getIn().getHeaders().containsKey(Constants.FHIR_REQUEST_SIZE_ONLY)) { + exchange.getMessage().setHeader(Constants.FHIR_REQUEST_SIZE_ONLY, bundleProvider.size()); + } else { + Integer from = exchange.getIn().getHeader(Constants.FHIR_FROM_INDEX, Integer.class); + Integer to = exchange.getIn().getHeader(Constants.FHIR_TO_INDEX, Integer.class); + exchange.getMessage().setBody(bundleProvider.getResources(from, to)); + } + } + + private IFhirResourceDao getResourceDao(String resourceName) { + return daoRegistry.getResourceDao(resourceName); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/AuditEventRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/AuditEventRoutes.java deleted file mode 100644 index a5060119e..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/AuditEventRoutes.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.camel.route; - -import org.apache.camel.builder.RouteBuilder; -import org.springframework.stereotype.Component; - -/** - * Implementation of {@link RouteBuilder} that provides route definitions for transactions - * linked to {@link org.hl7.fhir.r4.model.AuditEvent AuditEvent} resource. - * - * @since 1.0.0 - */ -@Component -public class AuditEventRoutes extends AbstractRouteBuilder { - - @Override - public void configure() throws Exception { - // @formatter:off - super.configure(); - - // 'Find AuditEvent' route definition - from("audit-event-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") - .routeId("find-audit-event-route") - .process("findAuditEventProcessor"); - - // @formatter:on - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java index 645ae2c2a..7959efea5 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java @@ -2,6 +2,7 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.util.ObjectHelper; import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; import org.ehrbase.client.exception.WrongStatusCodeException; import org.ehrbase.client.openehrclient.VersionUid; @@ -16,6 +17,31 @@ public class CommonRoutes extends RouteBuilder { public void configure() throws Exception { // @formatter:off + // Provide resource + from("direct:provideResource") + .routeId("provideResourceRoute") + .onCompletion() + .process("provideResourceAuditHandler") + .end() + .process("fhirProfileValidator") + .process("patientReferenceProcessor") + .process("resourcePersistenceProcessor") + .process("ehrLookupProcessor") + .doTry() + .to("bean:fhirResourceConversionService?method=convert(${headers.CamelFhirBridgeProfile}, ${body})") + .process(exchange -> { + if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(CamelConstants.COMPOSITION_ID))) { + String compositionId = exchange.getIn().getHeader(CamelConstants.COMPOSITION_ID, String.class); + exchange.getIn().getBody(CompositionEntity.class).setVersionUid(new VersionUid(compositionId)); + } + }) + .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") + .doCatch(Exception.class) + .throwException(UnprocessableEntityException.class, "${exception.message}") + .end() + .process("provideResourceResponseProcessor"); + + from("direct:internal-provide-resource") .routeId("internal-provide-resource") .process("ehrIdLookupProcessor") diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java deleted file mode 100644 index 680ad2883..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConditionRoutes.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.camel.route; - -import org.springframework.stereotype.Component; - -/** - * Implementation of {@link org.apache.camel.builder.RouteBuilder RouteBuilder} that defines routes for transactions - * related to {@link org.hl7.fhir.r4.model.Condition Condition} resource. - * - * @since 1.0.0 - */ -@Component -public class ConditionRoutes extends AbstractRouteBuilder { - - @Override - public void configure() throws Exception { - // @formatter:off - super.configure(); - - // Route: Provide Condition - from("condition-provide:consumer?fhirContext=#fhirContext") - .routeId("provide-condition-route") - .onCompletion() - .process("provideResourceAuditHandler") - .end() - .process("fhirProfileValidator") - .process("provideConditionPersistenceProcessor") - .to("direct:internal-provide-resource"); - - // Route: Find Condition - from("condition-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") - .routeId("find-condition-route") - .process("findConditionProcessor"); - - // @formatter:on - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java deleted file mode 100644 index 4cf8bd341..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ConsentRoutes.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.camel.route; - -import org.springframework.stereotype.Component; - -/** - * Implementation of {@link org.apache.camel.builder.RouteBuilder RouteBuilder} that defines routes for transactions - * related to {@link org.hl7.fhir.r4.model.Consent Consent} resource. - * - * @since 1.0.0 - */ -@Component -public class ConsentRoutes extends AbstractRouteBuilder { - - @Override - public void configure() throws Exception { - // @formatter:off - super.configure(); - - // Route: Provide Consent - from("consent-provide:consumer?fhirContext=#fhirContext") - .routeId("provide-consent-route") - .onCompletion() - .process("provideResourceAuditHandler") - .end() - .process("fhirProfileValidator") - .process("provideConsentPersistenceProcessor") - .to("direct:internal-provide-resource"); - - // Route: Find Consent - from("consent-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") - .routeId("find-consent-route") - .process("findConsentProcessor"); - - // @formatter:on - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java index abe0af3ad..c5c1e6cbe 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java @@ -34,25 +34,10 @@ public void configure() throws Exception { // @formatter:off super.configure(); - // Route: Provide Diagnostic Report - from("diagnostic-report-provide:consumer?fhirContext=#fhirContext") - .routeId("provide-diagnostic-report-route") - .onCompletion() - .process("provideResourceAuditHandler") - .end() - .process("fhirProfileValidator") - .to("direct:internal-provide-diagnostic-report"); - - // Route: Internal Provide Diagnostic Report from("direct:internal-provide-diagnostic-report") .routeId("internal-provide-diagnostic-report-route") .process("provideDiagnosticReportPersistenceProcessor") .to("direct:internal-provide-resource"); - - // 'Find Diagnostic Report' route definition - from("diagnostic-report-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") - .routeId("find-diagnostic-report-route") - .process("findDiagnosticReportProcessor"); // @formatter:on } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java index 579de37d3..0818d071e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java @@ -3,11 +3,11 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.apache.camel.builder.RouteBuilder; import org.ehrbase.fhirbridge.camel.CamelConstants; +import org.ehrbase.fhirbridge.ehr.converter.ConversionException; import org.ehrbase.fhirbridge.fhir.common.Profile; import org.ehrbase.fhirbridge.fhir.support.Encounters; import org.hl7.fhir.r4.model.Encounter; import org.springframework.stereotype.Component; -import org.ehrbase.fhirbridge.ehr.converter.ConversionException; /** * Implementation of {@link RouteBuilder} that provides route definitions for transactions @@ -50,11 +50,6 @@ public void configure() throws Exception { .end() .to("direct:internal-provide-resource-after-converter"); - // 'Find Encounter' route definition - from("encounter-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") - .routeId("find-encounter-route") - .process("findEncounterProcessor"); - // @formatter:on } } \ No newline at end of file diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/FhirRouteBuilder.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/FhirRouteBuilder.java new file mode 100644 index 000000000..abff0d2c3 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/FhirRouteBuilder.java @@ -0,0 +1,156 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.ehrbase.fhirbridge.camel.route; + +import org.apache.camel.builder.RouteBuilder; +import org.springframework.stereotype.Component; + +@Component +@SuppressWarnings("java:S1192") +public class FhirRouteBuilder extends RouteBuilder { + + @Override + public void configure() throws Exception { + configureAuditEvent(); + configureCondition(); + configureConsent(); + configureDiagnosticReport(); + configureEncounter(); + configureImmunization(); + configureMedicationStatement(); + configureObservation(); + configurePatient(); + configureProcedure(); + configureQuestionnaireResponse(); + } + + /** + * Configures available endpoints for {@link org.hl7.fhir.r4.model.AuditEvent AuditEvent} resource. + */ + private void configureAuditEvent() { + from("audit-event-find:auditEventEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") + .process("resourcePersistenceProcessor"); + } + + /** + * Configures available endpoints for {@link org.hl7.fhir.r4.model.Condition Condition} resource. + */ + private void configureCondition() { + from("condition-provide:conditionEndpoint?fhirContext=#fhirContext") + .to("direct:provideResource"); + + from("condition-find:conditionEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") + .process("resourcePersistenceProcessor"); + } + + /** + * Configures available endpoints for {@link org.hl7.fhir.r4.model.Consent Consent} resource. + */ + private void configureConsent() { + from("consent-provide:consentEndpoint?fhirContext=#fhirContext") + .throwException(UnsupportedOperationException.class, "Not yet implemented"); + + from("consent-find:consentEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") + .process("resourcePersistenceProcessor"); + } + + /** + * Configures available endpoints for {@link org.hl7.fhir.r4.model.DiagnosticReport DiagnosticReport} resource. + */ + private void configureDiagnosticReport() { + from("diagnostic-report-provide:diagnosticReportEndpoint?fhirContext=#fhirContext") + .to("direct:provideResource"); + + from("diagnostic-report-find:diagnosticReportEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") + .process("resourcePersistenceProcessor"); + } + + /** + * Configures available endpoints for {@link org.hl7.fhir.r4.model.Encounter Encounter} resource. + */ + private void configureEncounter() { + from("encounter-find:encounterEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") + .process("resourcePersistenceProcessor"); + } + + /** + * Configures available endpoints for {@link org.hl7.fhir.r4.model.Immunization Immunization} resource. + */ + private void configureImmunization() { + from("immunization-provide:immunizationEndpoint?fhirContext=#fhirContext") + .to("direct:provideResource"); + + from("immunization-find:immunizationEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") + .process("resourcePersistenceProcessor"); + } + + /** + * Configures available endpoints for {@link org.hl7.fhir.r4.model.MedicationStatement MedicationStatement} resource. + */ + private void configureMedicationStatement() { + from("medication-statement-provide:medicationStatementEndpoint?fhirContext=#fhirContext") + .to("direct:provideResource"); + + from("medication-statement-find:medicationStatementEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") + .process("resourcePersistenceProcessor"); + } + + /** + * Configures available endpoints for {@link org.hl7.fhir.r4.model.Observation Observation} resource. + */ + private void configureObservation() { + from("observation-provide:observationEndpoint?fhirContext=#fhirContext") + .to("direct:provideResource"); + + from("observation-find:observationEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") + .process("resourcePersistenceProcessor"); + } + + /** + * Configures available endpoints for {@link org.hl7.fhir.r4.model.Patient Patient} resource. + */ + private void configurePatient() { + from("patient-provide:patientEndpoint?fhirContext=#fhirContext") + .to("direct:provideResource"); + + from("patient-find:patientEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") + .process("resourcePersistenceProcessor"); + } + + /** + * Configures available endpoints for {@link org.hl7.fhir.r4.model.Procedure Procedure} resource. + */ + private void configureProcedure() { + from("procedure-provide:procedureEndpoint?fhirContext=#fhirContext") + .to("direct:provideResource"); + + from("procedure-find:procedureEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") + .process("resourcePersistenceProcessor"); + } + + /** + * Configures available endpoints for {@link org.hl7.fhir.r4.model.QuestionnaireResponse QuestionnaireResponse} + * resource. + */ + private void configureQuestionnaireResponse() { + from("questionnaire-response-provide:questionnaireResponseEndpoint?fhirContext=#fhirContext") + .to("direct:provideResource"); + + from("questionnaire-response-find:questionnaireResponseEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") + .process("resourcePersistenceProcessor"); + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ImmunizationRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ImmunizationRoutes.java deleted file mode 100644 index c7d7d5dbf..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ImmunizationRoutes.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -package org.ehrbase.fhirbridge.camel.route; - -import org.springframework.stereotype.Component; - -/** - * Implementation of {@link AbstractRouteBuilder} that provides route definitions - * for transactions linked to {@link org.hl7.fhir.r4.model.Immunization Immunization} resource. - * - * @since 1.2.0 - */ -@Component -public class ImmunizationRoutes extends AbstractRouteBuilder { - - @Override - public void configure() throws Exception { - // @formatter:off - super.configure(); - - // 'Create Immunization' route definition - from("immunization-provide:consumer?fhirContext=#fhirContext") - .routeId("provide-immunization-route") - .onCompletion() - .process("provideResourceAuditHandler") - .end() - .process("fhirProfileValidator") - .process("provideImmunizationPersistenceProcessor") - .to("direct:internal-provide-resource"); - - // 'Find Immunization' route definition - from("immunization-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") - .routeId("find-immunization-route") - .process("findImmunizationProcessor"); - // @formatter:on - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java deleted file mode 100644 index 7eb2cb017..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/MedicationStatementRoutes.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.camel.route; - -import org.springframework.stereotype.Component; - -/** - * Implementation of {@link org.apache.camel.builder.RouteBuilder RouteBuilder} that defines routes for transactions - * related to {@link org.hl7.fhir.r4.model.MedicationStatement MedicationStatement} resource. - * - * @since 1.1.0 - */ -@Component -public class MedicationStatementRoutes extends AbstractRouteBuilder { - - @Override - public void configure() throws Exception { - // @formatter:off - super.configure(); - - // Route: Provide Medication Statement - from("medication-statement-provide:consumer?fhirContext=#fhirContext") - .routeId("provide-medication-statement-route") - .onCompletion() - .process("provideResourceAuditHandler") - .end() - .process("fhirProfileValidator") - .process("provideMedicationStatementPersistenceProcessor") - .to("direct:internal-provide-resource"); - - // Route: Find Medication Statement - from("medication-statement-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") - .routeId("find-medication-statement-route") - .process("findMedicationStatementProcessor"); - - // @formatter:on - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java index 4351f02d1..f58ffda11 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java @@ -34,25 +34,11 @@ public void configure() throws Exception { // @formatter:off super.configure(); - // Route: Provide Observation - from("observation-provide:consumer?fhirContext=#fhirContext") - .routeId("provide-observation-route") - .onCompletion() - .process("provideResourceAuditHandler") - .end() - .process("fhirProfileValidator") - .to("direct:internal-provide-observation"); - // Route: Internal Provide Observation from("direct:internal-provide-observation") .routeId("internal-provide-observation-route") .process("provideObservationPersistenceProcessor") .to("direct:internal-provide-resource"); - - // 'Find Observation' route definition - from("observation-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") - .routeId("find-observation-route") - .process("findObservationProcessor"); // @formatter:on } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java deleted file mode 100644 index 4856c6569..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/PatientRoutes.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.camel.route; - -import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; -import org.apache.camel.util.ObjectHelper; -import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; -import org.ehrbase.client.openehrclient.VersionUid; -import org.ehrbase.fhirbridge.camel.CamelConstants; -import org.ehrbase.fhirbridge.ehr.converter.ConversionException; -import org.springframework.stereotype.Component; - -/** - * Implementation of {@link org.apache.camel.builder.RouteBuilder RouteBuilder} that defines routes for transactions - * related to {@link org.hl7.fhir.r4.model.Patient Patient} resource. - * - * @since 1.0.0 - */ -@Component -public class PatientRoutes extends AbstractRouteBuilder { - - @Override - public void configure() throws Exception { - // @formatter:off - super.configure(); - - // Provide patient: create, update - from("patient-provide:consumer?fhirContext=#fhirContext") - .routeId("provide-patient-route") - .process("fhirProfileValidator") - .process("providePatientProcessor") - .doTry() - .to("bean:fhirResourceConversionService?method=convert(${headers.CamelFhirBridgeProfile}, ${body})") - .process(exchange -> { - if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(CamelConstants.COMPOSITION_ID))) { - String compositionId = exchange.getIn().getHeader(CamelConstants.COMPOSITION_ID, String.class); - exchange.getIn().getBody(CompositionEntity.class).setVersionUid(new VersionUid(compositionId)); - } - }) - .to("ehr-composition:compositionProducer?operation=mergeCompositionEntity") - .doCatch(ConversionException.class) - .throwException(UnprocessableEntityException.class, "${exception.message}") - .end() - .process("provideResourceResponseProcessor"); - - - // Route: Find Patient - from("patient-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") - .routeId("find-patient-route") - .process("findPatientProcessor"); - - // @formatter:on - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java deleted file mode 100644 index 9010b2f0b..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ProcedureRoutes.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.camel.route; - -import org.apache.camel.builder.RouteBuilder; -import org.hl7.fhir.r4.model.Procedure; -import org.springframework.stereotype.Component; - -/** - * Implementation of {@link RouteBuilder} that provides route definitions for transactions - * linked to {@link Procedure} resource. - * - * @since 1.0.0 - */ -@Component -public class ProcedureRoutes extends AbstractRouteBuilder { - - @Override - public void configure() throws Exception { - // @formatter:off - super.configure(); - - // Route: Provide Procedure - from("procedure-provide:consumer?fhirContext=#fhirContext") - .routeId("provide-procedure-route") - .onCompletion() - .process("provideResourceAuditHandler") - .end() - .process("fhirProfileValidator") - .process("provideProcedurePersistenceProcessor") - .to("direct:internal-provide-resource"); - - // Route: 'Find Procedure' - from("procedure-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") - .routeId("find-procedure-route") - .process("findProcedureProcessor"); - - // @formatter:on - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java deleted file mode 100644 index b763850cb..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/QuestionnaireResponseRoutes.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.camel.route; - -import org.apache.camel.builder.RouteBuilder; -import org.hl7.fhir.r4.model.QuestionnaireResponse; -import org.springframework.stereotype.Component; - -/** - * Implementation of {@link RouteBuilder} that provides route definitions for transactions - * linked to {@link QuestionnaireResponse} resource. - * - * @since 1.0.0 - */ -@Component -public class QuestionnaireResponseRoutes extends AbstractRouteBuilder { - - @Override - public void configure() throws Exception { - // @formatter:off - super.configure(); - - // Route: Provide Questionnaire-Response - from("questionnaire-response-provide:consumer?fhirContext=#fhirContext") - .routeId("provide-questionnaire-response-route") - .onCompletion() - .process("provideResourceAuditHandler") - .end() - .process("fhirProfileValidator") - .process("provideQuestionnaireResponsePersistenceProcessor") - .to("direct:internal-provide-resource"); - - // Route: Find Questionnaire-Response - from("questionnaire-response-find:consumer?fhirContext=#fhirContext&lazyLoadBundles=true") - .routeId("find-questionnaire-response-route") - .process("findQuestionnaireResponseProcessor"); - - // @formatter:on - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java index f56276b31..5aaeb0294 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/HapiFhirJpaConfiguration.java @@ -67,10 +67,9 @@ public class HapiFhirJpaConfiguration extends BaseR4Config { @Bean public DaoConfig daoConfig(HapiFhirJpaProperties properties) { DaoConfig config = new DaoConfig(); - config.setResourceServerIdStrategy(DaoConfig.IdStrategyEnum.UUID); config.setAllowInlineMatchUrlReferences(properties.isAllowInlineMatchUrlReferences()); - config.setAutoCreatePlaceholderReferenceTargets(properties.isAutoCreatePlaceholderReferences()); - config.setPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets(properties.isPopulateIdentifierInAutoCreatedPlaceholderReferences()); + config.setReuseCachedSearchResultsForMillis(null); + config.setResourceServerIdStrategy(DaoConfig.IdStrategyEnum.UUID); return config; } diff --git a/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java index f2b704493..489d46540 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java @@ -1,20 +1,11 @@ package org.ehrbase.fhirbridge.config.camel; import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; -import org.ehrbase.fhirbridge.camel.processor.FindResourceProcessor; import org.ehrbase.fhirbridge.camel.processor.ProvideResourcePersistenceProcessor; import org.ehrbase.fhirbridge.core.repository.ResourceCompositionRepository; -import org.hl7.fhir.r4.model.AuditEvent; -import org.hl7.fhir.r4.model.Condition; -import org.hl7.fhir.r4.model.Consent; import org.hl7.fhir.r4.model.DiagnosticReport; import org.hl7.fhir.r4.model.Encounter; -import org.hl7.fhir.r4.model.Immunization; -import org.hl7.fhir.r4.model.MedicationStatement; import org.hl7.fhir.r4.model.Observation; -import org.hl7.fhir.r4.model.Patient; -import org.hl7.fhir.r4.model.Procedure; -import org.hl7.fhir.r4.model.QuestionnaireResponse; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -27,16 +18,6 @@ public ProcessorConfiguration(ResourceCompositionRepository resourceCompositionR this.resourceCompositionRepository = resourceCompositionRepository; } - @Bean - public ProvideResourcePersistenceProcessor<Condition> provideConditionPersistenceProcessor(IFhirResourceDao<Condition> conditionDao) { - return new ProvideResourcePersistenceProcessor<>(conditionDao, Condition.class, resourceCompositionRepository); - } - - @Bean - public ProvideResourcePersistenceProcessor<Consent> provideConsentPersistenceProcessor(IFhirResourceDao<Consent> consentDao) { - return new ProvideResourcePersistenceProcessor<>(consentDao, Consent.class, resourceCompositionRepository); - } - @Bean public ProvideResourcePersistenceProcessor<DiagnosticReport> provideDiagnosticReportPersistenceProcessor(IFhirResourceDao<DiagnosticReport> diagnosticReportDao) { return new ProvideResourcePersistenceProcessor<>(diagnosticReportDao, DiagnosticReport.class, resourceCompositionRepository); @@ -47,88 +28,8 @@ public ProvideResourcePersistenceProcessor<Encounter> provideEncounterPersistenc return new ProvideResourcePersistenceProcessor<>(encounterDao, Encounter.class, resourceCompositionRepository); } - @Bean - public ProvideResourcePersistenceProcessor<Immunization> provideImmunizationPersistenceProcessor(IFhirResourceDao<Immunization> immunizationDao) { - return new ProvideResourcePersistenceProcessor<>(immunizationDao, Immunization.class, resourceCompositionRepository); - } - @Bean public ProvideResourcePersistenceProcessor<Observation> provideObservationPersistenceProcessor(IFhirResourceDao<Observation> observationDao) { return new ProvideResourcePersistenceProcessor<>(observationDao, Observation.class, resourceCompositionRepository); } - - @Bean - public ProvideResourcePersistenceProcessor<MedicationStatement> provideMedicationStatementPersistenceProcessor(IFhirResourceDao<MedicationStatement> medicationStatementDao) { - return new ProvideResourcePersistenceProcessor<>(medicationStatementDao, MedicationStatement.class, resourceCompositionRepository); - } - - @Bean - public ProvideResourcePersistenceProcessor<Patient> providePatientPersistenceProcessor(IFhirResourceDao<Patient> patientDao) { - return new ProvideResourcePersistenceProcessor<>(patientDao, Patient.class, resourceCompositionRepository); - } - - @Bean - public ProvideResourcePersistenceProcessor<Procedure> provideProcedurePersistenceProcessor(IFhirResourceDao<Procedure> procedureDao) { - return new ProvideResourcePersistenceProcessor<>(procedureDao, Procedure.class, resourceCompositionRepository); - } - - @Bean - public ProvideResourcePersistenceProcessor<QuestionnaireResponse> provideQuestionnaireResponsePersistenceProcessor(IFhirResourceDao<QuestionnaireResponse> questionnaireResponseDao) { - return new ProvideResourcePersistenceProcessor<>(questionnaireResponseDao, QuestionnaireResponse.class, resourceCompositionRepository); - } - - @Bean - public FindResourceProcessor<AuditEvent> findAuditEventProcessor(IFhirResourceDao<AuditEvent> auditEventDao) { - return new FindResourceProcessor<>(auditEventDao); - } - - @Bean - public FindResourceProcessor<Condition> findConditionProcessor(IFhirResourceDao<Condition> conditionDao) { - return new FindResourceProcessor<>(conditionDao); - } - - @Bean - public FindResourceProcessor<Consent> findConsentProcessor(IFhirResourceDao<Consent> consentDao) { - return new FindResourceProcessor<>(consentDao); - } - - @Bean - public FindResourceProcessor<DiagnosticReport> findDiagnosticReportProcessor(IFhirResourceDao<DiagnosticReport> diagnosticReportDao) { - return new FindResourceProcessor<>(diagnosticReportDao); - } - - @Bean - public FindResourceProcessor<Encounter> findEncounterProcessor(IFhirResourceDao<Encounter> encounterDao) { - return new FindResourceProcessor<>(encounterDao); - } - - @Bean - public FindResourceProcessor<Immunization> findImmunizationProcessor(IFhirResourceDao<Immunization> immunizationDao) { - return new FindResourceProcessor<>(immunizationDao); - } - - @Bean - public FindResourceProcessor<Observation> findObservationProcessor(IFhirResourceDao<Observation> observationDao) { - return new FindResourceProcessor<>(observationDao); - } - - @Bean - public FindResourceProcessor<MedicationStatement> findMedicationStatementProcessor(IFhirResourceDao<MedicationStatement> medicationStatementDao) { - return new FindResourceProcessor<>(medicationStatementDao); - } - - @Bean - public FindResourceProcessor<Patient> findPatientProcessor(IFhirResourceDao<Patient> patientDao) { - return new FindResourceProcessor<>(patientDao); - } - - @Bean - public FindResourceProcessor<Procedure> findProcedureProcessor(IFhirResourceDao<Procedure> procedureDao) { - return new FindResourceProcessor<>(procedureDao); - } - - @Bean - public FindResourceProcessor<QuestionnaireResponse> findQuestionnaireResponseProcessor(IFhirResourceDao<QuestionnaireResponse> questionnaireResponseDao) { - return new FindResourceProcessor<>(questionnaireResponseDao); - } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java index 0a24c72c1..1606b88ef 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Resources.java @@ -53,13 +53,13 @@ public static Optional<Reference> getSubject(Resource resource) { case Condition: return getSubject((Condition) resource); case Consent: - return getSubject((Consent) resource); + return getPatient((Consent) resource); case DiagnosticReport: return getSubject((DiagnosticReport) resource); case Encounter: return getSubject((Encounter) resource); case Immunization: - return getSubject((Immunization) resource); + return getPatient((Immunization) resource); case MedicationStatement: return getSubject((MedicationStatement) resource); case Observation: @@ -73,40 +73,38 @@ public static Optional<Reference> getSubject(Resource resource) { } } - public static Optional<Reference> getSubject(Condition condition) { - return condition.hasSubject() ? Optional.of(condition.getSubject()) : Optional.empty(); - } - - public static Optional<Reference> getSubject(Consent consent) { - return consent.hasPatient() ? Optional.of(consent.getPatient()) : Optional.empty(); - } - - public static Optional<Reference> getSubject(Immunization immunization) { - return immunization.hasPatient() ? Optional.of(immunization.getPatient()) : Optional.empty(); - } - - public static Optional<Reference> getSubject(DiagnosticReport diagnosticReport) { - return diagnosticReport.hasSubject() ? Optional.of(diagnosticReport.getSubject()) : Optional.empty(); - } - - public static Optional<Reference> getSubject(Encounter encounter) { - return encounter.hasSubject() ? Optional.of(encounter.getSubject()) : Optional.empty(); - } - - public static Optional<Reference> getSubject(MedicationStatement medicationStatement) { - return medicationStatement.hasSubject() ? Optional.of(medicationStatement.getSubject()) : Optional.empty(); - } - - public static Optional<Reference> getSubject(Observation observation) { - return observation.hasSubject() ? Optional.of(observation.getSubject()) : Optional.empty(); - } - - public static Optional<Reference> getSubject(Procedure procedure) { - return procedure.hasSubject() ? Optional.of(procedure.getSubject()) : Optional.empty(); - } - - public static Optional<Reference> getSubject(QuestionnaireResponse questionnaireResponse) { - return questionnaireResponse.hasSubject() ? Optional.of(questionnaireResponse.getSubject()) : Optional.empty(); + public static void setSubject(Resource resource, Reference subject) { + switch (resource.getResourceType()) { + case Condition: + ((Condition) resource).setSubject(subject); + break; + case Consent: + ((Consent) resource).setPatient(subject); + break; + case DiagnosticReport: + ((DiagnosticReport) resource).setSubject(subject); + break; + case Encounter: + ((Encounter) resource).setSubject(subject); + break; + case Immunization: + ((Immunization) resource).setPatient(subject); + break; + case MedicationStatement: + ((MedicationStatement) resource).setSubject(subject); + break; + case Observation: + ((Observation) resource).setSubject(subject); + break; + case Procedure: + ((Procedure) resource).setSubject(subject); + break; + case QuestionnaireResponse: + ((QuestionnaireResponse) resource).setSubject(subject); + break; + default: + throw new IllegalArgumentException("Unsupported resource type: " + resource.getResourceType()); + } } public static List<String> getProfileUris(Resource resource) { @@ -131,4 +129,40 @@ public static boolean hasAnyProfile(Resource resource, Profile... profiles) { return !Collections.disjoint(c1, c2); } + + private static Optional<Reference> getSubject(Condition condition) { + return condition.hasSubject() ? Optional.of(condition.getSubject()) : Optional.empty(); + } + + private static Optional<Reference> getPatient(Consent consent) { + return consent.hasPatient() ? Optional.of(consent.getPatient()) : Optional.empty(); + } + + private static Optional<Reference> getSubject(DiagnosticReport diagnosticReport) { + return diagnosticReport.hasSubject() ? Optional.of(diagnosticReport.getSubject()) : Optional.empty(); + } + + private static Optional<Reference> getSubject(Encounter encounter) { + return encounter.hasSubject() ? Optional.of(encounter.getSubject()) : Optional.empty(); + } + + private static Optional<Reference> getPatient(Immunization immunization) { + return immunization.hasPatient() ? Optional.of(immunization.getPatient()) : Optional.empty(); + } + + private static Optional<Reference> getSubject(MedicationStatement medicationStatement) { + return medicationStatement.hasSubject() ? Optional.of(medicationStatement.getSubject()) : Optional.empty(); + } + + private static Optional<Reference> getSubject(Observation observation) { + return observation.hasSubject() ? Optional.of(observation.getSubject()) : Optional.empty(); + } + + private static Optional<Reference> getSubject(Procedure procedure) { + return procedure.hasSubject() ? Optional.of(procedure.getSubject()) : Optional.empty(); + } + + private static Optional<Reference> getSubject(QuestionnaireResponse questionnaireResponse) { + return questionnaireResponse.hasSubject() ? Optional.of(questionnaireResponse.getSubject()) : Optional.empty(); + } } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index c9b176134..caaf35655 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -118,7 +118,7 @@ logging: level: ca.uhn.fhir: warn com.zaxxer.hikari: warn - liquibase: warn + liquibase: error org.apache.camel: warn org.ehrbase.fhirbridge: debug org.hibernate: warn diff --git a/src/test/resources/Condition/transactions/codex-create-condition.json b/src/test/resources/Condition/transactions/codex-create-condition.json index c7eda9b97..d7474cdfd 100644 --- a/src/test/resources/Condition/transactions/codex-create-condition.json +++ b/src/test/resources/Condition/transactions/codex-create-condition.json @@ -49,7 +49,6 @@ ] }, "subject": { - "reference": "/Patient?identifier=http://www.netzwerk-universitaetsmedizin.de/sid/crr-pseudonym|{{patientIdentifier}}", "identifier": { "system": "http://www.netzwerk-universitaetsmedizin.de/sid/crr-pseudonym", "value": "{{patientIdentifier}}" diff --git a/src/test/resources/Condition/transactions/codex-update-condition.json b/src/test/resources/Condition/transactions/codex-update-condition.json index 01a6183a7..62fd68355 100644 --- a/src/test/resources/Condition/transactions/codex-update-condition.json +++ b/src/test/resources/Condition/transactions/codex-update-condition.json @@ -49,7 +49,6 @@ ] }, "subject": { - "reference": "/Patient?identifier=http://www.netzwerk-universitaetsmedizin.de/sid/crr-pseudonym|{{patientIdentifier}}", "identifier": { "system": "http://www.netzwerk-universitaetsmedizin.de/sid/crr-pseudonym", "value": "{{patientIdentifier}}" diff --git a/src/test/resources/Condition/transactions/find-condition-search.json b/src/test/resources/Condition/transactions/find-condition-search.json index fc1e65c36..75871fa3a 100644 --- a/src/test/resources/Condition/transactions/find-condition-search.json +++ b/src/test/resources/Condition/transactions/find-condition-search.json @@ -64,7 +64,6 @@ } ], "subject": { - "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" diff --git a/src/test/resources/Condition/transactions/provide-condition-create.json b/src/test/resources/Condition/transactions/provide-condition-create.json index 8439c417f..54c5a3bb7 100644 --- a/src/test/resources/Condition/transactions/provide-condition-create.json +++ b/src/test/resources/Condition/transactions/provide-condition-create.json @@ -64,7 +64,6 @@ } ], "subject": { - "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" diff --git a/src/test/resources/Condition/transactions/provide-condition-update.json b/src/test/resources/Condition/transactions/provide-condition-update.json index 321f8cf55..7bf3762d8 100644 --- a/src/test/resources/Condition/transactions/provide-condition-update.json +++ b/src/test/resources/Condition/transactions/provide-condition-update.json @@ -64,7 +64,6 @@ } ], "subject": { - "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" diff --git a/src/test/resources/Consent/transactions/find-consent-search.json b/src/test/resources/Consent/transactions/find-consent-search.json index cc675d05f..098270603 100644 --- a/src/test/resources/Consent/transactions/find-consent-search.json +++ b/src/test/resources/Consent/transactions/find-consent-search.json @@ -27,7 +27,6 @@ } ], "patient": { - "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" diff --git a/src/test/resources/Consent/transactions/provide-consent-create.json b/src/test/resources/Consent/transactions/provide-consent-create.json index 2ea7f118f..4b9e68a27 100644 --- a/src/test/resources/Consent/transactions/provide-consent-create.json +++ b/src/test/resources/Consent/transactions/provide-consent-create.json @@ -27,7 +27,6 @@ } ], "patient": { - "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" diff --git a/src/test/resources/Consent/transactions/provide-consent-update.json b/src/test/resources/Consent/transactions/provide-consent-update.json index 463b6998e..1dce2e383 100644 --- a/src/test/resources/Consent/transactions/provide-consent-update.json +++ b/src/test/resources/Consent/transactions/provide-consent-update.json @@ -27,7 +27,6 @@ } ], "patient": { - "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" diff --git a/src/test/resources/DiagnosticReport/transactions/find-diagnostic-report-search.json b/src/test/resources/DiagnosticReport/transactions/find-diagnostic-report-search.json index c8007650e..cb22921bf 100644 --- a/src/test/resources/DiagnosticReport/transactions/find-diagnostic-report-search.json +++ b/src/test/resources/DiagnosticReport/transactions/find-diagnostic-report-search.json @@ -162,7 +162,6 @@ ] }, "subject": { - "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" diff --git a/src/test/resources/DiagnosticReport/transactions/provide-diagnostic-report-create.json b/src/test/resources/DiagnosticReport/transactions/provide-diagnostic-report-create.json index cf7aefe5c..05a058354 100644 --- a/src/test/resources/DiagnosticReport/transactions/provide-diagnostic-report-create.json +++ b/src/test/resources/DiagnosticReport/transactions/provide-diagnostic-report-create.json @@ -162,7 +162,6 @@ ] }, "subject": { - "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" diff --git a/src/test/resources/DiagnosticReport/transactions/provide-diagnostic-report-update.json b/src/test/resources/DiagnosticReport/transactions/provide-diagnostic-report-update.json index a440f52f1..3f5efb1a4 100644 --- a/src/test/resources/DiagnosticReport/transactions/provide-diagnostic-report-update.json +++ b/src/test/resources/DiagnosticReport/transactions/provide-diagnostic-report-update.json @@ -162,7 +162,6 @@ ] }, "subject": { - "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" diff --git a/src/test/resources/MedicationStatement/transactions/find-medication-statement-search.json b/src/test/resources/MedicationStatement/transactions/find-medication-statement-search.json index 488c8d769..89d17f644 100644 --- a/src/test/resources/MedicationStatement/transactions/find-medication-statement-search.json +++ b/src/test/resources/MedicationStatement/transactions/find-medication-statement-search.json @@ -22,7 +22,6 @@ "text": "Atazanavir" }, "subject": { - "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" diff --git a/src/test/resources/MedicationStatement/transactions/provide-medication-statement-create.json b/src/test/resources/MedicationStatement/transactions/provide-medication-statement-create.json index 7ec04e46f..356de5077 100644 --- a/src/test/resources/MedicationStatement/transactions/provide-medication-statement-create.json +++ b/src/test/resources/MedicationStatement/transactions/provide-medication-statement-create.json @@ -22,7 +22,6 @@ "text": "Atazanavir" }, "subject": { - "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" diff --git a/src/test/resources/MedicationStatement/transactions/provide-medication-statement-update.json b/src/test/resources/MedicationStatement/transactions/provide-medication-statement-update.json index f6e72e567..aa53e475b 100644 --- a/src/test/resources/MedicationStatement/transactions/provide-medication-statement-update.json +++ b/src/test/resources/MedicationStatement/transactions/provide-medication-statement-update.json @@ -22,7 +22,6 @@ "text": "Atazanavir" }, "subject": { - "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" diff --git a/src/test/resources/Observation/transactions/find-observation-search.json b/src/test/resources/Observation/transactions/find-observation-search.json index c8e7447e2..67e16cf72 100644 --- a/src/test/resources/Observation/transactions/find-observation-search.json +++ b/src/test/resources/Observation/transactions/find-observation-search.json @@ -25,7 +25,6 @@ ] }, "subject": { - "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" diff --git a/src/test/resources/Observation/transactions/provide-observation-create.json b/src/test/resources/Observation/transactions/provide-observation-create.json index ddb317fdc..0d56459bd 100644 --- a/src/test/resources/Observation/transactions/provide-observation-create.json +++ b/src/test/resources/Observation/transactions/provide-observation-create.json @@ -25,7 +25,6 @@ ] }, "subject": { - "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" diff --git a/src/test/resources/Observation/transactions/provide-observation-update.json b/src/test/resources/Observation/transactions/provide-observation-update.json index 4d99d40c2..35c55e042 100644 --- a/src/test/resources/Observation/transactions/provide-observation-update.json +++ b/src/test/resources/Observation/transactions/provide-observation-update.json @@ -25,7 +25,6 @@ ] }, "subject": { - "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" diff --git a/src/test/resources/Procedure/transactions/find-procedure-search.json b/src/test/resources/Procedure/transactions/find-procedure-search.json index 5e38d462b..a643570c9 100644 --- a/src/test/resources/Procedure/transactions/find-procedure-search.json +++ b/src/test/resources/Procedure/transactions/find-procedure-search.json @@ -32,7 +32,6 @@ }, "performedDateTime": "2020-04-23", "subject": { - "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" diff --git a/src/test/resources/Procedure/transactions/provide-procedure-create.json b/src/test/resources/Procedure/transactions/provide-procedure-create.json index ec296ea4f..de5255f98 100644 --- a/src/test/resources/Procedure/transactions/provide-procedure-create.json +++ b/src/test/resources/Procedure/transactions/provide-procedure-create.json @@ -32,7 +32,6 @@ }, "performedDateTime": "2020-04-23", "subject": { - "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" diff --git a/src/test/resources/Procedure/transactions/provide-procedure-update.json b/src/test/resources/Procedure/transactions/provide-procedure-update.json index 0ce9fd622..6114eed41 100644 --- a/src/test/resources/Procedure/transactions/provide-procedure-update.json +++ b/src/test/resources/Procedure/transactions/provide-procedure-update.json @@ -32,7 +32,6 @@ }, "performedDateTime": "2020-04-23", "subject": { - "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" diff --git a/src/test/resources/QuestionnaireResponse/transactions/find-questionnaire-response-search.json b/src/test/resources/QuestionnaireResponse/transactions/find-questionnaire-response-search.json index c55b5f7a6..ec01eb350 100644 --- a/src/test/resources/QuestionnaireResponse/transactions/find-questionnaire-response-search.json +++ b/src/test/resources/QuestionnaireResponse/transactions/find-questionnaire-response-search.json @@ -4,7 +4,6 @@ "status": "entered-in-error", "authored": "2020-05-04T14:15:00-05:00", "subject": { - "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" diff --git a/src/test/resources/QuestionnaireResponse/transactions/provide-questionnaire-response-create.json b/src/test/resources/QuestionnaireResponse/transactions/provide-questionnaire-response-create.json index 7f0fa732e..d367778c1 100644 --- a/src/test/resources/QuestionnaireResponse/transactions/provide-questionnaire-response-create.json +++ b/src/test/resources/QuestionnaireResponse/transactions/provide-questionnaire-response-create.json @@ -4,7 +4,6 @@ "status": "completed", "authored": "2020-05-04T14:15:00-05:00", "subject": { - "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" diff --git a/src/test/resources/QuestionnaireResponse/transactions/provide-questionnaire-response-update.json b/src/test/resources/QuestionnaireResponse/transactions/provide-questionnaire-response-update.json index 2aae01596..4aea66e58 100644 --- a/src/test/resources/QuestionnaireResponse/transactions/provide-questionnaire-response-update.json +++ b/src/test/resources/QuestionnaireResponse/transactions/provide-questionnaire-response-update.json @@ -4,7 +4,6 @@ "status": "amended", "authored": "2020-05-04T14:15:00-05:00", "subject": { - "reference": "/Patient?identifier=urn:ietf:rfc:4122|{{patientId}}", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" From 5655f1d9c256e2b0468079e434f7068324ccc42a Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 2 Jul 2021 20:50:56 +0200 Subject: [PATCH 118/141] Deletes deprecated test as the EHR is now automatically created --- .../fhir/condition/ConditionIT.java | 11 --- ...create-condition-with-invalid-subject.json | 75 ------------------- 2 files changed, 86 deletions(-) delete mode 100644 src/test/resources/Condition/create-condition-with-invalid-subject.json diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/condition/ConditionIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/condition/ConditionIT.java index 798978d48..62e124167 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/condition/ConditionIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/condition/ConditionIT.java @@ -1,6 +1,5 @@ package org.ehrbase.fhirbridge.fhir.condition; -import ca.uhn.fhir.rest.gclient.ICreateTyped; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.ehrbase.fhirbridge.comparators.CustomTemporalAcessorComparator; import org.ehrbase.fhirbridge.fhir.AbstractMappingTestSetupIT; @@ -9,7 +8,6 @@ import org.hl7.fhir.r4.model.Patient; import org.javers.core.Javers; import org.javers.core.JaversBuilder; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -35,15 +33,6 @@ void createDefault() throws IOException { create("create-condition-default.json"); } - @Test - void createWithInvalidSubject() throws IOException { - String resource = super.testFileLoader.loadResourceToString("create-condition-with-invalid-subject.json"); - ICreateTyped createTyped = client.create().resource(resource); - Exception exception = Assertions.assertThrows(UnprocessableEntityException.class, createTyped::execute); - - assertEquals("HTTP 422 : Subject identifier is required", exception.getMessage()); - } - @Test void createSymptomCovidAbsent() throws IOException { create("create-symptoms-covid-19-absent.json"); diff --git a/src/test/resources/Condition/create-condition-with-invalid-subject.json b/src/test/resources/Condition/create-condition-with-invalid-subject.json deleted file mode 100644 index 390c474a6..000000000 --- a/src/test/resources/Condition/create-condition-with-invalid-subject.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "resourceType": "Condition", - "id": "example", - "text": { - "status": "generated", - "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">Severe burn of left ear (Date: 24-May 2012)</div>" - }, - "clinicalStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", - "code": "active" - } - ] - }, - "verificationStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", - "code": "confirmed" - } - ] - }, - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-category", - "code": "encounter-diagnosis", - "display": "Encounter Diagnosis" - }, - { - "system": "http://snomed.info/sct", - "code": "439401001", - "display": "Diagnosis" - } - ] - } - ], - "severity": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "24484000", - "display": "Severe" - } - ] - }, - "code": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "39065001", - "display": "Burn of ear" - } - ], - "text": "Burnt Ear" - }, - "bodySite": [ - { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "49521004", - "display": "Left external ear structure" - } - ], - "text": "Left Ear" - } - ], - "subject": { - "reference": "urn:uuid:07f602e0-579e-4fe3-95af-381728bf0d49" - }, - "onsetDateTime": "2012-05-24" -} \ No newline at end of file From 810ced33992d64f75edd3ac6e10120a09625ce7e Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 2 Jul 2021 20:57:45 +0200 Subject: [PATCH 119/141] Fixes test data --- src/test/resources/Encounter/create-patienten-aufenthalt.json | 4 ++-- .../Encounter/create-stationaer-versorgungsfall.json | 2 +- .../create-immunization-for-patient-complete.json | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/test/resources/Encounter/create-patienten-aufenthalt.json b/src/test/resources/Encounter/create-patienten-aufenthalt.json index 2c1e25dc4..d5ba8e756 100644 --- a/src/test/resources/Encounter/create-patienten-aufenthalt.json +++ b/src/test/resources/Encounter/create-patienten-aufenthalt.json @@ -51,7 +51,7 @@ "diagnosis": [ { "condition": { - "reference": "Condition/e6b6895c-549b-47c5-a842-41100761385d" + "reference": "http://external/Condition/123" } } ], @@ -93,7 +93,7 @@ "location": [ { "location": { - "reference": "Location/FD7DF5FD052E1CBCF7F41B12804D596C71FFBE1958B58EF06401DD781B2A53D3" + "reference": "http://external/Location/123" }, "status": "active", "physicalType": { diff --git a/src/test/resources/Encounter/create-stationaer-versorgungsfall.json b/src/test/resources/Encounter/create-stationaer-versorgungsfall.json index f6f065aac..08cfec0cf 100644 --- a/src/test/resources/Encounter/create-stationaer-versorgungsfall.json +++ b/src/test/resources/Encounter/create-stationaer-versorgungsfall.json @@ -49,7 +49,7 @@ "diagnosis": [ { "condition": { - "reference": "Condition/e6b6895c-549b-47c5-a842-41100761385d" + "reference": "http//external/Condition/123" } } ], diff --git a/src/test/resources/Immunization/create-immunization-for-patient-complete.json b/src/test/resources/Immunization/create-immunization-for-patient-complete.json index eabf4989e..690f1108e 100644 --- a/src/test/resources/Immunization/create-immunization-for-patient-complete.json +++ b/src/test/resources/Immunization/create-immunization-for-patient-complete.json @@ -7,7 +7,6 @@ }, "occurrenceDateTime": "2020-10-06", "patient": { - "reference": "Patient/c786ac3c-0579-4aa2-adda-db784b214ad6", "identifier": { "system": "urn:ietf:rfc:4122", "value": "{{patientId}}" From 26d85e1acc428ff24285f3e0448570f4a2255e82 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Fri, 2 Jul 2021 21:02:51 +0200 Subject: [PATCH 120/141] Initialize HAPI FHIR Validation API at startup (thanks to Hauke) --- .../fhirbridge/config/FhirValidationConfiguration.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/config/FhirValidationConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/FhirValidationConfiguration.java index 5c322936d..ecd3e0c45 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/FhirValidationConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/FhirValidationConfiguration.java @@ -66,7 +66,10 @@ public IValidationSupport validationSupport() { ValidationSupportChain validationSupportChain = new ValidationSupportChain(); // Validates core structure definitions - validationSupportChain.addValidationSupport(new DefaultProfileValidationSupport(fhirContext)); + DefaultProfileValidationSupport defaultProfileValidationSupport = new DefaultProfileValidationSupport(fhirContext); + defaultProfileValidationSupport.fetchAllStructureDefinitions(); + defaultProfileValidationSupport.fetchCodeSystem(""); + validationSupportChain.addValidationSupport(defaultProfileValidationSupport); // Validates custom profiles (loaded from classpath) PrePopulatedValidationSupport prePopulatedValidationSupport = new PrePopulatedValidationSupport(fhirContext); From 505bc4d5b7bcf53e88257d9377f26ece91132fd5 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Mon, 5 Jul 2021 12:55:55 +0200 Subject: [PATCH 121/141] Review Encounter resource implementation --- .../camel/processor/FhirProfileValidator.java | 4 +- .../camel/processor/FhirRequestProcessor.java | 16 +++ .../ResourcePersistenceProcessor.java | 4 + .../camel/route/EncounterRoutes.java | 55 --------- .../camel/route/FhirRouteBuilder.java | 14 +++ .../config/ConversionConfiguration.java | 104 ++++++++++-------- .../config/FhirValidationConfiguration.java | 2 + .../ehr/converter/ConversionService.java | 19 +--- .../EncounterToAdminEntryConverter.java | 14 +-- .../KontaktebeneDefiningCode.java | 16 +-- ...tientenAufenthaltCompositionConverter.java | 6 +- ...sorgungsaufenthaltAdminEntryConverter.java | 12 +- ...erVersorgungsfallCompositionConverter.java | 2 +- .../fhirbridge/fhir/common/Profile.java | 77 +++---------- .../fhirbridge/fhir/support/Encounters.java | 50 --------- .../fhir/procedure/ProcedureIT.java | 10 +- 16 files changed, 149 insertions(+), 256 deletions(-) delete mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java rename src/main/java/org/ehrbase/fhirbridge/{fhir/support => ehr/converter/specific/patientenaufenthalt}/KontaktebeneDefiningCode.java (53%) delete mode 100644 src/main/java/org/ehrbase/fhirbridge/fhir/support/Encounters.java diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirProfileValidator.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirProfileValidator.java index 857119fa6..eb7de3999 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirProfileValidator.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirProfileValidator.java @@ -24,6 +24,7 @@ import java.util.Set; @Component +@SuppressWarnings("java:S6212") public class FhirProfileValidator implements Processor, MessageSourceAware { private static final Logger LOG = LoggerFactory.getLogger(FhirProfileValidator.class); @@ -39,8 +40,7 @@ public FhirProfileValidator(FhirContext fhirContext) { @Override public void process(Exchange exchange) { Resource resource = exchange.getIn().getBody(Resource.class); - - LOG.debug("Validating {} resource...", resource.getResourceType()); + LOG.trace("Validating {} resource...", resource.getResourceType()); List<String> profiles = Resources.getProfileUris(resource); if (profiles.isEmpty()) { diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirRequestProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirRequestProcessor.java index 4551040dd..64263b73d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirRequestProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirRequestProcessor.java @@ -1,3 +1,19 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.ehrbase.fhirbridge.camel.processor; import ca.uhn.fhir.rest.api.server.RequestDetails; diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourcePersistenceProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourcePersistenceProcessor.java index dee8f4e76..9ce3db32a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourcePersistenceProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourcePersistenceProcessor.java @@ -75,6 +75,8 @@ public void process(Exchange exchange) throws Exception { } private void handleCreateOperation(Exchange exchange, RequestDetails requestDetails, IFhirResourceDao resourceDao) { + LOG.trace("Creating {} resource...", requestDetails.getResourceName()); + Resource resource = exchange.getIn().getBody(Resource.class); String ifNoneExist = requestDetails.getConditionalUrl(RestOperationTypeEnum.CREATE); @@ -85,6 +87,8 @@ private void handleCreateOperation(Exchange exchange, RequestDetails requestDeta } private void handleReadOperation(Exchange exchange, RequestDetails requestDetails, IFhirResourceDao resourceDao) { + LOG.trace("Reading {} resource...", requestDetails.getResourceName()); + IIdType id = exchange.getIn().getBody(IIdType.class); IBaseResource resource = resourceDao.read(id, requestDetails); exchange.getMessage().setBody(resource); diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java deleted file mode 100644 index 0818d071e..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/EncounterRoutes.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.ehrbase.fhirbridge.camel.route; - -import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; -import org.apache.camel.builder.RouteBuilder; -import org.ehrbase.fhirbridge.camel.CamelConstants; -import org.ehrbase.fhirbridge.ehr.converter.ConversionException; -import org.ehrbase.fhirbridge.fhir.common.Profile; -import org.ehrbase.fhirbridge.fhir.support.Encounters; -import org.hl7.fhir.r4.model.Encounter; -import org.springframework.stereotype.Component; - -/** - * Implementation of {@link RouteBuilder} that provides route definitions for transactions - * linked to {@link Encounter} resource. - * - * @since 1.0.0 - */ -@Component -public class EncounterRoutes extends AbstractRouteBuilder { - - @Override - public void configure() throws Exception { - // @formatter:off - super.configure(); - - // 'Provide Encounter' route definition - from("encounter-provide:consumer?fhirContext=#fhirContext") - .routeId("provide-encounter-route") - .onCompletion() - .process("provideResourceAuditHandler") - .end() - .process("fhirProfileValidator") - .to("direct:internal-provide-encounter"); - - // Internal routes definition - from("direct:internal-provide-encounter") - .routeId("internal-provide-encounter-route") - .process("provideEncounterPersistenceProcessor") - .process("ehrIdLookupProcessor") - .setHeader(CamelConstants.PROFILE, method(Encounters.class, "getProfileByKontaktEbene")) - .doTry() - .choice() - .when(header(CamelConstants.PROFILE).isEqualTo(Profile.KONTAKT_GESUNDHEIT_ABTEILUNG)) - .to("bean:fhirResourceConversionService?method=convert(${headers.CamelFhirBridgeProfile}, ${body})") - .otherwise() - .to("bean:fhirResourceConversionService?method=convertDefaultEncounter(${body})") - .endDoTry() - .doCatch(ConversionException.class) - .throwException(UnprocessableEntityException.class, "${exception.message}") - .end() - .to("direct:internal-provide-resource-after-converter"); - - // @formatter:on - } -} \ No newline at end of file diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/FhirRouteBuilder.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/FhirRouteBuilder.java index abff0d2c3..dc45426b1 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/FhirRouteBuilder.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/FhirRouteBuilder.java @@ -17,14 +17,25 @@ package org.ehrbase.fhirbridge.camel.route; import org.apache.camel.builder.RouteBuilder; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; @Component @SuppressWarnings("java:S1192") public class FhirRouteBuilder extends RouteBuilder { + @Value("${fhir-bridge.debug.enabled:false}") + private boolean debug; + @Override public void configure() throws Exception { + errorHandler(defaultErrorHandler() + .logStackTrace(debug) + .logExhaustedMessageHistory(debug)); + + onException(Exception.class) + .process("defaultExceptionHandler"); + configureAuditEvent(); configureCondition(); configureConsent(); @@ -83,6 +94,9 @@ private void configureDiagnosticReport() { * Configures available endpoints for {@link org.hl7.fhir.r4.model.Encounter Encounter} resource. */ private void configureEncounter() { + from("encounter-provide:encounterEndpoint?fhirContext=#fhirContext") + .to("direct:provideResource"); + from("encounter-find:encounterEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") .process("resourcePersistenceProcessor"); } diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java index 541f0e0b0..336816dbd 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java @@ -1,8 +1,23 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.ehrbase.fhirbridge.config; import org.ehrbase.fhirbridge.ehr.converter.ConversionService; import org.ehrbase.fhirbridge.ehr.converter.specific.antibodypanel.GECCOSerologischerBefundCompositionConverter; -import org.ehrbase.fhirbridge.ehr.converter.specific.patientenaufenthalt.PatientenAufenthaltCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.bloodgas.BloodGasPanelCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.bloodpressure.BloodPressureCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.bodyheight.BodyHeightCompositionConverter; @@ -16,6 +31,7 @@ import org.ehrbase.fhirbridge.ehr.converter.specific.diagnosticreportlab.DiagnosticReportLabCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.fio2.FiO2CompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.geccoDiagnose.GECCODiagnoseCompositionConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.geccoVirologischerbefund.PCRCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.heartrate.HeartRateCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.historyoftravel.HistoryOfTravelCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.impfstatus.ImpfstatusCompositionConverter; @@ -24,6 +40,7 @@ import org.ehrbase.fhirbridge.ehr.converter.specific.observationlab.ObservationLabCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.patient.PatientCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.patientdischarge.PatientDischargeCompositionConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.patientenaufenthalt.PatientenAufenthaltCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.patientinicu.PatientInIcuCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.pregnancystatus.PregnancyStatusCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.procedure.ProcedureCompositionConverter; @@ -35,51 +52,49 @@ import org.ehrbase.fhirbridge.ehr.converter.specific.stationaererversorgungsfall.StationaererVersorgungsfallCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.symptom.SymptomCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.therapy.TherapyCompositionConverter; -import org.ehrbase.fhirbridge.ehr.converter.specific.geccoVirologischerbefund.PCRCompositionConverter; import org.ehrbase.fhirbridge.fhir.common.Profile; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @Configuration +@SuppressWarnings("java:S6212") public class ConversionConfiguration { @Bean(name = "fhirResourceConversionService") public ConversionService conversionService() { ConversionService conversionService = new ConversionService(); - - // Register Resource Converters registerConditionConverters(conversionService); registerConsentConverters(conversionService); registerDiagnosticReportConverters(conversionService); + registerEncounterConverters(conversionService); + registerImmunizationConverters(conversionService); + registerMedicationStatementConverters(conversionService); registerObservationConverters(conversionService); registerPatientConverters(conversionService); registerProcedureConverters(conversionService); - registerQuestionnaireResponseConverter(conversionService); - registerMedicationStatementConverter(conversionService); - registerEncounterConverter(conversionService); - registerImmunizationConverters(conversionService); - + registerQuestionnaireResponseConverters(conversionService); return conversionService; } private void registerConditionConverters(ConversionService conversionService) { - conversionService.registerConverter(Profile.DEFAULT_CONDITION, new DiagnoseCompositionConverter()); + conversionService.registerConverter(Profile.CONDITION_DEFAULT, new DiagnoseCompositionConverter()); conversionService.registerConverter(Profile.SYMPTOMS_COVID_19, new SymptomCompositionConverter()); - GECCODiagnoseCompositionConverter diagnoseCommonConverter = new GECCODiagnoseCompositionConverter(); - conversionService.registerConverter(Profile.DIAGNOSE_LIVER_DISEASE, diagnoseCommonConverter); - conversionService.registerConverter(Profile.DIAGNOSE_LUNG_DISEASE, diagnoseCommonConverter); - conversionService.registerConverter(Profile.DIAGNOSE_DIABETES_MELLITUS, diagnoseCommonConverter); - conversionService.registerConverter(Profile.DIAGNOSE_COVID_19, diagnoseCommonConverter); - conversionService.registerConverter(Profile.DIAGNOSE_MALIGNANT_NEOPLASTIC_DISEASE, diagnoseCommonConverter); - conversionService.registerConverter(Profile.DIAGNOSE_RHEUMATOLOGICAL_IMMUNOLOGICAL_DISEASE, diagnoseCommonConverter); - conversionService.registerConverter(Profile.DIAGNOSE_CARDIOVASCULAR_DISEASE, diagnoseCommonConverter); - conversionService.registerConverter(Profile.DIAGNOSE_CHRONIC_KIDNEY_DISEASE, diagnoseCommonConverter); - conversionService.registerConverter(Profile.DIAGNOSE_CHRONIC_NEUROLOGICAL_MENTAL_DISEASE, diagnoseCommonConverter); - conversionService.registerConverter(Profile.DIAGNOSE_GASTROINTESTINAL_ULCERS, diagnoseCommonConverter); - conversionService.registerConverter(Profile.DIAGNOSE_HIV, diagnoseCommonConverter); - conversionService.registerConverter(Profile.DIAGNOSE_ORGAN_RECIPIENT, diagnoseCommonConverter); - conversionService.registerConverter(Profile.DIAGNOSE_COMPLICATIONS_COVID_19, diagnoseCommonConverter); - conversionService.registerConverter(Profile.DIAGNOSE_DEPENDENCE_ON_VENTILATOR, diagnoseCommonConverter); + + GECCODiagnoseCompositionConverter converter = new GECCODiagnoseCompositionConverter(); + conversionService.registerConverter(Profile.DIAGNOSE_LIVER_DISEASE, converter); + conversionService.registerConverter(Profile.DIAGNOSE_LUNG_DISEASE, converter); + conversionService.registerConverter(Profile.DIAGNOSE_DIABETES_MELLITUS, converter); + conversionService.registerConverter(Profile.DIAGNOSE_COVID_19, converter); + conversionService.registerConverter(Profile.DIAGNOSE_MALIGNANT_NEOPLASTIC_DISEASE, converter); + conversionService.registerConverter(Profile.DIAGNOSE_RHEUMATOLOGICAL_IMMUNOLOGICAL_DISEASE, converter); + conversionService.registerConverter(Profile.DIAGNOSE_CARDIOVASCULAR_DISEASE, converter); + conversionService.registerConverter(Profile.DIAGNOSE_CHRONIC_KIDNEY_DISEASE, converter); + conversionService.registerConverter(Profile.DIAGNOSE_CHRONIC_NEUROLOGICAL_MENTAL_DISEASE, converter); + conversionService.registerConverter(Profile.DIAGNOSE_GASTROINTESTINAL_ULCERS, converter); + conversionService.registerConverter(Profile.DIAGNOSE_HIV, converter); + conversionService.registerConverter(Profile.DIAGNOSE_ORGAN_RECIPIENT, converter); + conversionService.registerConverter(Profile.DIAGNOSE_COMPLICATIONS_COVID_19, converter); + conversionService.registerConverter(Profile.DIAGNOSE_DEPENDENCE_ON_VENTILATOR, converter); } private void registerConsentConverters(ConversionService conversionService) { @@ -91,6 +106,14 @@ private void registerDiagnosticReportConverters(ConversionService conversionServ conversionService.registerConverter(Profile.DIAGNOSTIC_REPORT_RADIOLOGY, new RadiologischerBefundCompositionConverter()); } + private void registerMedicationStatementConverters(ConversionService conversionService) { + GECCOMedikationCompositionConverter converter = new GECCOMedikationCompositionConverter(); + conversionService.registerConverter(Profile.PHARMACOLOGICAL_THERAPY, converter); + conversionService.registerConverter(Profile.PHARMACOLOGICAL_THERAPY_ACE_INHIBITORS, converter); + conversionService.registerConverter(Profile.PHARMACOLOGICAL_THERAPY_ANTICOAGULANTS, converter); + conversionService.registerConverter(Profile.PHARMACOLOGICAL_THERAPY_IMMUNOGLOBULINS, converter); + } + private void registerObservationConverters(ConversionService conversionService) { conversionService.registerConverter(Profile.BODY_HEIGHT, new BodyHeightCompositionConverter()); conversionService.registerConverter(Profile.BLOOD_GAS_PANEL, new BloodGasPanelCompositionConverter()); @@ -112,7 +135,6 @@ private void registerObservationConverters(ConversionService conversionService) conversionService.registerConverter(Profile.RESPIRATORY_RATE, new RespiratoryRateCompositionConverter()); conversionService.registerConverter(Profile.SOFA_SCORE, new SofaScoreCompositionConverter()); conversionService.registerConverter(Profile.SMOKING_STATUS, new SmokingStatusCompositionConverter()); - conversionService.registerConverter(Profile.TRAVEL_HISTORY, new HistoryOfTravelCompositionConverter()); conversionService.registerConverter(Profile.OXYGEN_SATURATION, new PulseOximetryCompositionConverter()); } @@ -124,29 +146,21 @@ private void registerPatientConverters(ConversionService conversionService) { private void registerProcedureConverters(ConversionService conversionService) { conversionService.registerConverter(Profile.PROCEDURE, new ProcedureCompositionConverter()); - TherapyCompositionConverter therapyCompositionConverter = new TherapyCompositionConverter(); - conversionService.registerConverter(Profile.APHERESIS_PROCEDURE, therapyCompositionConverter); - conversionService.registerConverter(Profile.DIALYSIS_PROCEDURE, therapyCompositionConverter); - conversionService.registerConverter(Profile.EXTRACORPOREAL_MEMBRANE_OXYGENATION_PROCEDURE, therapyCompositionConverter); - conversionService.registerConverter(Profile.PRONE_POSITION_PROCEDURE, therapyCompositionConverter); - conversionService.registerConverter(Profile.RADIOLOGY_PROCEDURE, therapyCompositionConverter); - conversionService.registerConverter(Profile.RESPIRATORY_THERAPIES_PROCEDURE, therapyCompositionConverter); - } - - private void registerQuestionnaireResponseConverter(ConversionService conversionService) { - conversionService.registerConverter(Profile.DEFAULT_QUESTIONNAIRE_RESPONSE, new D4lQuestionnaireCompositionConverter()); + TherapyCompositionConverter converter = new TherapyCompositionConverter(); + conversionService.registerConverter(Profile.APHERESIS_PROCEDURE, converter); + conversionService.registerConverter(Profile.DIALYSIS_PROCEDURE, converter); + conversionService.registerConverter(Profile.EXTRACORPOREAL_MEMBRANE_OXYGENATION_PROCEDURE, converter); + conversionService.registerConverter(Profile.PRONE_POSITION_PROCEDURE, converter); + conversionService.registerConverter(Profile.RADIOLOGY_PROCEDURE, converter); + conversionService.registerConverter(Profile.RESPIRATORY_THERAPIES_PROCEDURE, converter); } - private void registerMedicationStatementConverter(ConversionService conversionService) { - GECCOMedikationCompositionConverter converter = new GECCOMedikationCompositionConverter(); - conversionService.registerConverter(Profile.PHARMACOLOGICAL_THERAPY, converter); - conversionService.registerConverter(Profile.PHARMACOLOGICAL_THERAPY_ACE_INHIBITORS, converter); - conversionService.registerConverter(Profile.PHARMACOLOGICAL_THERAPY_ANTICOAGULANTS, converter); - conversionService.registerConverter(Profile.PHARMACOLOGICAL_THERAPY_IMMUNOGLOBULINS, converter); + private void registerQuestionnaireResponseConverters(ConversionService conversionService) { + conversionService.registerConverter(Profile.QUESTIONNAIRE_RESPONSE_DEFAULT, new D4lQuestionnaireCompositionConverter()); } - private void registerEncounterConverter(ConversionService conversionService) { - conversionService.registerConverter(Profile.KONTAKT_GESUNDHEIT_EINRICHTUNG, new StationaererVersorgungsfallCompositionConverter()); + private void registerEncounterConverters(ConversionService conversionService) { + conversionService.registerConverter(Profile.ENCOUNTER_DEFAULT, new StationaererVersorgungsfallCompositionConverter()); conversionService.registerConverter(Profile.KONTAKT_GESUNDHEIT_ABTEILUNG, new PatientenAufenthaltCompositionConverter()); } diff --git a/src/main/java/org/ehrbase/fhirbridge/config/FhirValidationConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/FhirValidationConfiguration.java index ecd3e0c45..1dba29dd6 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/FhirValidationConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/FhirValidationConfiguration.java @@ -85,6 +85,8 @@ public IValidationSupport validationSupport() { } catch (IOException e) { throw new FhirBridgeException("An I/O exception occurred while loading custom profiles"); } + validationSupportChain.fetchAllStructureDefinitions(); + defaultProfileValidationSupport.fetchCodeSystem(""); validationSupportChain.addValidationSupport(prePopulatedValidationSupport); // Validates terminology: CodeSystems and ValueSets (using the internal and/or remote terminology service) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/ConversionService.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/ConversionService.java index 8ebe0dea7..a370acbc5 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/ConversionService.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/ConversionService.java @@ -16,18 +16,16 @@ package org.ehrbase.fhirbridge.ehr.converter; -import org.ehrbase.fhirbridge.ehr.converter.generic.RMEntityConverter; import org.ehrbase.fhirbridge.fhir.common.Profile; import org.hl7.fhir.r4.model.Resource; import java.util.EnumMap; import java.util.Map; -// TODO: Review @SuppressWarnings({"rawtypes", "unchecked"}) public class ConversionService { - private final Map<Profile, RMEntityConverter> converters = new EnumMap<>(Profile.class); + private final Map<Profile, ResourceConverter> converters = new EnumMap<>(Profile.class); public boolean canConvert(Profile profile) { return converters.containsKey(profile); @@ -37,21 +35,10 @@ public Object convert(Profile profile, Resource resource) { if (!canConvert(profile)) { throw new ConversionException("No converter available for " + resource.getResourceType() + " with profile " + profile); } - return converters.get(profile) - .convert(resource); + return converters.get(profile).convert(resource); } - public Object convertDefaultEncounter(Resource resource) { - - if(!converters.containsKey(Profile.KONTAKT_GESUNDHEIT_EINRICHTUNG)) { - throw new ConversionException("No converter available for encounter with profile stationär Versorgungsfall" ); - } - - return converters.get(Profile.KONTAKT_GESUNDHEIT_EINRICHTUNG) - .convert(resource); - } - - public void registerConverter(Profile profile, RMEntityConverter<?, ?> converter) { + public void registerConverter(Profile profile, ResourceConverter converter) { converters.put(profile, converter); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java index ba90ca8b8..b55fe3edd 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java @@ -3,12 +3,12 @@ import org.ehrbase.client.classgenerator.interfaces.EntryEntity; import org.hl7.fhir.r4.model.Encounter; import org.springframework.lang.NonNull; -import org.ehrbase.fhirbridge.fhir.support.Encounters; + import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.time.temporal.TemporalAccessor; -public abstract class EncounterToAdminEntryConverter <E extends EntryEntity> extends EntryEntityConverter<Encounter, E> { +public abstract class EncounterToAdminEntryConverter<E extends EntryEntity> extends EntryEntityConverter<Encounter, E> { @Override public E convert(@NonNull Encounter resource) { @@ -18,7 +18,7 @@ public E convert(@NonNull Encounter resource) { } public void invokeTimeValues(E entryEntity, Encounter resource) { - if(Encounters.isNotEmpty(resource.getLocation())) { + if (!resource.getLocation().isEmpty()) { invokeSetBeginEndValue(entryEntity, resource); } @@ -26,7 +26,7 @@ public void invokeTimeValues(E entryEntity, Encounter resource) { invokeSetEntlassungValue(entryEntity, resource); } - public void invokeSetBeginEndValue(E entryEntity, Encounter resource){ + public void invokeSetBeginEndValue(E entryEntity, Encounter resource) { try { Encounter.EncounterLocationComponent location = resource.getLocation().get(0); @@ -45,7 +45,7 @@ public void invokeSetBeginEndValue(E entryEntity, Encounter resource){ } } catch (IllegalAccessException | InvocationTargetException exception) { exception.printStackTrace(); - } catch (NoSuchMethodException ignored){ + } catch (NoSuchMethodException ignored) { //ignored } } @@ -56,7 +56,7 @@ public void invokeSetAufnahmeValue(E entryEntity, Encounter resource) { setDatumUhrzeitDerAufnahmeValue.invoke(entryEntity, TimeConverter.convertEncounterTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { exception.printStackTrace(); - } catch (NoSuchMethodException ignored){ + } catch (NoSuchMethodException ignored) { //ignored } } @@ -71,7 +71,7 @@ public void invokeSetEntlassungValue(E entryEntity, Encounter resource) { } catch (IllegalAccessException | InvocationTargetException exception) { exception.printStackTrace(); - } catch (NoSuchMethodException ignored){ + } catch (NoSuchMethodException ignored) { //ignored } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/support/KontaktebeneDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/KontaktebeneDefiningCode.java similarity index 53% rename from src/main/java/org/ehrbase/fhirbridge/fhir/support/KontaktebeneDefiningCode.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/KontaktebeneDefiningCode.java index be8ff13e4..a87ef91ed 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/support/KontaktebeneDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/KontaktebeneDefiningCode.java @@ -1,14 +1,14 @@ -package org.ehrbase.fhirbridge.fhir.support; +package org.ehrbase.fhirbridge.ehr.converter.specific.patientenaufenthalt; import org.ehrbase.client.classgenerator.EnumValueSet; public enum KontaktebeneDefiningCode implements EnumValueSet { - EINRICHTUNGS_KONTAKT("Einrichtungskontakt","Beschreibt den Kontakt zur Einrichtung.","","einrichtungskontakt"), + EINRICHTUNGS_KONTAKT("Einrichtungskontakt", "Beschreibt den Kontakt zur Einrichtung.", "", "einrichtungskontakt"), - ABTEILUNGS_KONTAKT("Abteilungskontakt","Beschreibt den Kontakt zur Abteilung.","","abteilungskontakt"), + ABTEILUNGS_KONTAKT("Abteilungskontakt", "Beschreibt den Kontakt zur Abteilung.", "", "abteilungskontakt"), - VERSORGUNGS_STELLEN_KONTAKT("Versorgungsstellenkontakt","Beschreibt den Kontakt zur Versorgungsstelle.","","versorgungsstellenkontakt"); + VERSORGUNGS_STELLEN_KONTAKT("Versorgungsstellenkontakt", "Beschreibt den Kontakt zur Versorgungsstelle.", "", "versorgungsstellenkontakt"); private String value; @@ -26,18 +26,18 @@ public enum KontaktebeneDefiningCode implements EnumValueSet { } public String getValue() { - return this.value ; + return this.value; } public String getDescription() { - return this.description ; + return this.description; } public String getTerminologyId() { - return this.terminologyId ; + return this.terminologyId; } public String getCode() { - return this.code ; + return this.code; } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java index c81d01193..c7e95b87b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/PatientenAufenthaltCompositionConverter.java @@ -6,13 +6,13 @@ import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.AbteilungsfallCluster; import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungsfallCluster; import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungstellenkontaktCluster; -import static org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem.KONTAKT_EBENE; -import org.ehrbase.fhirbridge.fhir.support.Encounters; import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.Encounter; import org.hl7.fhir.r4.model.Identifier; import org.springframework.lang.NonNull; +import static org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem.KONTAKT_EBENE; + public class PatientenAufenthaltCompositionConverter extends EncounterToCompositionConverter<PatientenaufenthaltComposition> { @@ -21,7 +21,7 @@ public PatientenaufenthaltComposition convertInternal(@NonNull Encounter encount PatientenaufenthaltComposition retVal = new PatientenaufenthaltComposition(); - if (Encounters.isNotEmpty(encounter.getIdentifier()) && Encounters.isNotEmpty(encounter.getType())) { + if (!encounter.getIdentifier().isEmpty() && !encounter.getType().isEmpty()) { setFallCluster(retVal, encounter); } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/VersorgungsaufenthaltAdminEntryConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/VersorgungsaufenthaltAdminEntryConverter.java index f265c57bc..2f733664a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/VersorgungsaufenthaltAdminEntryConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientenaufenthalt/VersorgungsaufenthaltAdminEntryConverter.java @@ -1,13 +1,13 @@ package org.ehrbase.fhirbridge.ehr.converter.specific.patientenaufenthalt; +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.ehrbase.fhirbridge.ehr.converter.generic.EncounterToAdminEntryConverter; -import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungsaufenthaltAdminEntry; import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.FachlicheOrganisationseinheitCluster; import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.StandortCluster; -import org.ehrbase.fhirbridge.fhir.support.Encounters; -import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; -import org.hl7.fhir.r4.model.Encounter; +import org.ehrbase.fhirbridge.ehr.opt.patientenaufenthaltcomposition.definition.VersorgungsaufenthaltAdminEntry; import org.hl7.fhir.r4.model.Coding; +import org.hl7.fhir.r4.model.Encounter; + import java.util.ArrayList; public class VersorgungsaufenthaltAdminEntryConverter extends EncounterToAdminEntryConverter<VersorgungsaufenthaltAdminEntry> { @@ -18,7 +18,7 @@ public class VersorgungsaufenthaltAdminEntryConverter extends EncounterToAdminEn protected VersorgungsaufenthaltAdminEntry convertInternal(Encounter encounter) { VersorgungsaufenthaltAdminEntry versorgungsaufenthaltAdminEntry = new VersorgungsaufenthaltAdminEntry(); - if(Encounters.isNotEmpty(encounter.getLocation())) { + if (!encounter.getLocation().isEmpty()) { Encounter.EncounterLocationComponent location = encounter.getLocation().get(0); @@ -83,7 +83,7 @@ private ArrayList<FachlicheOrganisationseinheitCluster> createFachlicheOrganisat ArrayList<FachlicheOrganisationseinheitCluster> retVal = new ArrayList<>(); - for(Coding fachAbteilungsSchluessel : encounter.getServiceType().getCoding()) { + for (Coding fachAbteilungsSchluessel : encounter.getServiceType().getCoding()) { FachlicheOrganisationseinheitCluster fachlicheOrganisationseinheitCluster = new FachlicheOrganisationseinheitCluster(); diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallCompositionConverter.java index d4f426fb5..65d17f5ed 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/stationaererversorgungsfall/StationaererVersorgungsfallCompositionConverter.java @@ -2,7 +2,7 @@ import org.ehrbase.fhirbridge.ehr.converter.generic.EncounterToCompositionConverter; import org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.StationaererVersorgungsfallComposition; -import org.ehrbase.fhirbridge.fhir.support.KontaktebeneDefiningCode; +import org.ehrbase.fhirbridge.ehr.converter.specific.patientenaufenthalt.KontaktebeneDefiningCode; import org.hl7.fhir.r4.model.Encounter; import org.springframework.lang.NonNull; diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java index f29ef5501..989977ba4 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/common/Profile.java @@ -18,14 +18,11 @@ import java.util.Set; import java.util.stream.Collectors; +@SuppressWarnings("HttpUrlsUsage") public enum Profile { - // Condition Profiles - - DEFAULT_CONDITION(Condition.class, null), - - SYMPTOMS_COVID_19(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/symptoms-covid-19"), - + // Condition + CONDITION_DEFAULT(Condition.class, null), DIAGNOSE_LIVER_DISEASE(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/chronic-liver-diseases"), DIAGNOSE_LUNG_DISEASE(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/chronic-lung-diseases"), DIAGNOSE_DIABETES_MELLITUS(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/diabetes-mellitus"), @@ -40,107 +37,69 @@ public enum Profile { DIAGNOSE_ORGAN_RECIPIENT(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/organ-recipient"), DIAGNOSE_COMPLICATIONS_COVID_19(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/complications-covid-19"), DIAGNOSE_DEPENDENCE_ON_VENTILATOR(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/dependence-on-ventilator"), + SYMPTOMS_COVID_19(Condition.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/symptoms-covid-19"), - // Immunization Profiles - - HISTORY_OF_VACCINATION(Immunization.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization"), - // Consent Profiles - + // Consent DO_NOT_RESUSCITATE_ORDER(Consent.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/do-not-resuscitate-order"), - // DiagnosticReport Profiles + // Immunization + HISTORY_OF_VACCINATION(Immunization.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/immunization"), + // DiagnosticReport DIAGNOSTIC_REPORT_LAB(DiagnosticReport.class, "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/DiagnosticReportLab"), - DIAGNOSTIC_REPORT_RADIOLOGY(DiagnosticReport.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/diagnostic-report-radiology"), + // Encounter + ENCOUNTER_DEFAULT(Encounter.class, null), + KONTAKT_GESUNDHEIT_ABTEILUNG(Encounter.class, "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/StructureDefinition/KontaktGesundheitseinrichtung"), - // MedicationStatement Profiles + // MedicationStatement PHARMACOLOGICAL_THERAPY(MedicationStatement.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pharmacological-therapy"), PHARMACOLOGICAL_THERAPY_ACE_INHIBITORS(MedicationStatement.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pharmacological-therapy-ace-inhibitors"), PHARMACOLOGICAL_THERAPY_ANTICOAGULANTS(MedicationStatement.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pharmacological-therapy-anticoagulants"), PHARMACOLOGICAL_THERAPY_IMMUNOGLOBULINS(MedicationStatement.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pharmacological-therapy-immunoglobulins"), - // Encounter Profiles - KONTAKT_GESUNDHEIT_EINRICHTUNG(Encounter.class, null), // as default, has the same link like KONTAKT_GESUNDHEIT_ABTEILUNG - - KONTAKT_GESUNDHEIT_ABTEILUNG(Encounter.class, "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/StructureDefinition/KontaktGesundheitseinrichtung"), - - // Observation Profiles - + // Observation TRAVEL_HISTORY(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/history-of-travel"), - BODY_HEIGHT(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/body-height"), - BLOOD_GAS_PANEL(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-gas-panel"), - BLOOD_PRESSURE(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-pressure"), - BODY_TEMP(Observation.class, "http://hl7.org/fhir/StructureDefinition/bodytemp"), - BODY_WEIGHT(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/body-weight"), - CLINICAL_FRAILTY_SCALE(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/frailty-score"), - CLINICAL_TRIAL_PARTICIPATION(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/interventional-clinical-trial-participation"), - CORONARIRUS_NACHWEIS_TEST(Observation.class, "https://charite.infectioncontrol.de/fhir/core/StructureDefinition/CoronavirusNachweisTest"), - FIO2(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/inhaled-oxygen-concentration"), - HEART_RATE(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/heart-rate"), - KNOWN_EXPOSURE(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/known-exposure"), - PACO2(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/carbon-dioxide-partial-pressure"), - PAO2(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/oxygen-partial-pressure"), - PATIENT_DISCHARGE(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/discharge-disposition"), - PATIENT_IN_ICU(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/patient-in-icu"), - PCR(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-rt-pcr"), - PH(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pH"), - PREGNANCY_STATUS(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pregnancy-status"), - OBSERVATION_LAB(Observation.class, "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ObservationLab"), - OXYGEN_SATURATION(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/oxygen-saturation"), - RESPIRATORY_RATE(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/respiratory-rate"), - SOFA_SCORE(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sofa-score"), - SMOKING_STATUS(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/smoking-status"), - ANTI_BODY_PANEL(Observation.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-ab-pnl-ser-pl-ia"), - // Patient Profiles - + // Patient PATIENT(Patient.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/Patient"), - // Procedure Profiles - - PROCEDURE(Procedure.class, "https://www.medizininformatik-initiative.de/fhir/core/modul-prozedur/StructureDefinition/Procedure"), - - + // Procedure APHERESIS_PROCEDURE(Procedure.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/apheresis"), DIALYSIS_PROCEDURE(Procedure.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/dialysis"), EXTRACORPOREAL_MEMBRANE_OXYGENATION_PROCEDURE(Procedure.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/extracorporeal-membrane-oxygenation"), + PROCEDURE(Procedure.class, "https://www.medizininformatik-initiative.de/fhir/core/modul-prozedur/StructureDefinition/Procedure"), PRONE_POSITION_PROCEDURE(Procedure.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/prone-position"), RADIOLOGY_PROCEDURE(Procedure.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/radiology-procedures"), RESPIRATORY_THERAPIES_PROCEDURE(Procedure.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/respiratory-therapies"), - // Consent profiles - - DNR_ORDER(Consent.class, "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/do-not-resuscitate-order"), - - // QuestionnaireResponse Profiles - - DEFAULT_QUESTIONNAIRE_RESPONSE(QuestionnaireResponse.class, null); + // QuestionnaireResponse + QUESTIONNAIRE_RESPONSE_DEFAULT(QuestionnaireResponse.class, null); private final Class<? extends Resource> resourceType; diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Encounters.java b/src/main/java/org/ehrbase/fhirbridge/fhir/support/Encounters.java deleted file mode 100644 index f1aa50667..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/support/Encounters.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.ehrbase.fhirbridge.fhir.support; - -import org.ehrbase.fhirbridge.fhir.common.Profile; -import org.hl7.fhir.r4.model.Coding; -import org.hl7.fhir.r4.model.Encounter; -import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; -import java.util.List; - -import static org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem.KONTAKT_EBENE; - -public class Encounters { - - private Encounters() { - throw new IllegalStateException("Utility class"); - } - - public static Boolean isNotEmpty(List list) { - - return list != null && list.size() > 0; - } - - public static Profile getProfileByKontaktEbene(Encounter encounter) { - - if (isNotEmpty(encounter.getType())) { - - Coding coding = encounter.getType().get(0).getCoding().get(0); - - return getProfileByCoding(coding); - } - - return Profile.KONTAKT_GESUNDHEIT_EINRICHTUNG; - } - - private static Profile getProfileByCoding(Coding coding) { - - if (coding.getSystem().equals(KONTAKT_EBENE.getUrl())) { - - if (coding.getCode().equals(KontaktebeneDefiningCode.ABTEILUNGS_KONTAKT.getCode()) - || coding.getCode().equals(KontaktebeneDefiningCode.VERSORGUNGS_STELLEN_KONTAKT.getCode())) { - - return Profile.KONTAKT_GESUNDHEIT_ABTEILUNG; - } - } else { - throw new UnprocessableEntityException("Invalid Code system " + coding.getSystem() + - " valid code system: " + KONTAKT_EBENE.getUrl()); - } - - return Profile.KONTAKT_GESUNDHEIT_EINRICHTUNG; - } -} diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/ProcedureIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/ProcedureIT.java index 9ed56123d..098e44075 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/ProcedureIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/procedure/ProcedureIT.java @@ -15,7 +15,9 @@ import java.io.IOException; import java.time.temporal.TemporalAccessor; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; /** * Integration tests for {@link org.hl7.fhir.r4.model.Procedure Procedure} resource. @@ -39,10 +41,10 @@ void createWithDefaultProfile() throws IOException { assertEquals("HTTP 422 : Default profile is not supported for Procedure. " + "One of the following profiles is expected: " + - "[https://www.medizininformatik-initiative.de/fhir/core/modul-prozedur/StructureDefinition/Procedure, " + - "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/apheresis, " + + "[https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/apheresis, " + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/dialysis, " + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/extracorporeal-membrane-oxygenation, " + + "https://www.medizininformatik-initiative.de/fhir/core/modul-prozedur/StructureDefinition/Procedure, " + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/prone-position, " + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/radiology-procedures, " + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/respiratory-therapies]", exception.getMessage()); @@ -61,7 +63,7 @@ void createWithNonExistingSubject() throws IOException { public Exception executeMappingException(String path) throws IOException { Procedure procedure = (Procedure) testFileLoader.loadResource(path); return assertThrows(UnprocessableEntityException.class, () -> { - new ProcedureCompositionConverter().convert(((Procedure) procedure)); + new ProcedureCompositionConverter().convert(((Procedure) procedure)); }); } From 862efc824d191aeda2e10d8daa1b58ade9bb88bc Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Mon, 5 Jul 2021 14:23:28 +0200 Subject: [PATCH 122/141] opt updated --- .../observationlab/LaborAnalytConverter.java | 18 ++--- .../GECCOLaborbefundComposition.java | 2 +- ...=> BezeichnungDesAnalytsDefiningCode.java} | 18 ++--- .../ErgebnisStatusDefiningCode.java | 12 ++-- .../InterpretationDefiningCode.java | 1 + .../LaborbefundKategorieElement.java | 2 +- ...entifikationDerLaboranforderungChoice.java | 2 +- ...kationDerLaboranforderungDvIdentifier.java | 2 +- ...entifikationDerLaboranforderungDvText.java | 2 +- .../definition/LaborergebnisObservation.java | 19 +++++- .../LaborergebnisObservationContainment.java | 2 + .../LaborergebnisTestmethodeChoice.java | 11 +++ .../LaborergebnisTestmethodeDvBoolean.java | 32 +++++++++ .../LaborergebnisTestmethodeDvCodedText.java | 32 +++++++++ .../LaborergebnisTestmethodeDvCount.java | 32 +++++++++ .../LaborergebnisTestmethodeDvDate.java | 32 +++++++++ .../LaborergebnisTestmethodeDvDateTime.java | 32 +++++++++ .../LaborergebnisTestmethodeDvDuration.java | 32 +++++++++ .../LaborergebnisTestmethodeDvEhrUri.java | 32 +++++++++ .../LaborergebnisTestmethodeDvIdentifier.java | 32 +++++++++ .../LaborergebnisTestmethodeDvMultimedia.java | 32 +++++++++ .../LaborergebnisTestmethodeDvOrdinal.java | 32 +++++++++ .../LaborergebnisTestmethodeDvParsable.java | 32 +++++++++ .../LaborergebnisTestmethodeDvProportion.java | 32 +++++++++ .../LaborergebnisTestmethodeDvQuantity.java | 48 +++++++++++++ .../LaborergebnisTestmethodeDvState.java | 32 +++++++++ .../LaborergebnisTestmethodeDvText.java | 32 +++++++++ .../LaborergebnisTestmethodeDvTime.java | 32 +++++++++ .../LaborergebnisTestmethodeDvUri.java | 32 +++++++++ .../definition/ProLaboranalytCluster.java | 68 ++++++++++++------- .../ProLaboranalytClusterContainment.java | 8 ++- .../ProLaboranalytErgebnisStatusChoice.java | 2 +- ...oLaboranalytErgebnisStatusDvCodedText.java | 4 +- .../ProLaboranalytErgebnisStatusDvText.java | 4 +- .../ProLaboranalytKommentarElement.java | 2 +- .../ProLaboranalytMesswertChoice.java | 2 +- .../ProLaboranalytMesswertDvQuantity.java | 6 +- .../ProLaboranalytMesswertDvText.java | 4 +- .../ProLaboranalytProbeIdChoice.java | 2 +- .../ProLaboranalytProbeIdDvIdentifier.java | 2 +- .../ProLaboranalytProbeIdDvUri.java | 2 +- .../ProLaboranalytTestmethodeChoice.java | 11 +++ .../ProLaboranalytTestmethodeDvBoolean.java | 32 +++++++++ .../ProLaboranalytTestmethodeDvCodedText.java | 32 +++++++++ .../ProLaboranalytTestmethodeDvCount.java | 32 +++++++++ .../ProLaboranalytTestmethodeDvDate.java | 32 +++++++++ .../ProLaboranalytTestmethodeDvDateTime.java | 32 +++++++++ .../ProLaboranalytTestmethodeDvDuration.java | 32 +++++++++ .../ProLaboranalytTestmethodeDvEhrUri.java | 32 +++++++++ ...ProLaboranalytTestmethodeDvIdentifier.java | 32 +++++++++ ...ProLaboranalytTestmethodeDvMultimedia.java | 32 +++++++++ .../ProLaboranalytTestmethodeDvOrdinal.java | 32 +++++++++ .../ProLaboranalytTestmethodeDvParsable.java | 32 +++++++++ ...ProLaboranalytTestmethodeDvProportion.java | 32 +++++++++ .../ProLaboranalytTestmethodeDvQuantity.java | 48 +++++++++++++ .../ProLaboranalytTestmethodeDvState.java | 32 +++++++++ .../ProLaboranalytTestmethodeDvText.java | 32 +++++++++ .../ProLaboranalytTestmethodeDvTime.java | 32 +++++++++ .../ProLaboranalytTestmethodeDvUri.java | 32 +++++++++ .../definition/ProbeCluster.java | 2 +- .../ProbeEignungZumTestenChoice.java | 2 +- .../ProbeEignungZumTestenDvCodedText.java | 2 +- .../ProbeEignungZumTestenDvText.java | 2 +- ...fikatorDerUebergeordnetenProbeElement.java | 2 +- .../ProbeProbenentahmebedingungElement.java | 2 +- src/main/resources/opt/GECCO_Laborbefund.opt | 47 +++++++------ 66 files changed, 1287 insertions(+), 100 deletions(-) rename src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/{UntersuchterAnalytDefiningCode.java => BezeichnungDesAnalytsDefiningCode.java} (95%) create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeChoice.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvBoolean.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvCodedText.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvCount.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvDate.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvDateTime.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvDuration.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvEhrUri.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvIdentifier.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvMultimedia.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvOrdinal.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvParsable.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvProportion.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvQuantity.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvState.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvText.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvTime.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvUri.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeChoice.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvBoolean.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvCodedText.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvCount.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvDate.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvDateTime.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvDuration.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvEhrUri.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvIdentifier.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvMultimedia.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvOrdinal.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvParsable.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvProportion.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvQuantity.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvState.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvText.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvTime.java create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvUri.java diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/observationlab/LaborAnalytConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/observationlab/LaborAnalytConverter.java index 41198423f..37d605c0c 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/observationlab/LaborAnalytConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/observationlab/LaborAnalytConverter.java @@ -10,7 +10,7 @@ import org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.ProLaboranalytKommentarElement; import org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.ProLaboranalytMesswertChoice; import org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.ProLaboranalytMesswertDvQuantity; -import org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.UntersuchterAnalytDefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.BezeichnungDesAnalytsDefiningCode; import org.hl7.fhir.r4.model.DateTimeType; import org.hl7.fhir.r4.model.Observation; import org.hl7.fhir.r4.model.Quantity; @@ -24,7 +24,7 @@ public ProLaboranalytCluster convert(Observation observation) { proLaboranalytCluster.setErgebnisStatus(ergebnisStatus); setKommentarElement(proLaboranalytCluster, observation); setMesswert(observation, proLaboranalytCluster); - proLaboranalytCluster.setUntersuchterAnalytDefiningCode(getUntersuchterAnalyt(observation)); + proLaboranalytCluster.setBezeichnungDesAnalytsDefiningCode(getUntersuchterAnalyt(observation)); setInterpretationDefiningCode(observation, proLaboranalytCluster); proLaboranalytCluster.setZeitpunktDerValidierungValue(TimeConverter.convertObservationTime(observation)); setZeitpunktErgebnisStatus(observation, proLaboranalytCluster); @@ -47,7 +47,7 @@ private void setInterpretationDefiningCode(Observation observation, ProLaboranal } } - private UntersuchterAnalytDefiningCode getUntersuchterAnalyt(Observation observation) { + private BezeichnungDesAnalytsDefiningCode getUntersuchterAnalyt(Observation observation) { if (codingAndSystemExist(observation) && checkUrlAndCode(observation)) { return getCode(observation.getCode().getCoding().get(0).getCode()); } else { @@ -63,9 +63,9 @@ private boolean codingAndSystemExist(Observation observation){ return observation.getCode().hasCoding() && observation.getCode().getCoding().get(0).hasSystem(); } - private UntersuchterAnalytDefiningCode getCode(String code) { - if (UntersuchterAnalytDefiningCode.getCodesAsMap().containsKey(code)) { - return UntersuchterAnalytDefiningCode.getCodesAsMap().get(code); + private BezeichnungDesAnalytsDefiningCode getCode(String code) { + if (BezeichnungDesAnalytsDefiningCode.getCodesAsMap().containsKey(code)) { + return BezeichnungDesAnalytsDefiningCode.getCodesAsMap().get(code); } else { throw new ConversionException("code.coding.code value is not valid"); } @@ -100,11 +100,11 @@ private ErgebnisStatusDefiningCode getLaboranalyteStatusDefiningCode(Observation case FINAL: return ErgebnisStatusDefiningCode.ENDBEFUND; case REGISTERED: - return ErgebnisStatusDefiningCode.ERFASST; + return ErgebnisStatusDefiningCode.REGISTRIERT; case AMENDED: - return ErgebnisStatusDefiningCode.ENDBEFUND_GEAENDERT; + return ErgebnisStatusDefiningCode.GEAENDERT; case CORRECTED: - return ErgebnisStatusDefiningCode.ENDBEFUND_KORRIGIERT; + return ErgebnisStatusDefiningCode.KORRIGIERT; case CANCELLED: return ErgebnisStatusDefiningCode.ENDBEFUND_WIDERRUFEN; case NULL: diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/GECCOLaborbefundComposition.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/GECCOLaborbefundComposition.java index 894955e94..b29717caf 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/GECCOLaborbefundComposition.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/GECCOLaborbefundComposition.java @@ -29,7 +29,7 @@ @Archetype("openEHR-EHR-COMPOSITION.registereintrag.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.161008+02:00", + date = "2021-07-05T14:12:01.164754+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @Template("GECCO_Laborbefund") diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/UntersuchterAnalytDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/BezeichnungDesAnalytsDefiningCode.java similarity index 95% rename from src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/UntersuchterAnalytDefiningCode.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/BezeichnungDesAnalytsDefiningCode.java index 1f6cac3c4..7105f4846 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/UntersuchterAnalytDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/BezeichnungDesAnalytsDefiningCode.java @@ -6,7 +6,7 @@ import org.ehrbase.client.classgenerator.EnumValueSet; -public enum UntersuchterAnalytDefiningCode implements EnumValueSet { +public enum BezeichnungDesAnalytsDefiningCode implements EnumValueSet { FERRITIN_MASS_VOLUME_IN_SERUM_OR_PLASMA_BY_IMMUNOASSAY("Ferritin [Mass/volume] in Serum or Plasma by Immunoassay", "", "LOINC", "20567-4"), LYMPHOCYTES_VOLUME_IN_BLOOD_BY_AUTOMATED_COUNT("Lymphocytes [#/volume] in Blood by Automated count", "", "LOINC", "731-0"), @@ -59,6 +59,8 @@ public enum UntersuchterAnalytDefiningCode implements EnumValueSet { INR_IN_PLATELET_POOR_PLASMA_BY_COAGULATION_ASSAY("INR in Platelet poor plasma by Coagulation assay", "", "LOINC", "6301-6"), + ANTITHROMBIN_ACTUAL_NORMAL_IN_PLATELET_POOR_PLASMA_BY_CHROMOGENIC_METHOD("Antithrombin actual/normal in Platelet poor plasma by Chromogenic method", "", "LOINC", "27811-9"), + APTT_IN_PLATELET_POOR_PLASMA_BY_COAGULATION_ASSAY("aPTT in Platelet poor plasma by Coagulation assay", "", "LOINC", "14979-9"), PROCALCITONIN_MASS_VOLUME_IN_SERUM_OR_PLASMA_BY_IMMUNOASSAY("Procalcitonin [Mass/volume] in Serum or Plasma by Immunoassay", "", "LOINC", "75241-0"), @@ -259,20 +261,20 @@ public enum UntersuchterAnalytDefiningCode implements EnumValueSet { private String code; - UntersuchterAnalytDefiningCode(String value, String description, String terminologyId, + BezeichnungDesAnalytsDefiningCode(String value, String description, String terminologyId, String code) { this.value = value; this.description = description; this.terminologyId = terminologyId; this.code = code; } - - public static Map<String, UntersuchterAnalytDefiningCode> getCodesAsMap(){ - Map<String, UntersuchterAnalytDefiningCode> untersuchterAnalytDefiningCodeHashMap = new HashMap<>(); - for (UntersuchterAnalytDefiningCode untersuchterAnalytDefiningCode : UntersuchterAnalytDefiningCode.values()) { - untersuchterAnalytDefiningCodeHashMap.put(untersuchterAnalytDefiningCode.getCode(), untersuchterAnalytDefiningCode); + + public static Map<String, BezeichnungDesAnalytsDefiningCode> getCodesAsMap(){ + Map<String, BezeichnungDesAnalytsDefiningCode> bezeichnungDesAnalytsDefiningCodeHashMap = new HashMap<>(); + for (BezeichnungDesAnalytsDefiningCode bezeichnungDesAnalytsDefiningCode : BezeichnungDesAnalytsDefiningCode.values()) { + bezeichnungDesAnalytsDefiningCodeHashMap.put(bezeichnungDesAnalytsDefiningCode.getCode(), bezeichnungDesAnalytsDefiningCode); } - return untersuchterAnalytDefiningCodeHashMap; + return bezeichnungDesAnalytsDefiningCodeHashMap; } public String getValue() { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ErgebnisStatusDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ErgebnisStatusDefiningCode.java index 5418c569b..946f0baa0 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ErgebnisStatusDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ErgebnisStatusDefiningCode.java @@ -6,17 +6,17 @@ public enum ErgebnisStatusDefiningCode implements EnumValueSet { ENDBEFUND("Endbefund", "Das Analyseergebnis ist vollständig und durch eine autorisierte Person verifiziert.", "local", "at0018"), - ERFASST("Erfasst", "Der Test ist im Laborinformationssystem erfasst, aber noch kein Ergebnis verfügbar.", "local", "at0015"), + REGISTRIERT("Registriert", "Der Test ist im Laborinformationssystem registriert, aber noch kein Ergebnis verfügbar.", "local", "at0015"), - ENDBEFUND_ERGAENZT("Endbefund, ergänzt", "Nach Abschluss wurde der Bericht durch das Hinzufügen neuer Inhalte abgeändert. Die vorhandene Inhalte sind unverändert. Dies ist eine Unterkategorie von \"Endbefund, geändert\".", "local", "at0021"), + KORRIGIERT("Korrigiert", "Das Ergebnis wurde nach dem endgültigen Abschluss geändert und ist vollständig und wird von einer autorisierten Person überprüft. Dies ist eine Sub-Kategorie von \"Geändert\".", "local", "at0019"), - ENDBEFUND_KORRIGIERT("Endbefund, korrigiert", "Das Ergebnis wurde nach dem endgültigen Ergebnis korrigiert und vom zuständigen Laborwissenschaftler vervollständigt und verifiziert. Dies ist eine Unterkategorie von \"Endbefund, geändert\".", "local", "at0019"), + UNVOLLSTAENDIG("Unvollständig", "Das Testergebnis ist ein Anfangs- oder Interimswert: Daten im Testergebnis können unvollständig oder nicht verifiziert/validiert sein.", "local", "at0016"), - ENDBEFUND_GEAENDERT("Endbefund, geändert", "Das Ergebnis wurde nach dem endgültigen Ergebnis geändert und vom zuständigen Laborwissenschaftler vervollständigt und verifiziert. Die Ergebnisdaten wurden geändert.", "local", "at0020"), + GEAENDERT("Geändert", "Das Ergebnis wurde nach dem endgültigen Abschluss geändert und ist vollständig und von einer autorisierten Person überprüft. Die Ergebnisdaten wurden geändert.", "local", "at0020"), - STORNIERT("Storniert", "Das Testergebnis ist nicht verfügbar, weil der Test nicht (vollständig) durchgeführt oder abgebrochen wurde.", "local", "at0023"), + ERGAENZT("Ergänzt", "Nach Abschluss wurde der Bericht durch das Hinzufügen neuer Inhalte abgeändert. Die vorhandene Inhalte sind unverändert. Dies ist eine Sub-Kategorie von \"Geändert\".", "local", "at0021"), - UNVOLLSTAENDIG("Unvollständig", "Das Testresultat ist ein Anfangs- oder Interimswert, vorläufig oder nicht verifiziert/validiert.", "local", "at0016"), + STORNIERT("Storniert", "Das Testergebnis ist nicht verfügbar, weil der Test nicht gestartet oder nicht abgeschlossen wurde (manchmal auch als \"abgebrochen\" bezeichnet).", "local", "at0023"), VORLAEUFIG("Vorläufig", "Erste, verifizierte Resultate sind vorhanden, der Test ist aber noch nicht abgeschlossen (Sub-Kategorie von 'Unvollständig').", "local", "at0017"), diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/InterpretationDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/InterpretationDefiningCode.java index b53f9370a..62f0ffc81 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/InterpretationDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/InterpretationDefiningCode.java @@ -45,6 +45,7 @@ public static Map<String, InterpretationDefiningCode> getCodesAsMap(){ } + public String getValue() { return this.value ; } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborbefundKategorieElement.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborbefundKategorieElement.java index 389c0a07e..a1a2d6478 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborbefundKategorieElement.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborbefundKategorieElement.java @@ -11,7 +11,7 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.186090+02:00", + date = "2021-07-05T14:12:01.191829+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class LaborbefundKategorieElement implements LocatableEntity { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungChoice.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungChoice.java index 59212f745..ad3e5a1a3 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungChoice.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungChoice.java @@ -4,7 +4,7 @@ @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.311709+02:00", + date = "2021-07-05T14:12:01.356895+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public interface LaborergebnisIdentifikationDerLaboranforderungChoice { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungDvIdentifier.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungDvIdentifier.java index 98e98f189..a6882b23c 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungDvIdentifier.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungDvIdentifier.java @@ -10,7 +10,7 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.310442+02:00", + date = "2021-07-05T14:12:01.355716+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @OptionFor("DV_IDENTIFIER") diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungDvText.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungDvText.java index 61fb0ca64..4ad4f7774 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungDvText.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisIdentifikationDerLaboranforderungDvText.java @@ -10,7 +10,7 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.311129+02:00", + date = "2021-07-05T14:12:01.356341+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @OptionFor("DV_TEXT") diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisObservation.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisObservation.java index 7e2c9bf02..b88691e97 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisObservation.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisObservation.java @@ -19,7 +19,7 @@ @Archetype("openEHR-EHR-OBSERVATION.laboratory_test_result.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.203209+02:00", + date = "2021-07-05T14:12:01.211666+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class LaborergebnisObservation implements EntryEntity { @@ -49,7 +49,6 @@ public class LaborergebnisObservation implements EntryEntity { /** * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt * Description: Ergebnis einer Laboranalyse für einen bestimmten Analytwert. - * Comment: Beispiele: "Natrium", "Leukozytenzahl", "T3". Üblicherweise über eine externe Terminologie codiert. */ @Path("/data[at0001]/events[at0002]/data[at0003]/items[openEHR-EHR-CLUSTER.laboratory_test_analyte.v1 and name/value='Pro Laboranalyt']") private ProLaboranalytCluster proLaboranalyt; @@ -183,6 +182,14 @@ public class LaborergebnisObservation implements EntryEntity { @Choice private LaborergebnisIdentifikationDerLaboranforderungChoice identifikationDerLaboranforderung; + /** + * Path: Laborbefund/Laborergebnis/Testmethode + * Description: Die Beschreibung der Methode, mit dem der Test durchgeführt wurde. + */ + @Path("/protocol[at0004]/items[at0121]/value") + @Choice + private LaborergebnisTestmethodeChoice testmethode; + public void setLabortestKategorieDefiningCode( LabortestKategorieDefiningCode labortestKategorieDefiningCode) { this.labortestKategorieDefiningCode = labortestKategorieDefiningCode; @@ -367,4 +374,12 @@ public LaborergebnisIdentifikationDerLaboranforderungChoice getIdentifikationDer ) { return this.identifikationDerLaboranforderung ; } + + public void setTestmethode(LaborergebnisTestmethodeChoice testmethode) { + this.testmethode = testmethode; + } + + public LaborergebnisTestmethodeChoice getTestmethode() { + return this.testmethode ; + } } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisObservationContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisObservationContainment.java index 2b2c01a50..c44d833dc 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisObservationContainment.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisObservationContainment.java @@ -60,6 +60,8 @@ public class LaborergebnisObservationContainment extends Containment { public SelectAqlField<LaborergebnisIdentifikationDerLaboranforderungChoice> IDENTIFIKATION_DER_LABORANFORDERUNG = new AqlFieldImp<LaborergebnisIdentifikationDerLaboranforderungChoice>(LaborergebnisObservation.class, "/protocol[at0004]/items[at0094]/items[at0062]/value", "identifikationDerLaboranforderung", LaborergebnisIdentifikationDerLaboranforderungChoice.class, this); + public SelectAqlField<LaborergebnisTestmethodeChoice> TESTMETHODE = new AqlFieldImp<LaborergebnisTestmethodeChoice>(LaborergebnisObservation.class, "/protocol[at0004]/items[at0121]/value", "testmethode", LaborergebnisTestmethodeChoice.class, this); + private LaborergebnisObservationContainment() { super("openEHR-EHR-OBSERVATION.laboratory_test_result.v1"); } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeChoice.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeChoice.java new file mode 100644 index 000000000..32dbf4653 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeChoice.java @@ -0,0 +1,11 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import javax.annotation.processing.Generated; + +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.365092+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +public interface LaborergebnisTestmethodeChoice { +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvBoolean.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvBoolean.java new file mode 100644 index 000000000..96c44ce9b --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvBoolean.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import java.lang.Boolean; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.360881+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_BOOLEAN") +public class LaborergebnisTestmethodeDvBoolean implements RMEntity, LaborergebnisTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit dem der Test durchgeführt wurde. + */ + @Path("|value") + private Boolean testmethodeValue; + + public void setTestmethodeValue(Boolean testmethodeValue) { + this.testmethodeValue = testmethodeValue; + } + + public Boolean isTestmethodeValue() { + return this.testmethodeValue ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvCodedText.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvCodedText.java new file mode 100644 index 000000000..332c68ebe --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvCodedText.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import com.nedap.archie.rm.datavalues.DvCodedText; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.359400+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_CODED_TEXT") +public class LaborergebnisTestmethodeDvCodedText implements RMEntity, LaborergebnisTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit dem der Test durchgeführt wurde. + */ + @Path("") + private DvCodedText testmethode; + + public void setTestmethode(DvCodedText testmethode) { + this.testmethode = testmethode; + } + + public DvCodedText getTestmethode() { + return this.testmethode ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvCount.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvCount.java new file mode 100644 index 000000000..24c3d1871 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvCount.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import java.lang.Long; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.363030+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_COUNT") +public class LaborergebnisTestmethodeDvCount implements RMEntity, LaborergebnisTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit dem der Test durchgeführt wurde. + */ + @Path("|magnitude") + private Long testmethodeMagnitude; + + public void setTestmethodeMagnitude(Long testmethodeMagnitude) { + this.testmethodeMagnitude = testmethodeMagnitude; + } + + public Long getTestmethodeMagnitude() { + return this.testmethodeMagnitude ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvDate.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvDate.java new file mode 100644 index 000000000..60fbbb18b --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvDate.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import java.time.temporal.Temporal; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.364762+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_DATE") +public class LaborergebnisTestmethodeDvDate implements RMEntity, LaborergebnisTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit dem der Test durchgeführt wurde. + */ + @Path("|value") + private Temporal testmethodeValue; + + public void setTestmethodeValue(Temporal testmethodeValue) { + this.testmethodeValue = testmethodeValue; + } + + public Temporal getTestmethodeValue() { + return this.testmethodeValue ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvDateTime.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvDateTime.java new file mode 100644 index 000000000..39b1ec111 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvDateTime.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import java.time.temporal.TemporalAccessor; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.363729+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_DATE_TIME") +public class LaborergebnisTestmethodeDvDateTime implements RMEntity, LaborergebnisTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit dem der Test durchgeführt wurde. + */ + @Path("|value") + private TemporalAccessor testmethodeValue; + + public void setTestmethodeValue(TemporalAccessor testmethodeValue) { + this.testmethodeValue = testmethodeValue; + } + + public TemporalAccessor getTestmethodeValue() { + return this.testmethodeValue ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvDuration.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvDuration.java new file mode 100644 index 000000000..6b04b8821 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvDuration.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import java.time.temporal.TemporalAmount; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.362318+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_DURATION") +public class LaborergebnisTestmethodeDvDuration implements RMEntity, LaborergebnisTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit dem der Test durchgeführt wurde. + */ + @Path("|value") + private TemporalAmount testmethodeValue; + + public void setTestmethodeValue(TemporalAmount testmethodeValue) { + this.testmethodeValue = testmethodeValue; + } + + public TemporalAmount getTestmethodeValue() { + return this.testmethodeValue ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvEhrUri.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvEhrUri.java new file mode 100644 index 000000000..2b4e386e8 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvEhrUri.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import com.nedap.archie.rm.datavalues.DvEHRURI; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.361969+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_EHR_URI") +public class LaborergebnisTestmethodeDvEhrUri implements RMEntity, LaborergebnisTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit dem der Test durchgeführt wurde. + */ + @Path("") + private DvEHRURI testmethode; + + public void setTestmethode(DvEHRURI testmethode) { + this.testmethode = testmethode; + } + + public DvEHRURI getTestmethode() { + return this.testmethode ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvIdentifier.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvIdentifier.java new file mode 100644 index 000000000..30157b662 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvIdentifier.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import com.nedap.archie.rm.datavalues.DvIdentifier; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.361219+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_IDENTIFIER") +public class LaborergebnisTestmethodeDvIdentifier implements RMEntity, LaborergebnisTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit dem der Test durchgeführt wurde. + */ + @Path("") + private DvIdentifier testmethode; + + public void setTestmethode(DvIdentifier testmethode) { + this.testmethode = testmethode; + } + + public DvIdentifier getTestmethode() { + return this.testmethode ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvMultimedia.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvMultimedia.java new file mode 100644 index 000000000..dfe0cacde --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvMultimedia.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import com.nedap.archie.rm.datavalues.encapsulated.DvMultimedia; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.359869+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_MULTIMEDIA") +public class LaborergebnisTestmethodeDvMultimedia implements RMEntity, LaborergebnisTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit dem der Test durchgeführt wurde. + */ + @Path("") + private DvMultimedia testmethode; + + public void setTestmethode(DvMultimedia testmethode) { + this.testmethode = testmethode; + } + + public DvMultimedia getTestmethode() { + return this.testmethode ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvOrdinal.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvOrdinal.java new file mode 100644 index 000000000..18ffd22c0 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvOrdinal.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import com.nedap.archie.rm.datavalues.quantity.DvOrdinal; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.364415+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_ORDINAL") +public class LaborergebnisTestmethodeDvOrdinal implements RMEntity, LaborergebnisTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit dem der Test durchgeführt wurde. + */ + @Path("") + private DvOrdinal testmethode; + + public void setTestmethode(DvOrdinal testmethode) { + this.testmethode = testmethode; + } + + public DvOrdinal getTestmethode() { + return this.testmethode ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvParsable.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvParsable.java new file mode 100644 index 000000000..27173791d --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvParsable.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import com.nedap.archie.rm.datavalues.encapsulated.DvParsable; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.360194+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_PARSABLE") +public class LaborergebnisTestmethodeDvParsable implements RMEntity, LaborergebnisTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit dem der Test durchgeführt wurde. + */ + @Path("") + private DvParsable testmethode; + + public void setTestmethode(DvParsable testmethode) { + this.testmethode = testmethode; + } + + public DvParsable getTestmethode() { + return this.testmethode ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvProportion.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvProportion.java new file mode 100644 index 000000000..3d3726bf0 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvProportion.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import com.nedap.archie.rm.datavalues.quantity.DvProportion; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.363339+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_PROPORTION") +public class LaborergebnisTestmethodeDvProportion implements RMEntity, LaborergebnisTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit dem der Test durchgeführt wurde. + */ + @Path("") + private DvProportion testmethode; + + public void setTestmethode(DvProportion testmethode) { + this.testmethode = testmethode; + } + + public DvProportion getTestmethode() { + return this.testmethode ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvQuantity.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvQuantity.java new file mode 100644 index 000000000..931e6c919 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvQuantity.java @@ -0,0 +1,48 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import java.lang.Double; +import java.lang.String; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.362649+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_QUANTITY") +public class LaborergebnisTestmethodeDvQuantity implements RMEntity, LaborergebnisTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit dem der Test durchgeführt wurde. + */ + @Path("|magnitude") + private Double testmethodeMagnitude; + + /** + * Path: Laborbefund/Laborergebnis/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit dem der Test durchgeführt wurde. + */ + @Path("|units") + private String testmethodeUnits; + + public void setTestmethodeMagnitude(Double testmethodeMagnitude) { + this.testmethodeMagnitude = testmethodeMagnitude; + } + + public Double getTestmethodeMagnitude() { + return this.testmethodeMagnitude ; + } + + public void setTestmethodeUnits(String testmethodeUnits) { + this.testmethodeUnits = testmethodeUnits; + } + + public String getTestmethodeUnits() { + return this.testmethodeUnits ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvState.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvState.java new file mode 100644 index 000000000..c77539914 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvState.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import com.nedap.archie.rm.datavalues.DvState; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.360494+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_STATE") +public class LaborergebnisTestmethodeDvState implements RMEntity, LaborergebnisTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit dem der Test durchgeführt wurde. + */ + @Path("") + private DvState testmethode; + + public void setTestmethode(DvState testmethode) { + this.testmethode = testmethode; + } + + public DvState getTestmethode() { + return this.testmethode ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvText.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvText.java new file mode 100644 index 000000000..08c9437eb --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvText.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import java.lang.String; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.358577+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_TEXT") +public class LaborergebnisTestmethodeDvText implements RMEntity, LaborergebnisTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit dem der Test durchgeführt wurde. + */ + @Path("|value") + private String testmethodeValue; + + public void setTestmethodeValue(String testmethodeValue) { + this.testmethodeValue = testmethodeValue; + } + + public String getTestmethodeValue() { + return this.testmethodeValue ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvTime.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvTime.java new file mode 100644 index 000000000..75750ede6 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvTime.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import java.time.temporal.TemporalAccessor; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.364063+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_TIME") +public class LaborergebnisTestmethodeDvTime implements RMEntity, LaborergebnisTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit dem der Test durchgeführt wurde. + */ + @Path("|value") + private TemporalAccessor testmethodeValue; + + public void setTestmethodeValue(TemporalAccessor testmethodeValue) { + this.testmethodeValue = testmethodeValue; + } + + public TemporalAccessor getTestmethodeValue() { + return this.testmethodeValue ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvUri.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvUri.java new file mode 100644 index 000000000..ba64a47b3 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/LaborergebnisTestmethodeDvUri.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import java.net.URI; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.361582+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_URI") +public class LaborergebnisTestmethodeDvUri implements RMEntity, LaborergebnisTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit dem der Test durchgeführt wurde. + */ + @Path("|value") + private URI testmethodeValue; + + public void setTestmethodeValue(URI testmethodeValue) { + this.testmethodeValue = testmethodeValue; + } + + public URI getTestmethodeValue() { + return this.testmethodeValue ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytCluster.java index 6461def95..c8b209c99 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytCluster.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytCluster.java @@ -16,24 +16,24 @@ @Archetype("openEHR-EHR-CLUSTER.laboratory_test_analyte.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.258914+02:00", + date = "2021-07-05T14:12:01.286221+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class ProLaboranalytCluster implements LocatableEntity { /** - * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Untersuchter Analyt + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Bezeichnung des Analyts * Description: Der Name des untersuchten Analyts. * Comment: Der Wert dieses Elements wird normalerweise, meist durch eine Spezialisierung, in einem Template oder zur Laufzeit der Anwendung geliefert, um den aktuellen Analyt wiederzugeben. Zum Beispiel: 'Natrium im Serum', 'Hämoglobin'. * Die Codierung mit einer externen Terminologie, wie LOINC, NPU, SNOMED-CT oder lokalen Labor-Terminologien wird dringend empfohlen. */ @Path("/items[at0024]/value|defining_code") - private UntersuchterAnalytDefiningCode untersuchterAnalytDefiningCode; + private BezeichnungDesAnalytsDefiningCode bezeichnungDesAnalytsDefiningCode; /** - * Path: Laborbefund/Laborergebnis/Event Series/Jedes Ereignis/Tree/Pro Laboranalyt/Untersuchter Analyt/null_flavour + * Path: Laborbefund/Laborergebnis/Event Series/Jedes Ereignis/Tree/Pro Laboranalyt/Bezeichnung des Analyts/null_flavour */ @Path("/items[at0024]/null_flavour|defining_code") - private NullFlavour untersuchterAnalytNullFlavourDefiningCode; + private NullFlavour bezeichnungDesAnalytsNullFlavourDefiningCode; /** * Path: Laborbefund/Laborergebnis/Event Series/Jedes Ereignis/Tree/Pro Laboranalyt/Messwert/null_flavour @@ -42,15 +42,15 @@ public class ProLaboranalytCluster implements LocatableEntity { private NullFlavour messwertNullFlavourDefiningCode; /** - * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Analyseergebnis-Details + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Analyseergebnis-Detail * Description: Weitere Details zu einem einzelnen Ergebnis. */ @Path("/items[at0014]") - private List<Cluster> analyseergebnisDetails; + private List<Cluster> analyseergebnisDetail; /** * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Interpretation - * Description: Zusätzliche Hinweise zur Anwendbarkeit des Referenzbereichs für dieses Resultat oder (codierter) Text, ob das Resultat im Referenzbereich ist oder nicht. + * Description: Zusätzliche Hinweise zur Anwendbarkeit des Referenzbereichs für dieses Resultat oder (codierter) Text, ob das Ergebnis im Referenzbereich ist oder nicht. * Comment: z.B.: 'im Referenzbereich, bezogen auf Alter und Geschlecht'. */ @Path("/items[at0004 and name/value='Interpretation']/value|defining_code") @@ -70,8 +70,8 @@ public class ProLaboranalytCluster implements LocatableEntity { /** * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Zeitpunkt der Validierung - * Description: Datum und Zeit, an dem das Analyseergebnis im Labor medizinisch validiert wurde. - * Comment: In vielen Gerichtsbarkeiten wird angenommen, dass der 'Ergebnisstatus' die medizinische Validierung einschliesst, in anderen wird diese anhand dieses Datenelements separat erfasst und befundet. + * Description: Datum und Uhrzeit der Validierung des Analyt-Ergebnisses im Labor durch einen Arzt. + * Comment: In vielen Gerichtsbarkeiten wird angenommen, dass der "Ergebnis-Status" die medizinische Validierung einschliesst, in anderen wird diese anhand dieses Datenelements separat erfasst und befundet. */ @Path("/items[at0025]/value|value") private TemporalAccessor zeitpunktDerValidierungValue; @@ -120,6 +120,14 @@ public class ProLaboranalytCluster implements LocatableEntity { @Path("/feeder_audit") private FeederAudit feederAudit; + /** + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Testmethode + * Description: Die Beschreibung der Methode, mit der der Test nur für diesen Analyten durchgeführt wurde. + */ + @Path("/items[at0028]/value") + @Choice + private ProLaboranalytTestmethodeChoice testmethode; + /** * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Probe ID * Description: Kennung der Probe, die für das Analyseergebnis verwendet wurde. @@ -130,7 +138,7 @@ public class ProLaboranalytCluster implements LocatableEntity { /** * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Ergebnis-Status - * Description: Status des Analyseergebnisses. + * Description: Status des Analyt-Ergebniswertes. */ @Path("/items[at0005]/value") @Choice @@ -138,28 +146,28 @@ public class ProLaboranalytCluster implements LocatableEntity { /** * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Messwert - * Description: (Mess-)Wert des Analyt-Resultats. + * Description: (Mess-)Wert des Analyt-Ergebnisses. */ @Path("/items[at0001 and name/value='Messwert']/value") @Choice private ProLaboranalytMesswertChoice messwert; - public void setUntersuchterAnalytDefiningCode( - UntersuchterAnalytDefiningCode untersuchterAnalytDefiningCode) { - this.untersuchterAnalytDefiningCode = untersuchterAnalytDefiningCode; + public void setBezeichnungDesAnalytsDefiningCode( + BezeichnungDesAnalytsDefiningCode bezeichnungDesAnalytsDefiningCode) { + this.bezeichnungDesAnalytsDefiningCode = bezeichnungDesAnalytsDefiningCode; } - public UntersuchterAnalytDefiningCode getUntersuchterAnalytDefiningCode() { - return this.untersuchterAnalytDefiningCode ; + public BezeichnungDesAnalytsDefiningCode getBezeichnungDesAnalytsDefiningCode() { + return this.bezeichnungDesAnalytsDefiningCode ; } - public void setUntersuchterAnalytNullFlavourDefiningCode( - NullFlavour untersuchterAnalytNullFlavourDefiningCode) { - this.untersuchterAnalytNullFlavourDefiningCode = untersuchterAnalytNullFlavourDefiningCode; + public void setBezeichnungDesAnalytsNullFlavourDefiningCode( + NullFlavour bezeichnungDesAnalytsNullFlavourDefiningCode) { + this.bezeichnungDesAnalytsNullFlavourDefiningCode = bezeichnungDesAnalytsNullFlavourDefiningCode; } - public NullFlavour getUntersuchterAnalytNullFlavourDefiningCode() { - return this.untersuchterAnalytNullFlavourDefiningCode ; + public NullFlavour getBezeichnungDesAnalytsNullFlavourDefiningCode() { + return this.bezeichnungDesAnalytsNullFlavourDefiningCode ; } public void setMesswertNullFlavourDefiningCode(NullFlavour messwertNullFlavourDefiningCode) { @@ -170,12 +178,12 @@ public NullFlavour getMesswertNullFlavourDefiningCode() { return this.messwertNullFlavourDefiningCode ; } - public void setAnalyseergebnisDetails(List<Cluster> analyseergebnisDetails) { - this.analyseergebnisDetails = analyseergebnisDetails; + public void setAnalyseergebnisDetail(List<Cluster> analyseergebnisDetail) { + this.analyseergebnisDetail = analyseergebnisDetail; } - public List<Cluster> getAnalyseergebnisDetails() { - return this.analyseergebnisDetails ; + public List<Cluster> getAnalyseergebnisDetail() { + return this.analyseergebnisDetail ; } public void setInterpretationDefiningCode(InterpretationDefiningCode interpretationDefiningCode) { @@ -271,6 +279,14 @@ public FeederAudit getFeederAudit() { return this.feederAudit ; } + public void setTestmethode(ProLaboranalytTestmethodeChoice testmethode) { + this.testmethode = testmethode; + } + + public ProLaboranalytTestmethodeChoice getTestmethode() { + return this.testmethode ; + } + public void setProbeId(ProLaboranalytProbeIdChoice probeId) { this.probeId = probeId; } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytClusterContainment.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytClusterContainment.java index 8d4d6e6ec..d07ca44cb 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytClusterContainment.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytClusterContainment.java @@ -13,13 +13,13 @@ public class ProLaboranalytClusterContainment extends Containment { public SelectAqlField<ProLaboranalytCluster> PRO_LABORANALYT_CLUSTER = new AqlFieldImp<ProLaboranalytCluster>(ProLaboranalytCluster.class, "", "ProLaboranalytCluster", ProLaboranalytCluster.class, this); - public SelectAqlField<UntersuchterAnalytDefiningCode> UNTERSUCHTER_ANALYT_DEFINING_CODE = new AqlFieldImp<UntersuchterAnalytDefiningCode>(ProLaboranalytCluster.class, "/items[at0024]/value|defining_code", "untersuchterAnalytDefiningCode", UntersuchterAnalytDefiningCode.class, this); + public SelectAqlField<BezeichnungDesAnalytsDefiningCode> BEZEICHNUNG_DES_ANALYTS_DEFINING_CODE = new AqlFieldImp<BezeichnungDesAnalytsDefiningCode>(ProLaboranalytCluster.class, "/items[at0024]/value|defining_code", "bezeichnungDesAnalytsDefiningCode", BezeichnungDesAnalytsDefiningCode.class, this); - public SelectAqlField<NullFlavour> UNTERSUCHTER_ANALYT_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ProLaboranalytCluster.class, "/items[at0024]/null_flavour|defining_code", "untersuchterAnalytNullFlavourDefiningCode", NullFlavour.class, this); + public SelectAqlField<NullFlavour> BEZEICHNUNG_DES_ANALYTS_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ProLaboranalytCluster.class, "/items[at0024]/null_flavour|defining_code", "bezeichnungDesAnalytsNullFlavourDefiningCode", NullFlavour.class, this); public SelectAqlField<NullFlavour> MESSWERT_NULL_FLAVOUR_DEFINING_CODE = new AqlFieldImp<NullFlavour>(ProLaboranalytCluster.class, "/items[at0001]/null_flavour|defining_code", "messwertNullFlavourDefiningCode", NullFlavour.class, this); - public ListSelectAqlField<Cluster> ANALYSEERGEBNIS_DETAILS = new ListAqlFieldImp<Cluster>(ProLaboranalytCluster.class, "/items[at0014]", "analyseergebnisDetails", Cluster.class, this); + public ListSelectAqlField<Cluster> ANALYSEERGEBNIS_DETAIL = new ListAqlFieldImp<Cluster>(ProLaboranalytCluster.class, "/items[at0014]", "analyseergebnisDetail", Cluster.class, this); public SelectAqlField<InterpretationDefiningCode> INTERPRETATION_DEFINING_CODE = new AqlFieldImp<InterpretationDefiningCode>(ProLaboranalytCluster.class, "/items[at0004]/value|defining_code", "interpretationDefiningCode", InterpretationDefiningCode.class, this); @@ -43,6 +43,8 @@ public class ProLaboranalytClusterContainment extends Containment { public SelectAqlField<FeederAudit> FEEDER_AUDIT = new AqlFieldImp<FeederAudit>(ProLaboranalytCluster.class, "/feeder_audit", "feederAudit", FeederAudit.class, this); + public SelectAqlField<ProLaboranalytTestmethodeChoice> TESTMETHODE = new AqlFieldImp<ProLaboranalytTestmethodeChoice>(ProLaboranalytCluster.class, "/items[at0028]/value", "testmethode", ProLaboranalytTestmethodeChoice.class, this); + public SelectAqlField<ProLaboranalytProbeIdChoice> PROBE_ID = new AqlFieldImp<ProLaboranalytProbeIdChoice>(ProLaboranalytCluster.class, "/items[at0026]/value", "probeId", ProLaboranalytProbeIdChoice.class, this); public SelectAqlField<ProLaboranalytErgebnisStatusChoice> ERGEBNIS_STATUS = new AqlFieldImp<ProLaboranalytErgebnisStatusChoice>(ProLaboranalytCluster.class, "/items[at0005]/value", "ergebnisStatus", ProLaboranalytErgebnisStatusChoice.class, this); diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusChoice.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusChoice.java index 0bcc3bd72..048e33774 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusChoice.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusChoice.java @@ -4,7 +4,7 @@ @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.293094+02:00", + date = "2021-07-05T14:12:01.339464+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public interface ProLaboranalytErgebnisStatusChoice { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusDvCodedText.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusDvCodedText.java index a51b48ab5..4d889e466 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusDvCodedText.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusDvCodedText.java @@ -9,14 +9,14 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.291110+02:00", + date = "2021-07-05T14:12:01.337115+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @OptionFor("DV_CODED_TEXT") public class ProLaboranalytErgebnisStatusDvCodedText implements RMEntity, ProLaboranalytErgebnisStatusChoice { /** * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Ergebnis-Status/Ergebnis-Status - * Description: Status des Analyseergebnisses. + * Description: Status des Analyt-Ergebniswertes. */ @Path("|defining_code") private ErgebnisStatusDefiningCode ergebnisStatusDefiningCode; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusDvText.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusDvText.java index 2e637dfe2..ce57c9b07 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusDvText.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytErgebnisStatusDvText.java @@ -10,14 +10,14 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.292526+02:00", + date = "2021-07-05T14:12:01.338851+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @OptionFor("DV_TEXT") public class ProLaboranalytErgebnisStatusDvText implements RMEntity, ProLaboranalytErgebnisStatusChoice { /** * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Ergebnis-Status/Ergebnis-Status - * Description: Status des Analyseergebnisses. + * Description: Status des Analyt-Ergebniswertes. */ @Path("|value") private String ergebnisStatusValue; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytKommentarElement.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytKommentarElement.java index 84883217b..02b9ece49 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytKommentarElement.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytKommentarElement.java @@ -11,7 +11,7 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.282972+02:00", + date = "2021-07-05T14:12:01.309377+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class ProLaboranalytKommentarElement implements LocatableEntity { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertChoice.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertChoice.java index dfb2747de..9e77153f9 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertChoice.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertChoice.java @@ -4,7 +4,7 @@ @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.296272+02:00", + date = "2021-07-05T14:12:01.343026+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public interface ProLaboranalytMesswertChoice { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertDvQuantity.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertDvQuantity.java index 079a91e4c..6aa7bb862 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertDvQuantity.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertDvQuantity.java @@ -11,21 +11,21 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.295838+02:00", + date = "2021-07-05T14:12:01.342241+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @OptionFor("DV_QUANTITY") public class ProLaboranalytMesswertDvQuantity implements RMEntity, ProLaboranalytMesswertChoice { /** * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Messwert/Messwert - * Description: (Mess-)Wert des Analyt-Resultats. + * Description: (Mess-)Wert des Analyt-Ergebnisses. */ @Path("|magnitude") private Double messwertMagnitude; /** * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Messwert/Messwert - * Description: (Mess-)Wert des Analyt-Resultats. + * Description: (Mess-)Wert des Analyt-Ergebnisses. */ @Path("|units") private String messwertUnits; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertDvText.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertDvText.java index 110fb887a..160b62f21 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertDvText.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytMesswertDvText.java @@ -10,14 +10,14 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.295123+02:00", + date = "2021-07-05T14:12:01.341290+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @OptionFor("DV_TEXT") public class ProLaboranalytMesswertDvText implements RMEntity, ProLaboranalytMesswertChoice { /** * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Messwert/Messwert - * Description: (Mess-)Wert des Analyt-Resultats. + * Description: (Mess-)Wert des Analyt-Ergebnisses. */ @Path("|value") private String messwertValue; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdChoice.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdChoice.java index 1e21c2c58..3f72cf6f2 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdChoice.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdChoice.java @@ -4,7 +4,7 @@ @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.288837+02:00", + date = "2021-07-05T14:12:01.335222+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public interface ProLaboranalytProbeIdChoice { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdDvIdentifier.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdDvIdentifier.java index 5252511c3..eef2df92a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdDvIdentifier.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdDvIdentifier.java @@ -10,7 +10,7 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.287434+02:00", + date = "2021-07-05T14:12:01.333978+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @OptionFor("DV_IDENTIFIER") diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdDvUri.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdDvUri.java index d9aee9f4d..bb0912bbc 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdDvUri.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytProbeIdDvUri.java @@ -10,7 +10,7 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.288164+02:00", + date = "2021-07-05T14:12:01.334660+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @OptionFor("DV_URI") diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeChoice.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeChoice.java new file mode 100644 index 000000000..848147ac3 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeChoice.java @@ -0,0 +1,11 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import javax.annotation.processing.Generated; + +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.329922+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +public interface ProLaboranalytTestmethodeChoice { +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvBoolean.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvBoolean.java new file mode 100644 index 000000000..d438901f0 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvBoolean.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import java.lang.Boolean; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.322991+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_BOOLEAN") +public class ProLaboranalytTestmethodeDvBoolean implements RMEntity, ProLaboranalytTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit der der Test nur für diesen Analyten durchgeführt wurde. + */ + @Path("|value") + private Boolean testmethodeValue; + + public void setTestmethodeValue(Boolean testmethodeValue) { + this.testmethodeValue = testmethodeValue; + } + + public Boolean isTestmethodeValue() { + return this.testmethodeValue ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvCodedText.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvCodedText.java new file mode 100644 index 000000000..cceac26c2 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvCodedText.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import com.nedap.archie.rm.datavalues.DvCodedText; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.314101+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_CODED_TEXT") +public class ProLaboranalytTestmethodeDvCodedText implements RMEntity, ProLaboranalytTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit der der Test nur für diesen Analyten durchgeführt wurde. + */ + @Path("") + private DvCodedText testmethode; + + public void setTestmethode(DvCodedText testmethode) { + this.testmethode = testmethode; + } + + public DvCodedText getTestmethode() { + return this.testmethode ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvCount.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvCount.java new file mode 100644 index 000000000..4ca5235e5 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvCount.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import java.lang.Long; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.326781+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_COUNT") +public class ProLaboranalytTestmethodeDvCount implements RMEntity, ProLaboranalytTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit der der Test nur für diesen Analyten durchgeführt wurde. + */ + @Path("|magnitude") + private Long testmethodeMagnitude; + + public void setTestmethodeMagnitude(Long testmethodeMagnitude) { + this.testmethodeMagnitude = testmethodeMagnitude; + } + + public Long getTestmethodeMagnitude() { + return this.testmethodeMagnitude ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvDate.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvDate.java new file mode 100644 index 000000000..89508ec82 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvDate.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import java.time.temporal.Temporal; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.329401+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_DATE") +public class ProLaboranalytTestmethodeDvDate implements RMEntity, ProLaboranalytTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit der der Test nur für diesen Analyten durchgeführt wurde. + */ + @Path("|value") + private Temporal testmethodeValue; + + public void setTestmethodeValue(Temporal testmethodeValue) { + this.testmethodeValue = testmethodeValue; + } + + public Temporal getTestmethodeValue() { + return this.testmethodeValue ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvDateTime.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvDateTime.java new file mode 100644 index 000000000..52395d2e8 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvDateTime.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import java.time.temporal.TemporalAccessor; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.327663+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_DATE_TIME") +public class ProLaboranalytTestmethodeDvDateTime implements RMEntity, ProLaboranalytTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit der der Test nur für diesen Analyten durchgeführt wurde. + */ + @Path("|value") + private TemporalAccessor testmethodeValue; + + public void setTestmethodeValue(TemporalAccessor testmethodeValue) { + this.testmethodeValue = testmethodeValue; + } + + public TemporalAccessor getTestmethodeValue() { + return this.testmethodeValue ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvDuration.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvDuration.java new file mode 100644 index 000000000..8abf76652 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvDuration.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import java.time.temporal.TemporalAmount; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.325783+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_DURATION") +public class ProLaboranalytTestmethodeDvDuration implements RMEntity, ProLaboranalytTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit der der Test nur für diesen Analyten durchgeführt wurde. + */ + @Path("|value") + private TemporalAmount testmethodeValue; + + public void setTestmethodeValue(TemporalAmount testmethodeValue) { + this.testmethodeValue = testmethodeValue; + } + + public TemporalAmount getTestmethodeValue() { + return this.testmethodeValue ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvEhrUri.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvEhrUri.java new file mode 100644 index 000000000..d4da0b38c --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvEhrUri.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import com.nedap.archie.rm.datavalues.DvEHRURI; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.325154+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_EHR_URI") +public class ProLaboranalytTestmethodeDvEhrUri implements RMEntity, ProLaboranalytTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit der der Test nur für diesen Analyten durchgeführt wurde. + */ + @Path("") + private DvEHRURI testmethode; + + public void setTestmethode(DvEHRURI testmethode) { + this.testmethode = testmethode; + } + + public DvEHRURI getTestmethode() { + return this.testmethode ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvIdentifier.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvIdentifier.java new file mode 100644 index 000000000..2fcd471a0 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvIdentifier.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import com.nedap.archie.rm.datavalues.DvIdentifier; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.323514+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_IDENTIFIER") +public class ProLaboranalytTestmethodeDvIdentifier implements RMEntity, ProLaboranalytTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit der der Test nur für diesen Analyten durchgeführt wurde. + */ + @Path("") + private DvIdentifier testmethode; + + public void setTestmethode(DvIdentifier testmethode) { + this.testmethode = testmethode; + } + + public DvIdentifier getTestmethode() { + return this.testmethode ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvMultimedia.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvMultimedia.java new file mode 100644 index 000000000..da0c71883 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvMultimedia.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import com.nedap.archie.rm.datavalues.encapsulated.DvMultimedia; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.321279+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_MULTIMEDIA") +public class ProLaboranalytTestmethodeDvMultimedia implements RMEntity, ProLaboranalytTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit der der Test nur für diesen Analyten durchgeführt wurde. + */ + @Path("") + private DvMultimedia testmethode; + + public void setTestmethode(DvMultimedia testmethode) { + this.testmethode = testmethode; + } + + public DvMultimedia getTestmethode() { + return this.testmethode ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvOrdinal.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvOrdinal.java new file mode 100644 index 000000000..beeb6c8dd --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvOrdinal.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import com.nedap.archie.rm.datavalues.quantity.DvOrdinal; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.328919+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_ORDINAL") +public class ProLaboranalytTestmethodeDvOrdinal implements RMEntity, ProLaboranalytTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit der der Test nur für diesen Analyten durchgeführt wurde. + */ + @Path("") + private DvOrdinal testmethode; + + public void setTestmethode(DvOrdinal testmethode) { + this.testmethode = testmethode; + } + + public DvOrdinal getTestmethode() { + return this.testmethode ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvParsable.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvParsable.java new file mode 100644 index 000000000..85db4daa8 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvParsable.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import com.nedap.archie.rm.datavalues.encapsulated.DvParsable; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.321996+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_PARSABLE") +public class ProLaboranalytTestmethodeDvParsable implements RMEntity, ProLaboranalytTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit der der Test nur für diesen Analyten durchgeführt wurde. + */ + @Path("") + private DvParsable testmethode; + + public void setTestmethode(DvParsable testmethode) { + this.testmethode = testmethode; + } + + public DvParsable getTestmethode() { + return this.testmethode ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvProportion.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvProportion.java new file mode 100644 index 000000000..ff18b3bb0 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvProportion.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import com.nedap.archie.rm.datavalues.quantity.DvProportion; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.327087+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_PROPORTION") +public class ProLaboranalytTestmethodeDvProportion implements RMEntity, ProLaboranalytTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit der der Test nur für diesen Analyten durchgeführt wurde. + */ + @Path("") + private DvProportion testmethode; + + public void setTestmethode(DvProportion testmethode) { + this.testmethode = testmethode; + } + + public DvProportion getTestmethode() { + return this.testmethode ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvQuantity.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvQuantity.java new file mode 100644 index 000000000..cc870faa8 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvQuantity.java @@ -0,0 +1,48 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import java.lang.Double; +import java.lang.String; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.326331+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_QUANTITY") +public class ProLaboranalytTestmethodeDvQuantity implements RMEntity, ProLaboranalytTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit der der Test nur für diesen Analyten durchgeführt wurde. + */ + @Path("|magnitude") + private Double testmethodeMagnitude; + + /** + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit der der Test nur für diesen Analyten durchgeführt wurde. + */ + @Path("|units") + private String testmethodeUnits; + + public void setTestmethodeMagnitude(Double testmethodeMagnitude) { + this.testmethodeMagnitude = testmethodeMagnitude; + } + + public Double getTestmethodeMagnitude() { + return this.testmethodeMagnitude ; + } + + public void setTestmethodeUnits(String testmethodeUnits) { + this.testmethodeUnits = testmethodeUnits; + } + + public String getTestmethodeUnits() { + return this.testmethodeUnits ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvState.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvState.java new file mode 100644 index 000000000..5fac335cc --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvState.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import com.nedap.archie.rm.datavalues.DvState; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.322496+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_STATE") +public class ProLaboranalytTestmethodeDvState implements RMEntity, ProLaboranalytTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit der der Test nur für diesen Analyten durchgeführt wurde. + */ + @Path("") + private DvState testmethode; + + public void setTestmethode(DvState testmethode) { + this.testmethode = testmethode; + } + + public DvState getTestmethode() { + return this.testmethode ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvText.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvText.java new file mode 100644 index 000000000..fe3e37fb7 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvText.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import java.lang.String; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.313400+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_TEXT") +public class ProLaboranalytTestmethodeDvText implements RMEntity, ProLaboranalytTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit der der Test nur für diesen Analyten durchgeführt wurde. + */ + @Path("|value") + private String testmethodeValue; + + public void setTestmethodeValue(String testmethodeValue) { + this.testmethodeValue = testmethodeValue; + } + + public String getTestmethodeValue() { + return this.testmethodeValue ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvTime.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvTime.java new file mode 100644 index 000000000..6ab715115 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvTime.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import java.time.temporal.TemporalAccessor; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.328232+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_TIME") +public class ProLaboranalytTestmethodeDvTime implements RMEntity, ProLaboranalytTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit der der Test nur für diesen Analyten durchgeführt wurde. + */ + @Path("|value") + private TemporalAccessor testmethodeValue; + + public void setTestmethodeValue(TemporalAccessor testmethodeValue) { + this.testmethodeValue = testmethodeValue; + } + + public TemporalAccessor getTestmethodeValue() { + return this.testmethodeValue ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvUri.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvUri.java new file mode 100644 index 000000000..d8a5d0060 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProLaboranalytTestmethodeDvUri.java @@ -0,0 +1,32 @@ +package org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition; + +import java.net.URI; +import javax.annotation.processing.Generated; +import org.ehrbase.client.annotations.Entity; +import org.ehrbase.client.annotations.OptionFor; +import org.ehrbase.client.annotations.Path; +import org.ehrbase.client.classgenerator.interfaces.RMEntity; + +@Entity +@Generated( + value = "org.ehrbase.client.classgenerator.ClassGenerator", + date = "2021-07-05T14:12:01.324163+02:00", + comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" +) +@OptionFor("DV_URI") +public class ProLaboranalytTestmethodeDvUri implements RMEntity, ProLaboranalytTestmethodeChoice { + /** + * Path: Laborbefund/Laborergebnis/Jedes Ereignis/Pro Laboranalyt/Testmethode/Testmethode + * Description: Die Beschreibung der Methode, mit der der Test nur für diesen Analyten durchgeführt wurde. + */ + @Path("|value") + private URI testmethodeValue; + + public void setTestmethodeValue(URI testmethodeValue) { + this.testmethodeValue = testmethodeValue; + } + + public URI getTestmethodeValue() { + return this.testmethodeValue ; + } +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeCluster.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeCluster.java index 7c724a8df..5f2bb6437 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeCluster.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeCluster.java @@ -20,7 +20,7 @@ @Archetype("openEHR-EHR-CLUSTER.specimen.v1") @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.212630+02:00", + date = "2021-07-05T14:12:01.221734+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class ProbeCluster implements LocatableEntity { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenChoice.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenChoice.java index ea6330928..b68f21fe6 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenChoice.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenChoice.java @@ -4,7 +4,7 @@ @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.243968+02:00", + date = "2021-07-05T14:12:01.262243+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public interface ProbeEignungZumTestenChoice { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenDvCodedText.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenDvCodedText.java index d7ad9ddf4..248f81be4 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenDvCodedText.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenDvCodedText.java @@ -9,7 +9,7 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.241731+02:00", + date = "2021-07-05T14:12:01.259242+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @OptionFor("DV_CODED_TEXT") diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenDvText.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenDvText.java index 38984f068..d36fd183e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenDvText.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeEignungZumTestenDvText.java @@ -10,7 +10,7 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.243161+02:00", + date = "2021-07-05T14:12:01.261143+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) @OptionFor("DV_TEXT") diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeIdentifikatorDerUebergeordnetenProbeElement.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeIdentifikatorDerUebergeordnetenProbeElement.java index 3f0e0e3d6..bc7d8f717 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeIdentifikatorDerUebergeordnetenProbeElement.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeIdentifikatorDerUebergeordnetenProbeElement.java @@ -11,7 +11,7 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.237589+02:00", + date = "2021-07-05T14:12:01.253232+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class ProbeIdentifikatorDerUebergeordnetenProbeElement implements LocatableEntity { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeProbenentahmebedingungElement.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeProbenentahmebedingungElement.java index 42fabe8f0..9949bf850 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeProbenentahmebedingungElement.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccolaborbefundcomposition/definition/ProbeProbenentahmebedingungElement.java @@ -11,7 +11,7 @@ @Entity @Generated( value = "org.ehrbase.client.classgenerator.ClassGenerator", - date = "2021-06-21T14:47:54.224617+02:00", + date = "2021-07-05T14:12:01.234233+02:00", comments = "https://github.com/ehrbase/openEHR_SDK Version: 1.4.0" ) public class ProbeProbenentahmebedingungElement implements LocatableEntity { diff --git a/src/main/resources/opt/GECCO_Laborbefund.opt b/src/main/resources/opt/GECCO_Laborbefund.opt index f5afa312d..9bf77241b 100644 --- a/src/main/resources/opt/GECCO_Laborbefund.opt +++ b/src/main/resources/opt/GECCO_Laborbefund.opt @@ -28,6 +28,8 @@ <other_details id="MD5-CAM-1.0.1">0b1d58a8f0bbe5f62006097d82307ddd</other_details> <other_details id="PARENT:MD5-CAM-1.0.1">8BD8D5F850A9DEE8A16075105D36FD32</other_details> <other_details id="original_language">ISO_639-1::de</other_details> + <other_details id="sem_ver">1.0.0</other_details> + <other_details id="build_uid"/> <other_details id="original_language">ISO_639-1::de</other_details> <details> <language> @@ -2021,6 +2023,7 @@ Ob dieses Element Bedingungen enthält, die während der Probenahme vorhanden se <code_list>3176-5</code_list> <code_list>91120-6</code_list> <code_list>3174-0</code_list> + <code_list>27811-9</code_list> <code_list>75241-0</code_list> <code_list>33959-8</code_list> <code_list>44322-6</code_list> @@ -2636,13 +2639,12 @@ Ob dieses Element Bedingungen enthält, die während der Probenahme vorhanden se <value>openEHR-EHR-CLUSTER.laboratory_test_analyte.v1</value> </archetype_id> <term_definitions code="at0000"> - <items id="comment">Beispiele: "Natrium", "Leukozytenzahl", "T3". Üblicherweise über eine externe Terminologie codiert.</items> <items id="description">Ergebnis einer Laboranalyse für einen bestimmten Analytwert.</items> <items id="text">Laboranalyt-Ergebnis</items> </term_definitions> <term_definitions code="at0001"> - <items id="comment">z.B. "7,3 mmol/l", "Erhöht". Der "Any"-Datentyp wird dann durch eine Spezialisierung, eine Vorlage oder zur Laufzeit der Anwendung auf einen passenden Datentyp eingeschränkt werden müssen, um das aktuelle Analyt-Ergebnis wiederzugeben. Der "Quantity"-Datentyp hat Referenzmodell-Attribute, wie Kennungen für normal/abnormal, Referenzbereiche und Näherungen - für weitere Details s. https://specifications.openehr.org/releases/RM/latest/data_types.html#_dv_quantity_class .</items> - <items id="description">(Mess-)Wert des Analyt-Resultats.</items> + <items id="comment">Z.B. "7,3 mmol/l", "Erhöht". Der "Any"-Datentyp wird dann durch eine Spezialisierung, eine Vorlage oder zur Laufzeit der Anwendung auf einen passenden Datentyp eingeschränkt werden müssen, um das aktuelle Analyt-Ergebnis wiederzugeben. Der "Quantity"-Datentyp hat Referenzmodell-Attribute, wie Kennungen für normal/abnormal, Referenzbereiche und Näherungen - für weitere Details s. https://specifications.openehr.org/releases/RM/latest/data_types.html#_dv_quantity_class .</items> + <items id="description">(Mess-)Wert des Analyt-Ergebnisses.</items> <items id="fhir_mapping">Observation.value[x]</items> <items id="hl7v2_mapping">OBX.2, OBX.5, OBX.6, OBX.7, OBX.8</items> <items id="text">Analyt-Ergebnis</items> @@ -2655,12 +2657,14 @@ Ob dieses Element Bedingungen enthält, die während der Probenahme vorhanden se </term_definitions> <term_definitions code="at0004"> <items id="comment">z.B.: 'im Referenzbereich, bezogen auf Alter und Geschlecht'.</items> - <items id="description">Zusätzliche Hinweise zur Anwendbarkeit des Referenzbereichs für dieses Resultat oder (codierter) Text, ob das Resultat im Referenzbereich ist oder nicht.</items> + <items id="description">Zusätzliche Hinweise zur Anwendbarkeit des Referenzbereichs für dieses Resultat oder (codierter) Text, ob das Ergebnis im Referenzbereich ist oder nicht.</items> <items id="text">Referenzbereichs-Hinweise</items> </term_definitions> <term_definitions code="at0005"> - <items id="comment">Die Werte wurden analog zum HL7 FHIR Diagnostic Report gewählt, die wiederum aus der HL7-Praxis stammen. Andere Codes/Ausdrücke können über den Text 'choice' verwendet werden.</items> - <items id="description">Status des Analyseergebnisses.</items> + <items id="comment">Die Werte wurden speziell so ausgewählt, dass sie mit denen im HL7 FHIR-Diagnosebericht übereinstimmen, der ursprünglich aus der HL7v2-Praxis abgeleitet wurde. Andere lokale Codes / Begriffe können über die Textauswahl verwendet werden. + +Dieses Element ermöglicht mehrere Vorkommen, um Anwendungsfälle zu unterstützen, wo mehr als eine Art von Status implementiert werden muss.</items> + <items id="description">Status des Analyt-Ergebniswertes.</items> <items id="fhir_mapping">Observation.status</items> <items id="hl7v2_mapping">OBX.11</items> <items id="text">Ergebnis-Status</items> @@ -2673,14 +2677,14 @@ Ob dieses Element Bedingungen enthält, die während der Probenahme vorhanden se </term_definitions> <term_definitions code="at0014"> <items id="description">Weitere Details zu einem einzelnen Ergebnis.</items> - <items id="text">Analyseergebnis-Details</items> + <items id="text">Analyseergebnis-Detail</items> </term_definitions> <term_definitions code="at0015"> - <items id="description">Der Test ist im Laborinformationssystem erfasst, aber noch kein Ergebnis verfügbar.</items> - <items id="text">Erfasst</items> + <items id="description">Der Test ist im Laborinformationssystem registriert, aber noch kein Ergebnis verfügbar.</items> + <items id="text">Registriert</items> </term_definitions> <term_definitions code="at0016"> - <items id="description">Das Testresultat ist ein Anfangs- oder Interimswert, vorläufig oder nicht verifiziert/validiert.</items> + <items id="description">Das Testergebnis ist ein Anfangs- oder Interimswert: Daten im Testergebnis können unvollständig oder nicht verifiziert/validiert sein.</items> <items id="text">Unvollständig</items> </term_definitions> <term_definitions code="at0017"> @@ -2692,23 +2696,23 @@ Ob dieses Element Bedingungen enthält, die während der Probenahme vorhanden se <items id="text">Endbefund</items> </term_definitions> <term_definitions code="at0019"> - <items id="description">Das Ergebnis wurde nach dem endgültigen Ergebnis korrigiert und vom zuständigen Laborwissenschaftler vervollständigt und verifiziert. Dies ist eine Unterkategorie von "Endbefund, geändert".</items> - <items id="text">Endbefund, korrigiert</items> + <items id="description">Das Ergebnis wurde nach dem endgültigen Abschluss geändert und ist vollständig und wird von einer autorisierten Person überprüft. Dies ist eine Sub-Kategorie von "Geändert".</items> + <items id="text">Korrigiert</items> </term_definitions> <term_definitions code="at0020"> - <items id="description">Das Ergebnis wurde nach dem endgültigen Ergebnis geändert und vom zuständigen Laborwissenschaftler vervollständigt und verifiziert. Die Ergebnisdaten wurden geändert.</items> - <items id="text">Endbefund, geändert</items> + <items id="description">Das Ergebnis wurde nach dem endgültigen Abschluss geändert und ist vollständig und von einer autorisierten Person überprüft. Die Ergebnisdaten wurden geändert.</items> + <items id="text">Geändert</items> </term_definitions> <term_definitions code="at0021"> - <items id="description">Nach Abschluss wurde der Bericht durch das Hinzufügen neuer Inhalte abgeändert. Die vorhandene Inhalte sind unverändert. Dies ist eine Unterkategorie von "Endbefund, geändert".</items> - <items id="text">Endbefund, ergänzt</items> + <items id="description">Nach Abschluss wurde der Bericht durch das Hinzufügen neuer Inhalte abgeändert. Die vorhandene Inhalte sind unverändert. Dies ist eine Sub-Kategorie von "Geändert".</items> + <items id="text">Ergänzt</items> </term_definitions> <term_definitions code="at0022"> <items id="description">Das Testergebnis wurde nach Endbefundung zurückgezogen.</items> <items id="text">Endbefund, widerrufen</items> </term_definitions> <term_definitions code="at0023"> - <items id="description">Das Testergebnis ist nicht verfügbar, weil der Test nicht (vollständig) durchgeführt oder abgebrochen wurde.</items> + <items id="description">Das Testergebnis ist nicht verfügbar, weil der Test nicht gestartet oder nicht abgeschlossen wurde (manchmal auch als "abgebrochen" bezeichnet).</items> <items id="text">Storniert</items> </term_definitions> <term_definitions code="at0024"> @@ -2717,11 +2721,11 @@ Die Codierung mit einer externen Terminologie, wie LOINC, NPU, SNOMED-CT oder lo <items id="description">Der Name des untersuchten Analyts.</items> <items id="fhir_mapping">Observation.code</items> <items id="hl7v2_mapping">OBX.3</items> - <items id="text">Untersuchter Analyt</items> + <items id="text">Bezeichnung des Analyts</items> </term_definitions> <term_definitions code="at0025"> - <items id="comment">In vielen Gerichtsbarkeiten wird angenommen, dass der 'Ergebnisstatus' die medizinische Validierung einschliesst, in anderen wird diese anhand dieses Datenelements separat erfasst und befundet.</items> - <items id="description">Datum und Zeit, an dem das Analyseergebnis im Labor medizinisch validiert wurde.</items> + <items id="comment">In vielen Gerichtsbarkeiten wird angenommen, dass der "Ergebnis-Status" die medizinische Validierung einschliesst, in anderen wird diese anhand dieses Datenelements separat erfasst und befundet.</items> + <items id="description">Datum und Uhrzeit der Validierung des Analyt-Ergebnisses im Labor durch einen Arzt.</items> <items id="text">Zeitpunkt der Validierung</items> </term_definitions> <term_definitions code="at0026"> @@ -3072,6 +3076,9 @@ Die Codierung mit einer externen Terminologie, wie LOINC, NPU, SNOMED-CT oder lo <term_definitions code="3174-0"> <items id="text">Antithrombin [Units/volume] in Platelet poor plasma by Chromogenic method</items> </term_definitions> + <term_definitions code="27811-9"> + <items id="text">Antithrombin actual/normal in Platelet poor plasma by Chromogenic method</items> + </term_definitions> <term_definitions code="75241-0"> <items id="text">Procalcitonin [Mass/volume] in Serum or Plasma by Immunoassay</items> </term_definitions> From df743600d8ce0330177e566f86d358de60a75c41 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Mon, 5 Jul 2021 15:13:33 +0200 Subject: [PATCH 123/141] Fix Bundle implementation --- pom.xml | 4 + .../processor/BundleResponseProcessor.java | 4 +- .../camel/processor/EhrIdLookupProcessor.java | 133 ------------------ .../camel/processor/EhrLookupProcessor.java | 7 +- .../ProvideResourcePersistenceProcessor.java | 106 -------------- .../ResourcePersistenceProcessor.java | 13 +- .../fhirbridge/camel/route/CommonRoutes.java | 29 ---- .../camel/route/DiagnosticReportRoutes.java | 43 ------ .../camel/route/ObservationRoutes.java | 44 ------ ...Builder.java => ResourceRouteBuilder.java} | 2 +- ...utes.java => TransactionRouteBuilder.java} | 43 ++---- .../config/camel/ProcessorConfiguration.java | 35 ----- .../converter/AntiBodyPanelConverter.java | 3 +- .../fhirbridge/fhir/bundle/BloodGasIT.java | 5 +- .../resources/Bundle/create-blood-gas.json | 2 +- 15 files changed, 40 insertions(+), 433 deletions(-) delete mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrIdLookupProcessor.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourcePersistenceProcessor.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java delete mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java rename src/main/java/org/ehrbase/fhirbridge/camel/route/{FhirRouteBuilder.java => ResourceRouteBuilder.java} (99%) rename src/main/java/org/ehrbase/fhirbridge/camel/route/{BundleRoutes.java => TransactionRouteBuilder.java} (65%) delete mode 100644 src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java diff --git a/pom.xml b/pom.xml index 15ec944ff..321e0ddc3 100644 --- a/pom.xml +++ b/pom.xml @@ -288,6 +288,10 @@ <groupId>com.h2database</groupId> <artifactId>h2</artifactId> </dependency> + <dependency> + <groupId>com.fasterxml.jackson.module</groupId> + <artifactId>jackson-module-kotlin</artifactId> + </dependency> <!-- Test Dependencies--> <dependency> <groupId>org.junit.jupiter</groupId> diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/BundleResponseProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/BundleResponseProcessor.java index 32faeb516..84774662d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/BundleResponseProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/BundleResponseProcessor.java @@ -28,9 +28,11 @@ * * @since 1.0.0 */ -@Component +@Component(BundleResponseProcessor.BEAN_ID) public class BundleResponseProcessor implements Processor { + public static final String BEAN_ID = "bundleResponseProcessor"; + @Override public void process(Exchange exchange) throws Exception { MethodOutcome methodOutcome = exchange.getIn().getMandatoryBody(MethodOutcome.class); diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrIdLookupProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrIdLookupProcessor.java deleted file mode 100644 index 47dbc2acb..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrIdLookupProcessor.java +++ /dev/null @@ -1,133 +0,0 @@ -package org.ehrbase.fhirbridge.camel.processor; - -import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; -import com.nedap.archie.rm.datavalues.DvText; -import com.nedap.archie.rm.ehr.EhrStatus; -import com.nedap.archie.rm.generic.PartySelf; -import com.nedap.archie.rm.support.identification.GenericId; -import com.nedap.archie.rm.support.identification.PartyRef; -import org.apache.camel.Exchange; -import org.apache.camel.Processor; -import org.ehrbase.client.aql.parameter.ParameterValue; -import org.ehrbase.client.aql.query.Query; -import org.ehrbase.client.aql.record.Record1; -import org.ehrbase.client.openehrclient.OpenEhrClient; -import org.ehrbase.fhirbridge.camel.component.ehr.composition.CompositionConstants; -import org.ehrbase.fhirbridge.core.domain.PatientId; -import org.ehrbase.fhirbridge.core.repository.PatientIdRepository; -import org.ehrbase.fhirbridge.fhir.support.Resources; -import org.hl7.fhir.r4.model.Identifier; -import org.hl7.fhir.r4.model.Patient; -import org.hl7.fhir.r4.model.Reference; -import org.hl7.fhir.r4.model.Resource; -import org.springframework.context.MessageSource; -import org.springframework.context.MessageSourceAware; -import org.springframework.context.support.MessageSourceAccessor; -import org.springframework.lang.NonNull; -import org.springframework.stereotype.Component; - -import java.util.List; -import java.util.Optional; -import java.util.UUID; - -/** - * {@link Processor} that lookups for the EhrId corresponding to the subject identifier provided in the resource. - */ -@Component -@SuppressWarnings("java:S6212") -public class EhrIdLookupProcessor implements Processor, MessageSourceAware { - - private final OpenEhrClient openEhrClient; - - private final PatientIdRepository patientIdRepository; - - private MessageSourceAccessor messages; - - public EhrIdLookupProcessor(OpenEhrClient openEhrClient, PatientIdRepository patientIdRepository) { - this.openEhrClient = openEhrClient; - this.patientIdRepository = patientIdRepository; - } - - @Override - public void process(Exchange exchange) throws Exception { - Resource resource = exchange.getIn().getMandatoryBody(Resource.class); - - Identifier identifier; - if (Resources.isPatient(resource)) { - identifier = handlePatientIdentifier((Patient) resource); - } else if (Resources.isCovid19Questionnaire(resource)) { - identifier = generateRandomIdentifier(); - } else { - identifier = handleOtherResourceIdentifier(resource); - } - - if (!isValidIdentifier(identifier)) { - throw new UnprocessableEntityException(messages.getMessage("validation.subject.identifierRequired")); - } - - UUID ehrId = findEhrId(identifier) - .orElseGet(() -> createEhr(identifier)); - - exchange.getIn().setHeader(CompositionConstants.EHR_ID, ehrId); - } - - private Identifier handlePatientIdentifier(Patient patient) { - if (!patient.hasIdentifier()) { - throw new UnprocessableEntityException("Patient should have one identifier"); - } else if (patient.getIdentifier().size() > 1) { - throw new UnprocessableEntityException("Patient has more than one identifier"); - } - - return patient.getIdentifier().get(0); - } - - private Identifier handleOtherResourceIdentifier(Resource resource) { - Reference subject = Resources.getSubject(resource) - .orElseThrow(UnprocessableEntityException::new); - - if (!subject.hasIdentifier()) { - throw new UnprocessableEntityException(messages.getMessage("validation.subject.identifierRequired")); - } - - return subject.getIdentifier(); - } - - private Identifier generateRandomIdentifier() { - PatientId patientId = patientIdRepository.save(new PatientId()); - return new Identifier() - .setSystem(Resources.RFC_4122_SYSTEM) - .setValue(patientId.getUuidAsString()); - } - - private Optional<UUID> findEhrId(Identifier identifier) { - String aql = "SELECT e/ehr_id/value FROM ehr e WHERE e/ehr_status/subject/external_ref/id/value = $value " + - "AND e/ehr_status/subject/external_ref/id/scheme = $scheme"; - Query<Record1<UUID>> query = Query.buildNativeQuery(aql, UUID.class); - - ParameterValue<String> value = new ParameterValue<>("value", identifier.getValue()); - ParameterValue<String> scheme = new ParameterValue<>("scheme", identifier.getSystem()); - List<Record1<UUID>> result = openEhrClient.aqlEndpoint().execute(query, value, scheme); - - if (result.isEmpty()) { - return Optional.empty(); - } - return Optional.of(result.get(0).value1()); - } - - private UUID createEhr(Identifier identifier) { - GenericId id = new GenericId(identifier.getValue(), identifier.getSystem()); - PartyRef externalRef = new PartyRef(id, "DEMOGRAPHIC", "PERSON"); - PartySelf subject = new PartySelf(externalRef); - EhrStatus ehrStatus = new EhrStatus("openEHR-EHR-EHR_STATUS.generic.v1", new DvText("EHR Status"), subject, true, true, null); - return openEhrClient.ehrEndpoint().createEhr(ehrStatus); - } - - private boolean isValidIdentifier(Identifier identifier) { - return identifier.hasValue() && identifier.hasSystem(); - } - - @Override - public void setMessageSource(@NonNull MessageSource messageSource) { - this.messages = new MessageSourceAccessor(messageSource); - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrLookupProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrLookupProcessor.java index 93e372212..0964039f5 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrLookupProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrLookupProcessor.java @@ -17,7 +17,6 @@ package org.ehrbase.fhirbridge.camel.processor; import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.api.server.RequestDetails; import com.nedap.archie.rm.datavalues.DvText; import com.nedap.archie.rm.ehr.EhrStatus; import com.nedap.archie.rm.generic.PartySelf; @@ -29,6 +28,7 @@ import org.ehrbase.fhirbridge.camel.component.ehr.composition.CompositionConstants; import org.ehrbase.fhirbridge.core.domain.PatientEhr; import org.ehrbase.fhirbridge.core.repository.PatientEhrRepository; +import org.hl7.fhir.r4.model.Resource; import org.hl7.fhir.r4.model.ResourceType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -65,10 +65,9 @@ public void process(Exchange exchange) throws Exception { } private String getPatientId(Exchange exchange) { - RequestDetails requestDetails = getRequestDetails(exchange); - ResourceType resourceType = ResourceType.valueOf(requestDetails.getResourceName()); + Resource resource = exchange.getIn().getBody(Resource.class); - if (resourceType == ResourceType.Patient) { + if (resource.getResourceType() == ResourceType.Patient) { return exchange.getProperty(CamelConstants.OUTCOME, MethodOutcome.class).getId().getIdPart(); } else { return exchange.getIn().getHeader(CamelConstants.PATIENT_ID, String.class); diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourcePersistenceProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourcePersistenceProcessor.java deleted file mode 100644 index 17aca18be..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourcePersistenceProcessor.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.camel.processor; - -import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.api.RestOperationTypeEnum; -import ca.uhn.fhir.rest.api.server.RequestDetails; -import org.apache.camel.Exchange; -import org.apache.camel.Processor; -import org.ehrbase.fhirbridge.camel.CamelConstants; -import org.ehrbase.fhirbridge.core.repository.ResourceCompositionRepository; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.openehealth.ipf.commons.ihe.fhir.Constants; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * @since 1.2.0 - */ -public class ProvideResourcePersistenceProcessor<T extends IBaseResource> implements Processor { - - private static final Logger LOG = LoggerFactory.getLogger(ProvideResourcePersistenceProcessor.class); - - private final IFhirResourceDao<T> resourceDao; - - private final Class<T> resourceType; - - private final ResourceCompositionRepository resourceCompositionRepository; - - public ProvideResourcePersistenceProcessor(IFhirResourceDao<T> resourceDao, Class<T> resourceType, - ResourceCompositionRepository resourceCompositionRepository) { - this.resourceDao = resourceDao; - this.resourceType = resourceType; - this.resourceCompositionRepository = resourceCompositionRepository; - } - - @Override - public void process(Exchange exchange) throws Exception { - LOG.trace("Processing..."); - - T resource = exchange.getIn().getBody(resourceType); - RequestDetails requestDetails = exchange.getIn().getHeader(Constants.FHIR_REQUEST_DETAILS, RequestDetails.class); - - MethodOutcome outcome; - switch (requestDetails.getRestOperationType()) { - case CREATE: - case TRANSACTION: - outcome = handleCreateResource(resource, requestDetails); - break; - case UPDATE: - outcome = handleUpdateResource(resource, requestDetails); - resourceCompositionRepository.findById(outcome.getId().getIdPart()) - .ifPresent(resourceMap -> exchange.getMessage().setHeader(CamelConstants.COMPOSITION_ID, resourceMap.getCompositionId())); - break; - default: - throw new UnsupportedOperationException("Only 'Create', 'Transaction' or 'Update' operations are supported"); - } - - exchange.getMessage().setHeader(CamelConstants.RESOURCE_ID, outcome.getId().getIdPart()); - exchange.setProperty(CamelConstants.OUTCOME, outcome); - } - - /** - * Creates resource. - * - * @param resource the resource - * @param requestDetails the context of the current request - * @return response back to the client - */ - private MethodOutcome handleCreateResource(T resource, RequestDetails requestDetails) { - var conditionalUrl = requestDetails.getConditionalUrl(RestOperationTypeEnum.CREATE); - MethodOutcome outcome = resourceDao.create(resource, conditionalUrl, requestDetails); - LOG.debug("Created resource: {}", resource); - return outcome; - } - - /** - * Updates an existing resource. - * - * @param resource the updated resource - * @param requestDetails the context of the current request - * @return response back to the client - */ - private MethodOutcome handleUpdateResource(T resource, RequestDetails requestDetails) { - var conditionalUrl = requestDetails.getConditionalUrl(RestOperationTypeEnum.UPDATE); - MethodOutcome outcome = resourceDao.update(resource, conditionalUrl, requestDetails); - LOG.debug("Updated resource: {}", resource); - return outcome; - } -} - diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourcePersistenceProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourcePersistenceProcessor.java index 9ce3db32a..db57b0af9 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourcePersistenceProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourcePersistenceProcessor.java @@ -53,10 +53,11 @@ public ResourcePersistenceProcessor(DaoRegistry daoRegistry, ResourceComposition @Override public void process(Exchange exchange) throws Exception { RequestDetails requestDetails = getRequestDetails(exchange); - IFhirResourceDao resourceDao = getResourceDao(requestDetails.getResourceName()); + IFhirResourceDao resourceDao = getResourceDao(exchange, requestDetails); switch (requestDetails.getRestOperationType()) { case CREATE: + case TRANSACTION: handleCreateOperation(exchange, requestDetails, resourceDao); break; case READ: @@ -126,7 +127,15 @@ private void handleSearchOperation(Exchange exchange, RequestDetails requestDeta } } - private IFhirResourceDao getResourceDao(String resourceName) { + private IFhirResourceDao getResourceDao(Exchange exchange, RequestDetails requestDetails) { + String resourceName; + if (requestDetails.getRestOperationType() == RestOperationTypeEnum.TRANSACTION) { + Resource resource = exchange.getIn().getBody(Resource.class); + resourceName = resource.getResourceType().name(); + } else { + resourceName = requestDetails.getResourceName(); + } + return daoRegistry.getResourceDao(resourceName); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java index 7959efea5..23b36ef18 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java @@ -4,10 +4,8 @@ import org.apache.camel.builder.RouteBuilder; import org.apache.camel.util.ObjectHelper; import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; -import org.ehrbase.client.exception.WrongStatusCodeException; import org.ehrbase.client.openehrclient.VersionUid; import org.ehrbase.fhirbridge.camel.CamelConstants; -import org.ehrbase.fhirbridge.ehr.converter.ConversionException; import org.springframework.stereotype.Component; @Component @@ -41,33 +39,6 @@ public void configure() throws Exception { .end() .process("provideResourceResponseProcessor"); - - from("direct:internal-provide-resource") - .routeId("internal-provide-resource") - .process("ehrIdLookupProcessor") - .doTry() - .to("bean:fhirResourceConversionService?method=convert(${headers.CamelFhirBridgeProfile}, ${body})") - .doCatch(ConversionException.class) - .throwException(UnprocessableEntityException.class, "${exception.message}") - .end() - .to("direct:internal-provide-resource-after-converter"); - - from("direct:internal-provide-resource-after-converter") - .routeId("internal-provide-resource-after-converter-route") - .choice() - .when(header(CamelConstants.COMPOSITION_ID).isNotNull()) - .process(exchange -> { - var composition = exchange.getIn().getMandatoryBody(CompositionEntity.class); - composition.setVersionUid(new VersionUid(exchange.getIn().getHeader(CamelConstants.COMPOSITION_ID, String.class))); - }) - .end() - .doTry() - .to("ehr-composition:producer?operation=mergeCompositionEntity") - .doCatch(WrongStatusCodeException.class) - .throwException(UnprocessableEntityException.class, "${exception.message}") - .end() - .process("provideResourceResponseProcessor"); - // @formatter:on } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java deleted file mode 100644 index c5c1e6cbe..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/DiagnosticReportRoutes.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.camel.route; - -import org.apache.camel.builder.RouteBuilder; -import org.hl7.fhir.r4.model.DiagnosticReport; -import org.springframework.stereotype.Component; - -/** - * Implementation of {@link RouteBuilder} that provides route definitions for transactions - * linked to {@link DiagnosticReport} resource. - * - * @since 1.0.0 - */ -@Component -public class DiagnosticReportRoutes extends AbstractRouteBuilder { - - @Override - public void configure() throws Exception { - // @formatter:off - super.configure(); - - from("direct:internal-provide-diagnostic-report") - .routeId("internal-provide-diagnostic-report-route") - .process("provideDiagnosticReportPersistenceProcessor") - .to("direct:internal-provide-resource"); - // @formatter:on - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java deleted file mode 100644 index f58ffda11..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ObservationRoutes.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2020-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.ehrbase.fhirbridge.camel.route; - -import org.apache.camel.builder.RouteBuilder; -import org.hl7.fhir.r4.model.Observation; -import org.springframework.stereotype.Component; - -/** - * Implementation of {@link RouteBuilder} that provides route definitions for transactions - * linked to {@link Observation} resource. - * - * @since 1.0.0 - */ -@Component -public class ObservationRoutes extends AbstractRouteBuilder { - - @Override - public void configure() throws Exception { - // @formatter:off - super.configure(); - - // Route: Internal Provide Observation - from("direct:internal-provide-observation") - .routeId("internal-provide-observation-route") - .process("provideObservationPersistenceProcessor") - .to("direct:internal-provide-resource"); - // @formatter:on - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/FhirRouteBuilder.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ResourceRouteBuilder.java similarity index 99% rename from src/main/java/org/ehrbase/fhirbridge/camel/route/FhirRouteBuilder.java rename to src/main/java/org/ehrbase/fhirbridge/camel/route/ResourceRouteBuilder.java index dc45426b1..1f8e80bfa 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/FhirRouteBuilder.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ResourceRouteBuilder.java @@ -22,7 +22,7 @@ @Component @SuppressWarnings("java:S1192") -public class FhirRouteBuilder extends RouteBuilder { +public class ResourceRouteBuilder extends RouteBuilder { @Value("${fhir-bridge.debug.enabled:false}") private boolean debug; diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/BundleRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/TransactionRouteBuilder.java similarity index 65% rename from src/main/java/org/ehrbase/fhirbridge/camel/route/BundleRoutes.java rename to src/main/java/org/ehrbase/fhirbridge/camel/route/TransactionRouteBuilder.java index 0d6d9be6c..1b37e9a41 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/BundleRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/TransactionRouteBuilder.java @@ -19,6 +19,7 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.apache.camel.builder.RouteBuilder; import org.ehrbase.fhirbridge.camel.CamelConstants; +import org.ehrbase.fhirbridge.camel.processor.BundleResponseProcessor; import org.ehrbase.fhirbridge.fhir.bundle.converter.AntiBodyPanelConverter; import org.ehrbase.fhirbridge.fhir.bundle.converter.BloodGasPanelConverter; import org.ehrbase.fhirbridge.fhir.bundle.converter.DiagnosticReportLabConverter; @@ -36,48 +37,32 @@ * @since 1.0.0 */ @Component -public class BundleRoutes extends AbstractRouteBuilder { - - private final String CONVERT = "convert"; - private final String BUNDLE_RESPONSE_PROCESSOR = "bundleResponseProcessor"; +@SuppressWarnings("java:S1192") +public class TransactionRouteBuilder extends AbstractRouteBuilder { @Override public void configure() throws Exception { // @formatter:off super.configure(); - // 'Provide Bundle' route definition from("bundle-provide:consumer?fhirContext=#fhirContext") .setHeader(CamelConstants.PROFILE, method(Bundles.class, "getTransactionProfile")) .choice() - .when(header(CamelConstants.PROFILE).isEqualTo(Profile.BLOOD_GAS_PANEL)) - .to("direct:process-blood-gas-panel-bundle") .when(header(CamelConstants.PROFILE).isEqualTo(Profile.ANTI_BODY_PANEL)) - .to("direct:process-anti-body-panel-bundle") + .bean(AntiBodyPanelBundleValidator.class) + .bean(AntiBodyPanelConverter.class, "convert") + .when(header(CamelConstants.PROFILE).isEqualTo(Profile.BLOOD_GAS_PANEL)) + .bean(BloodGasPanelBundleValidator.class) + .bean(BloodGasPanelConverter.class, "convert") .when(header(CamelConstants.PROFILE).isEqualTo(Profile.DIAGNOSTIC_REPORT_LAB)) - .to("direct:process-diagnostic-report-lab-bundle") + .bean(DiagnosticReportLabBundleValidator.class) + .bean(DiagnosticReportLabConverter.class,"convert") .otherwise() .throwException(new UnprocessableEntityException("Unsupported transaction: provided Bundle should have a resource that " + - "uses on of the following profiles: " + Profile.BLOOD_GAS_PANEL.getUri() + ", " + Profile.DIAGNOSTIC_REPORT_LAB.getUri())); - - - from("direct:process-anti-body-panel-bundle") - .bean(AntiBodyPanelBundleValidator.class) - .bean(AntiBodyPanelConverter.class, CONVERT) - .to("direct:internal-provide-observation") - .process(BUNDLE_RESPONSE_PROCESSOR); - - from("direct:process-blood-gas-panel-bundle") - .bean(BloodGasPanelBundleValidator.class) - .bean(BloodGasPanelConverter.class, CONVERT) - .to("direct:internal-provide-observation") - .process(BUNDLE_RESPONSE_PROCESSOR); - - from("direct:process-diagnostic-report-lab-bundle") - .bean(DiagnosticReportLabBundleValidator.class) - .bean(DiagnosticReportLabConverter.class, CONVERT) - .to("direct:internal-provide-diagnostic-report") - .process(BUNDLE_RESPONSE_PROCESSOR); + "uses on of the following profiles: " + Profile.BLOOD_GAS_PANEL.getUri() + ", " + Profile.DIAGNOSTIC_REPORT_LAB.getUri())) + .end() + .to("direct:provideResource") + .process(BundleResponseProcessor.BEAN_ID); // @formatter:on } diff --git a/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java deleted file mode 100644 index 489d46540..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/config/camel/ProcessorConfiguration.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.ehrbase.fhirbridge.config.camel; - -import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao; -import org.ehrbase.fhirbridge.camel.processor.ProvideResourcePersistenceProcessor; -import org.ehrbase.fhirbridge.core.repository.ResourceCompositionRepository; -import org.hl7.fhir.r4.model.DiagnosticReport; -import org.hl7.fhir.r4.model.Encounter; -import org.hl7.fhir.r4.model.Observation; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -@Configuration -public class ProcessorConfiguration { - - private final ResourceCompositionRepository resourceCompositionRepository; - - public ProcessorConfiguration(ResourceCompositionRepository resourceCompositionRepository) { - this.resourceCompositionRepository = resourceCompositionRepository; - } - - @Bean - public ProvideResourcePersistenceProcessor<DiagnosticReport> provideDiagnosticReportPersistenceProcessor(IFhirResourceDao<DiagnosticReport> diagnosticReportDao) { - return new ProvideResourcePersistenceProcessor<>(diagnosticReportDao, DiagnosticReport.class, resourceCompositionRepository); - } - - @Bean - public ProvideResourcePersistenceProcessor<Encounter> provideEncounterPersistenceProcessor(IFhirResourceDao<Encounter> encounterDao) { - return new ProvideResourcePersistenceProcessor<>(encounterDao, Encounter.class, resourceCompositionRepository); - } - - @Bean - public ProvideResourcePersistenceProcessor<Observation> provideObservationPersistenceProcessor(IFhirResourceDao<Observation> observationDao) { - return new ProvideResourcePersistenceProcessor<>(observationDao, Observation.class, resourceCompositionRepository); - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/converter/AntiBodyPanelConverter.java b/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/converter/AntiBodyPanelConverter.java index 4666ce5bf..c0455da05 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/converter/AntiBodyPanelConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/converter/AntiBodyPanelConverter.java @@ -12,7 +12,7 @@ import java.util.List; import java.util.Map; -public class AntiBodyPanelConverter extends AbstractBundleConverter<Observation>{ +public class AntiBodyPanelConverter extends AbstractBundleConverter<Observation> { @Override public Observation convert(@NonNull Bundle bundle) { @@ -35,5 +35,4 @@ public Observation convert(@NonNull Bundle bundle) { observation.setContained(contains); return observation; } - } diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/bundle/BloodGasIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/bundle/BloodGasIT.java index a377f5191..d727c4537 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/bundle/BloodGasIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/bundle/BloodGasIT.java @@ -29,15 +29,14 @@ /** * Integration tests for {@link org.hl7.fhir.r4.model.Bundle Bundle} resource. */ -public class BloodGasIT extends AbstractBundleMappingTestSetupIT { - +class BloodGasIT extends AbstractBundleMappingTestSetupIT { public BloodGasIT() { super("Bundle/", Bundle.class); } @Test - public void createBloodGas() throws IOException { + void createBloodGas() throws IOException { create("create-blood-gas.json"); } diff --git a/src/test/resources/Bundle/create-blood-gas.json b/src/test/resources/Bundle/create-blood-gas.json index c6e51f686..1f5afa2c6 100644 --- a/src/test/resources/Bundle/create-blood-gas.json +++ b/src/test/resources/Bundle/create-blood-gas.json @@ -295,7 +295,7 @@ } }, { - "fullUrl": "urn:uuid:04121321-4af5-424c-a0e1-ed3aab1casd4", + "fullUrl": "urn:uuid:04121321-4af5-424c-a0e1-ed3aab1casd4", "resource": { "resourceType": "Observation", "meta": { From 2c8a96bf58c69b2d3d89d736d8e44582ee37ebf7 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Mon, 5 Jul 2021 15:43:45 +0200 Subject: [PATCH 124/141] Fix Blood Gas Panel --- .../ConditionToObservationConverter.java | 14 +++++------ .../BloodGasPanelBundleValidator.java | 24 +++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConditionToObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConditionToObservationConverter.java index b896125c1..ea65e6593 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConditionToObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConditionToObservationConverter.java @@ -2,14 +2,14 @@ import org.ehrbase.client.classgenerator.interfaces.EntryEntity; import org.hl7.fhir.r4.model.Condition; -import org.hl7.fhir.r4.model.DiagnosticReport; import org.springframework.lang.NonNull; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.time.temporal.TemporalAccessor; -public abstract class ConditionToObservationConverter<E extends EntryEntity> extends EntryEntityConverter<Condition, E> { +@SuppressWarnings("java:S6212") +public abstract class ConditionToObservationConverter<E extends EntryEntity> extends EntryEntityConverter<Condition, E> { @Override public E convert(@NonNull Condition resource) { @@ -23,24 +23,24 @@ public void invokeTimeValues(E entryEntity, Condition resource) { invokeSetTimeValue(entryEntity, resource); } - public void invokeSetTimeValue(E entryEntity, Condition resource){ + public void invokeSetTimeValue(E entryEntity, Condition resource) { try { Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, TimeConverter.convertConditionTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { exception.printStackTrace(); - } catch (NoSuchMethodException ignored){ + } catch (NoSuchMethodException ignored) { //ignored } } - public void invokeOriginValue(E entryEntity, Condition resource){ + public void invokeOriginValue(E entryEntity, Condition resource) { try { Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertConditionTime(resource)); - } catch ( IllegalAccessException | InvocationTargetException exception) { + } catch (IllegalAccessException | InvocationTargetException exception) { exception.printStackTrace(); - }catch (NoSuchMethodException ignored){ + } catch (NoSuchMethodException ignored) { //ignored } } diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/BloodGasPanelBundleValidator.java b/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/BloodGasPanelBundleValidator.java index 02aa86156..46d8c43c8 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/BloodGasPanelBundleValidator.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/BloodGasPanelBundleValidator.java @@ -1,17 +1,17 @@ package org.ehrbase.fhirbridge.fhir.bundle.validator; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.hl7.fhir.r4.model.Bundle; import java.util.Map; public class BloodGasPanelBundleValidator extends AbstractBundleValidator { - private static final String bloodGasUrl = "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-gas-panel"; - private static final String pHUrl = "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pH"; - private static final String carbonDioxidePartialPressureUrl = "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/carbon-dioxide-partial-pressure"; - private static final String oxygenPartialPressureUrl = "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/oxygen-partial-pressure"; - private static final String oxygenSaturationUrl = "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/oxygen-saturation"; + + private static final String BLOOD_GAS_URL = "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-gas-panel"; + private static final String PH_URL = "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pH"; + private static final String CARBON_DIOXIDE_PARTIAL_PRESSURE_URL = "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/carbon-dioxide-partial-pressure"; + private static final String OXYGEN_PARTIAL_PRESSURE_URL = "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/oxygen-partial-pressure"; + private static final String OXYGEN_SATURATION_URL = "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/oxygen-saturation"; private int bloodGasProfilesContained = 0; private int phProfilesContained = 0; @@ -45,19 +45,19 @@ private void validateProfiles(Bundle.BundleEntryComponent entry) { try { String profileUrl = entry.getResource().getMeta().getProfile().get(0).getValue(); switch (profileUrl) { - case bloodGasUrl: + case BLOOD_GAS_URL: setBloodGasPanel(); break; - case pHUrl: + case PH_URL: phProfilesContained += 1; break; - case carbonDioxidePartialPressureUrl: + case CARBON_DIOXIDE_PARTIAL_PRESSURE_URL: carbonDioxideProfilesContained += 1; break; - case oxygenPartialPressureUrl: + case OXYGEN_PARTIAL_PRESSURE_URL: oxygenPartialProfilesContained += 1; break; - case oxygenSaturationUrl: + case OXYGEN_SATURATION_URL: oxygenSaturationProfilesContained += 1; break; default: @@ -78,7 +78,7 @@ private void checkIfAtLeastOneObservationContained() { } private boolean checkIfOneProfileIsPresent() { - return oxygenPartialProfilesContained==1 || carbonDioxideProfilesContained==1|| phProfilesContained==1 || oxygenSaturationProfilesContained ==1; + return oxygenPartialProfilesContained == 1 || carbonDioxideProfilesContained == 1 || phProfilesContained == 1 || oxygenSaturationProfilesContained == 1; } private void setBloodGasPanel() { From cdec5517163d19d213d7da8fd4a8ea93ac63c760 Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Mon, 5 Jul 2021 15:48:08 +0200 Subject: [PATCH 125/141] fix exurity hotspots --- .../generic/ConditionToObservationConverter.java | 8 ++++++-- .../DiagnosticReportToObservationConverter.java | 8 ++++++-- .../generic/EncounterToAdminEntryConverter.java | 10 +++++++--- .../generic/ImmunizationToActionConverter.java | 6 +++++- .../MedicationStatementToObservationConverter.java | 8 ++++++-- .../generic/ObservationToObservationConverter.java | 8 ++++++-- .../generic/ProcedureToProcedureActionConverter.java | 8 ++++++-- .../QuestionnaireResponseItemToActionConverter.java | 6 +++++- ...uestionnaireResponseItemToObservationConverter.java | 8 ++++++-- 9 files changed, 53 insertions(+), 17 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConditionToObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConditionToObservationConverter.java index b896125c1..39e1a0101 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConditionToObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConditionToObservationConverter.java @@ -3,6 +3,8 @@ import org.ehrbase.client.classgenerator.interfaces.EntryEntity; import org.hl7.fhir.r4.model.Condition; import org.hl7.fhir.r4.model.DiagnosticReport; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.lang.NonNull; import java.lang.reflect.InvocationTargetException; @@ -11,6 +13,8 @@ public abstract class ConditionToObservationConverter<E extends EntryEntity> extends EntryEntityConverter<Condition, E> { + private static final Logger LOG = LoggerFactory.getLogger(ConditionToObservationConverter.class); + @Override public E convert(@NonNull Condition resource) { E entryEntity = super.convert(resource); @@ -28,7 +32,7 @@ public void invokeSetTimeValue(E entryEntity, Condition resource){ Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, TimeConverter.convertConditionTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - exception.printStackTrace(); + LOG.error("Exception occured when invoking method" + exception.toString()); } catch (NoSuchMethodException ignored){ //ignored } @@ -39,7 +43,7 @@ public void invokeOriginValue(E entryEntity, Condition resource){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertConditionTime(resource)); } catch ( IllegalAccessException | InvocationTargetException exception) { - exception.printStackTrace(); + LOG.error("Exception occured when invoking method" + exception.toString()); }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/DiagnosticReportToObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/DiagnosticReportToObservationConverter.java index 6f7b73945..93d4fb44f 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/DiagnosticReportToObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/DiagnosticReportToObservationConverter.java @@ -3,6 +3,8 @@ import org.ehrbase.client.classgenerator.interfaces.EntryEntity; import org.hl7.fhir.r4.model.DiagnosticReport; import org.hl7.fhir.r4.model.Observation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.lang.NonNull; import java.lang.reflect.InvocationTargetException; @@ -11,6 +13,8 @@ public abstract class DiagnosticReportToObservationConverter<E extends EntryEntity> extends EntryEntityConverter<DiagnosticReport, E> { + private static final Logger LOG = LoggerFactory.getLogger(DiagnosticReportToObservationConverter.class); + @Override public E convert(@NonNull DiagnosticReport resource) { E entryEntity = super.convert(resource); @@ -28,7 +32,7 @@ public void invokeSetTimeValue(E entryEntity, DiagnosticReport resource){ Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, TimeConverter.convertDiagnosticReportTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - exception.printStackTrace(); + LOG.error("Exception occured when invoking method" + exception.toString()); } catch (NoSuchMethodException ignored){ //ignored } @@ -39,7 +43,7 @@ public void invokeOriginValue(E entryEntity, DiagnosticReport resource){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertDiagnosticReportTime(resource)); } catch ( IllegalAccessException | InvocationTargetException exception) { - exception.printStackTrace(); + LOG.error("Exception occured when invoking method" + exception.toString()); }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java index ba90ca8b8..5a76af852 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java @@ -2,6 +2,8 @@ import org.ehrbase.client.classgenerator.interfaces.EntryEntity; import org.hl7.fhir.r4.model.Encounter; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.lang.NonNull; import org.ehrbase.fhirbridge.fhir.support.Encounters; import java.lang.reflect.InvocationTargetException; @@ -10,6 +12,8 @@ public abstract class EncounterToAdminEntryConverter <E extends EntryEntity> extends EntryEntityConverter<Encounter, E> { + private static final Logger LOG = LoggerFactory.getLogger(EncounterToAdminEntryConverter.class); + @Override public E convert(@NonNull Encounter resource) { E entryEntity = super.convert(resource); @@ -44,7 +48,7 @@ public void invokeSetBeginEndValue(E entryEntity, Encounter resource){ setEndValue.invoke(entryEntity, TimeConverter.convertEncounterLocationEndTime(location).get()); } } catch (IllegalAccessException | InvocationTargetException exception) { - exception.printStackTrace(); + LOG.error("Exception occured when invoking method" + exception.toString()); } catch (NoSuchMethodException ignored){ //ignored } @@ -55,7 +59,7 @@ public void invokeSetAufnahmeValue(E entryEntity, Encounter resource) { Method setDatumUhrzeitDerAufnahmeValue = entryEntity.getClass().getMethod("setDatumUhrzeitDerAufnahmeValue", TemporalAccessor.class); setDatumUhrzeitDerAufnahmeValue.invoke(entryEntity, TimeConverter.convertEncounterTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - exception.printStackTrace(); + LOG.error("Exception occured when invoking method" + exception.toString()); } catch (NoSuchMethodException ignored){ //ignored } @@ -70,7 +74,7 @@ public void invokeSetEntlassungValue(E entryEntity, Encounter resource) { } } catch (IllegalAccessException | InvocationTargetException exception) { - exception.printStackTrace(); + LOG.error("Exception occured when invoking method" + exception.toString()); } catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToActionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToActionConverter.java index cad82aa58..730922462 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToActionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToActionConverter.java @@ -3,6 +3,8 @@ import org.ehrbase.client.classgenerator.interfaces.EntryEntity; import org.hl7.fhir.r4.model.Immunization; import org.hl7.fhir.r4.model.Observation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.lang.NonNull; import java.lang.reflect.InvocationTargetException; @@ -11,6 +13,8 @@ public abstract class ImmunizationToActionConverter<E extends EntryEntity> extends EntryEntityConverter<Immunization, E>{ + private static final Logger LOG = LoggerFactory.getLogger(ImmunizationToActionConverter.class); + @Override public E convert(@NonNull Immunization resource) { E entryEntity = super.convert(resource); @@ -23,7 +27,7 @@ protected void invokeTimeValues(E entryEntity, Immunization resource){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertImmunizationTime(resource)); } catch ( IllegalAccessException | InvocationTargetException exception) { - exception.printStackTrace(); + LOG.error("Exception occured when invoking method" + exception.toString()); }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/MedicationStatementToObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/MedicationStatementToObservationConverter.java index c6cdcc130..d95a9b6dd 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/MedicationStatementToObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/MedicationStatementToObservationConverter.java @@ -2,6 +2,8 @@ import org.ehrbase.client.classgenerator.interfaces.EntryEntity; import org.hl7.fhir.r4.model.MedicationStatement; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.lang.NonNull; import java.lang.reflect.InvocationTargetException; @@ -10,6 +12,8 @@ public abstract class MedicationStatementToObservationConverter<E extends EntryEntity> extends EntryEntityConverter<MedicationStatement, E> { + private static final Logger LOG = LoggerFactory.getLogger(MedicationStatementToObservationConverter.class); + @Override public E convert(@NonNull MedicationStatement resource) { E entryEntity = super.convert(resource); @@ -27,7 +31,7 @@ public void invokeSetTimeValue(E entryEntity, MedicationStatement resource){ Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, TimeConverter.convertMedicationStatmentTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - exception.printStackTrace(); + LOG.error("Exception occured when invoking method" + exception.toString()); } catch (NoSuchMethodException ignored){ //ignored } @@ -38,7 +42,7 @@ public void invokeOriginValue(E entryEntity, MedicationStatement resource){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertMedicationStatmentTime(resource)); } catch ( IllegalAccessException | InvocationTargetException exception) { - exception.printStackTrace(); + LOG.error("Exception occured when invoking method" + exception.toString()); }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ObservationToObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ObservationToObservationConverter.java index 31f8049b8..a2f12b2ba 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ObservationToObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ObservationToObservationConverter.java @@ -2,6 +2,8 @@ import org.ehrbase.client.classgenerator.interfaces.EntryEntity; import org.hl7.fhir.r4.model.Observation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.lang.NonNull; import java.lang.reflect.InvocationTargetException; @@ -10,6 +12,8 @@ public abstract class ObservationToObservationConverter<E extends EntryEntity> extends EntryEntityConverter<Observation, E> { + private static final Logger LOG = LoggerFactory.getLogger(ObservationToObservationConverter.class); + @Override public E convert(@NonNull Observation resource) { E entryEntity = super.convert(resource); @@ -27,7 +31,7 @@ public void invokeSetTimeValue(E entryEntity, Observation resource){ Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, TimeConverter.convertObservationTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - exception.printStackTrace(); + LOG.error("Exception occured when invoking method" + exception.toString()); } catch (NoSuchMethodException ignored){ //ignored } @@ -38,7 +42,7 @@ public void invokeOriginValue(E entryEntity, Observation resource){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertObservationTime(resource)); } catch ( IllegalAccessException | InvocationTargetException exception) { - exception.printStackTrace(); + LOG.error("Exception occured when invoking method" + exception.toString()); }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ProcedureToProcedureActionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ProcedureToProcedureActionConverter.java index bc2b1a168..9bf86962f 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ProcedureToProcedureActionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ProcedureToProcedureActionConverter.java @@ -2,6 +2,8 @@ import org.ehrbase.client.classgenerator.interfaces.EntryEntity; import org.hl7.fhir.r4.model.Procedure; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.lang.NonNull; import java.lang.reflect.InvocationTargetException; @@ -10,6 +12,8 @@ public abstract class ProcedureToProcedureActionConverter<E extends EntryEntity> extends EntryEntityConverter<Procedure, E> { + private static final Logger LOG = LoggerFactory.getLogger(ProcedureToProcedureActionConverter.class); + @Override public E convert(@NonNull Procedure resource) { E entryEntity = super.convert(resource); @@ -27,7 +31,7 @@ public void invokeSetTimeValue(E entryEntity, Procedure resource) { Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, TimeConverter.convertProcedureTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - exception.printStackTrace(); + LOG.error("Exception occured when invoking method" + exception.toString()); } catch (NoSuchMethodException ignored) { //ignored } @@ -38,7 +42,7 @@ public void invokeOriginValue(E entryEntity, Procedure resource) { Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertProcedureTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - exception.printStackTrace(); + LOG.error("Exception occured when invoking method" + exception.toString()); } catch (NoSuchMethodException ignored) { //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToActionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToActionConverter.java index 47d6d78aa..0cf737fb2 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToActionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToActionConverter.java @@ -3,6 +3,8 @@ import org.ehrbase.client.classgenerator.interfaces.EntryEntity; import org.ehrbase.client.classgenerator.shareddefinition.Language; import org.hl7.fhir.r4.model.QuestionnaireResponse; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.lang.NonNull; import java.lang.reflect.InvocationTargetException; @@ -11,6 +13,8 @@ public abstract class QuestionnaireResponseItemToActionConverter<E extends EntryEntity> extends QuestionnaireResponseItemToEntryEntityConverter<E> { + private static final Logger LOG = LoggerFactory.getLogger(QuestionnaireResponseItemToActionConverter.class); + @Override public E convert(@NonNull QuestionnaireResponse.QuestionnaireResponseItemComponent questionnaireResponseItemComponent, @NonNull Language language, @NonNull TemporalAccessor authored) { E entryEntity = super.convert(questionnaireResponseItemComponent, language, authored); @@ -23,7 +27,7 @@ protected void invokeTimeValue(E entryEntity, TemporalAccessor authored){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, authored); } catch (IllegalAccessException | InvocationTargetException exception) { - exception.printStackTrace(); + LOG.error("Exception occured when invoking method" + exception.toString()); } catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToObservationConverter.java index c401b9678..037d9c75e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToObservationConverter.java @@ -3,6 +3,8 @@ import org.ehrbase.client.classgenerator.interfaces.EntryEntity; import org.ehrbase.client.classgenerator.shareddefinition.Language; import org.hl7.fhir.r4.model.QuestionnaireResponse; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.lang.NonNull; import java.lang.reflect.InvocationTargetException; @@ -11,6 +13,8 @@ public abstract class QuestionnaireResponseItemToObservationConverter<E extends EntryEntity> extends QuestionnaireResponseItemToEntryEntityConverter<E> { + private static final Logger LOG = LoggerFactory.getLogger(QuestionnaireResponseItemToObservationConverter.class); + @Override public E convert(@NonNull QuestionnaireResponse.QuestionnaireResponseItemComponent questionnaireResponseItemComponent, @NonNull Language language,@NonNull TemporalAccessor authored) { E entryEntity = super.convert(questionnaireResponseItemComponent, language, authored); @@ -28,7 +32,7 @@ public void invokeSetTimeValue(E entryEntity, TemporalAccessor authored) { Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, authored); } catch (IllegalAccessException | InvocationTargetException exception) { - exception.printStackTrace(); + LOG.error("Exception occured when invoking method" + exception.toString()); } catch (NoSuchMethodException ignored){ //ignored } @@ -39,7 +43,7 @@ public void invokeOriginValue(E entryEntity, TemporalAccessor authored) { Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, authored); } catch ( IllegalAccessException | InvocationTargetException exception) { - exception.printStackTrace(); + LOG.error("Exception occured when invoking method" + exception.toString()); }catch (NoSuchMethodException ignored){ //ignored } From cb929f5daea14bdef442cca88c5000736771bfb2 Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Mon, 5 Jul 2021 15:49:16 +0200 Subject: [PATCH 126/141] changed log string --- .../converter/generic/ConditionToObservationConverter.java | 4 ++-- .../generic/DiagnosticReportToObservationConverter.java | 4 ++-- .../converter/generic/EncounterToAdminEntryConverter.java | 6 +++--- .../converter/generic/ImmunizationToActionConverter.java | 2 +- .../generic/MedicationStatementToObservationConverter.java | 4 ++-- .../generic/ObservationToObservationConverter.java | 4 ++-- .../generic/ProcedureToProcedureActionConverter.java | 4 ++-- .../generic/QuestionnaireResponseItemToActionConverter.java | 2 +- .../QuestionnaireResponseItemToObservationConverter.java | 4 ++-- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConditionToObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConditionToObservationConverter.java index 39e1a0101..231dff077 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConditionToObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConditionToObservationConverter.java @@ -32,7 +32,7 @@ public void invokeSetTimeValue(E entryEntity, Condition resource){ Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, TimeConverter.convertConditionTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method" + exception.toString()); + LOG.error("Exception occured when invoking method, error: " + exception.toString()); } catch (NoSuchMethodException ignored){ //ignored } @@ -43,7 +43,7 @@ public void invokeOriginValue(E entryEntity, Condition resource){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertConditionTime(resource)); } catch ( IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method" + exception.toString()); + LOG.error("Exception occured when invoking method, error: " + exception.toString()); }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/DiagnosticReportToObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/DiagnosticReportToObservationConverter.java index 93d4fb44f..7d02cefb0 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/DiagnosticReportToObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/DiagnosticReportToObservationConverter.java @@ -32,7 +32,7 @@ public void invokeSetTimeValue(E entryEntity, DiagnosticReport resource){ Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, TimeConverter.convertDiagnosticReportTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method" + exception.toString()); + LOG.error("Exception occured when invoking method, error: " + exception.toString()); } catch (NoSuchMethodException ignored){ //ignored } @@ -43,7 +43,7 @@ public void invokeOriginValue(E entryEntity, DiagnosticReport resource){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertDiagnosticReportTime(resource)); } catch ( IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method" + exception.toString()); + LOG.error("Exception occured when invoking method, error: " + exception.toString()); }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java index 5a76af852..cdc7d1ae3 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java @@ -48,7 +48,7 @@ public void invokeSetBeginEndValue(E entryEntity, Encounter resource){ setEndValue.invoke(entryEntity, TimeConverter.convertEncounterLocationEndTime(location).get()); } } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method" + exception.toString()); + LOG.error("Exception occured when invoking method, error: " + exception.toString()); } catch (NoSuchMethodException ignored){ //ignored } @@ -59,7 +59,7 @@ public void invokeSetAufnahmeValue(E entryEntity, Encounter resource) { Method setDatumUhrzeitDerAufnahmeValue = entryEntity.getClass().getMethod("setDatumUhrzeitDerAufnahmeValue", TemporalAccessor.class); setDatumUhrzeitDerAufnahmeValue.invoke(entryEntity, TimeConverter.convertEncounterTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method" + exception.toString()); + LOG.error("Exception occured when invoking method, error: " + exception.toString()); } catch (NoSuchMethodException ignored){ //ignored } @@ -74,7 +74,7 @@ public void invokeSetEntlassungValue(E entryEntity, Encounter resource) { } } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method" + exception.toString()); + LOG.error("Exception occured when invoking method, error: " + exception.toString()); } catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToActionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToActionConverter.java index 730922462..051e702bd 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToActionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToActionConverter.java @@ -27,7 +27,7 @@ protected void invokeTimeValues(E entryEntity, Immunization resource){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertImmunizationTime(resource)); } catch ( IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method" + exception.toString()); + LOG.error("Exception occured when invoking method, error: " + exception.toString()); }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/MedicationStatementToObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/MedicationStatementToObservationConverter.java index d95a9b6dd..7c7a8f961 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/MedicationStatementToObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/MedicationStatementToObservationConverter.java @@ -31,7 +31,7 @@ public void invokeSetTimeValue(E entryEntity, MedicationStatement resource){ Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, TimeConverter.convertMedicationStatmentTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method" + exception.toString()); + LOG.error("Exception occured when invoking method, error: " + exception.toString()); } catch (NoSuchMethodException ignored){ //ignored } @@ -42,7 +42,7 @@ public void invokeOriginValue(E entryEntity, MedicationStatement resource){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertMedicationStatmentTime(resource)); } catch ( IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method" + exception.toString()); + LOG.error("Exception occured when invoking method, error: " + exception.toString()); }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ObservationToObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ObservationToObservationConverter.java index a2f12b2ba..31817723b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ObservationToObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ObservationToObservationConverter.java @@ -31,7 +31,7 @@ public void invokeSetTimeValue(E entryEntity, Observation resource){ Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, TimeConverter.convertObservationTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method" + exception.toString()); + LOG.error("Exception occured when invoking method, error: " + exception.toString()); } catch (NoSuchMethodException ignored){ //ignored } @@ -42,7 +42,7 @@ public void invokeOriginValue(E entryEntity, Observation resource){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertObservationTime(resource)); } catch ( IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method" + exception.toString()); + LOG.error("Exception occured when invoking method, error: " + exception.toString()); }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ProcedureToProcedureActionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ProcedureToProcedureActionConverter.java index 9bf86962f..9d178ae58 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ProcedureToProcedureActionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ProcedureToProcedureActionConverter.java @@ -31,7 +31,7 @@ public void invokeSetTimeValue(E entryEntity, Procedure resource) { Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, TimeConverter.convertProcedureTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method" + exception.toString()); + LOG.error("Exception occured when invoking method, error: " + exception.toString()); } catch (NoSuchMethodException ignored) { //ignored } @@ -42,7 +42,7 @@ public void invokeOriginValue(E entryEntity, Procedure resource) { Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertProcedureTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method" + exception.toString()); + LOG.error("Exception occured when invoking method, error: " + exception.toString()); } catch (NoSuchMethodException ignored) { //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToActionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToActionConverter.java index 0cf737fb2..9b9d67708 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToActionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToActionConverter.java @@ -27,7 +27,7 @@ protected void invokeTimeValue(E entryEntity, TemporalAccessor authored){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, authored); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method" + exception.toString()); + LOG.error("Exception occured when invoking method, error: " + exception.toString()); } catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToObservationConverter.java index 037d9c75e..6b74419e0 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToObservationConverter.java @@ -32,7 +32,7 @@ public void invokeSetTimeValue(E entryEntity, TemporalAccessor authored) { Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, authored); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method" + exception.toString()); + LOG.error("Exception occured when invoking method, error: " + exception.toString()); } catch (NoSuchMethodException ignored){ //ignored } @@ -43,7 +43,7 @@ public void invokeOriginValue(E entryEntity, TemporalAccessor authored) { Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, authored); } catch ( IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method" + exception.toString()); + LOG.error("Exception occured when invoking method, error: " + exception.toString()); }catch (NoSuchMethodException ignored){ //ignored } From f6f0981bfaab9592c522602dfbe4c17f2590bd64 Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Mon, 5 Jul 2021 15:55:54 +0200 Subject: [PATCH 127/141] renamed smells --- .../config/ConversionConfiguration.java | 6 +++--- .../AusgeschlosseneDiagnoseConverter.java | 2 +- .../GECCODiagnoseCompositionConverter.java | 4 +--- .../GeccoDiagnoseCodeDefiningCodeMaps.java | 2 +- ...UnbekannteDiagnoseEvaluationConverter.java | 2 +- ...orliegendeDiagnoseEvaluationConverter.java | 3 +-- .../PCRCompositionConverter.java | 2 +- .../PCRObservationConverter.java | 2 +- ...rsuchungsergebnisObservationConverter.java | 2 +- ...iologischerBefundCompositionConverter.java | 2 +- .../BloodGasPanelBundleValidator.java | 21 +++++++++---------- .../fhir/condition/GECCODiagnoseIT.java | 2 +- .../diagnosticreport/RadiologyReportIT.java | 2 +- .../immunization/HistoryOfVaccinationIT.java | 6 ------ .../fhirbridge/fhir/observation/PCRIT.java | 2 +- 15 files changed, 25 insertions(+), 35 deletions(-) rename src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/{geccoDiagnose => geccodiagnose}/AusgeschlosseneDiagnoseConverter.java (95%) rename src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/{geccoDiagnose => geccodiagnose}/GECCODiagnoseCompositionConverter.java (95%) rename src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/{geccoDiagnose => geccodiagnose}/GeccoDiagnoseCodeDefiningCodeMaps.java (97%) rename src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/{geccoDiagnose => geccodiagnose}/UnbekannteDiagnoseEvaluationConverter.java (95%) rename src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/{geccoDiagnose => geccodiagnose}/VorliegendeDiagnoseEvaluationConverter.java (98%) rename src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/{geccoVirologischerbefund => geccovirologischerbefund}/PCRCompositionConverter.java (97%) rename src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/{geccoVirologischerbefund => geccovirologischerbefund}/PCRObservationConverter.java (98%) rename src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/{radiologischerBefund => radiologischerbefund}/BildgebendesUntersuchungsergebnisObservationConverter.java (99%) rename src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/{radiologischerBefund => radiologischerbefund}/RadiologischerBefundCompositionConverter.java (99%) diff --git a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java index 541f0e0b0..a0f4579b0 100644 --- a/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java +++ b/src/main/java/org/ehrbase/fhirbridge/config/ConversionConfiguration.java @@ -15,7 +15,7 @@ import org.ehrbase.fhirbridge.ehr.converter.specific.diagnose.DiagnoseCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.diagnosticreportlab.DiagnosticReportLabCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.fio2.FiO2CompositionConverter; -import org.ehrbase.fhirbridge.ehr.converter.specific.geccoDiagnose.GECCODiagnoseCompositionConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.geccodiagnose.GECCODiagnoseCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.heartrate.HeartRateCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.historyoftravel.HistoryOfTravelCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.impfstatus.ImpfstatusCompositionConverter; @@ -28,14 +28,14 @@ import org.ehrbase.fhirbridge.ehr.converter.specific.pregnancystatus.PregnancyStatusCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.procedure.ProcedureCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.pulseoximetry.PulseOximetryCompositionConverter; -import org.ehrbase.fhirbridge.ehr.converter.specific.radiologischerBefund.RadiologischerBefundCompositionConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.radiologischerbefund.RadiologischerBefundCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.respirationrate.RespiratoryRateCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.smokingstatus.SmokingStatusCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.sofascore.SofaScoreCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.stationaererversorgungsfall.StationaererVersorgungsfallCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.symptom.SymptomCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.therapy.TherapyCompositionConverter; -import org.ehrbase.fhirbridge.ehr.converter.specific.geccoVirologischerbefund.PCRCompositionConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.geccovirologischerbefund.PCRCompositionConverter; import org.ehrbase.fhirbridge.fhir.common.Profile; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoDiagnose/AusgeschlosseneDiagnoseConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccodiagnose/AusgeschlosseneDiagnoseConverter.java similarity index 95% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoDiagnose/AusgeschlosseneDiagnoseConverter.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccodiagnose/AusgeschlosseneDiagnoseConverter.java index 8b9baddf1..4c687b44f 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoDiagnose/AusgeschlosseneDiagnoseConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccodiagnose/AusgeschlosseneDiagnoseConverter.java @@ -1,4 +1,4 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.geccoDiagnose; +package org.ehrbase.fhirbridge.ehr.converter.specific.geccodiagnose; import org.ehrbase.fhirbridge.ehr.converter.generic.EntryEntityConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoDiagnose/GECCODiagnoseCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccodiagnose/GECCODiagnoseCompositionConverter.java similarity index 95% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoDiagnose/GECCODiagnoseCompositionConverter.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccodiagnose/GECCODiagnoseCompositionConverter.java index 719b6bc82..d0fa03840 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoDiagnose/GECCODiagnoseCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccodiagnose/GECCODiagnoseCompositionConverter.java @@ -1,6 +1,5 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.geccoDiagnose; +package org.ehrbase.fhirbridge.ehr.converter.specific.geccodiagnose; -import org.checkerframework.checker.nullness.Opt; import org.ehrbase.fhirbridge.ehr.converter.ConversionException; import org.ehrbase.fhirbridge.ehr.converter.generic.ConditionToCompositionConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem; @@ -10,7 +9,6 @@ import org.hl7.fhir.r4.model.Condition; import org.springframework.lang.NonNull; -import javax.swing.text.html.Option; import java.util.Optional; public class GECCODiagnoseCompositionConverter extends ConditionToCompositionConverter<GECCODiagnoseComposition> { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoDiagnose/GeccoDiagnoseCodeDefiningCodeMaps.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccodiagnose/GeccoDiagnoseCodeDefiningCodeMaps.java similarity index 97% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoDiagnose/GeccoDiagnoseCodeDefiningCodeMaps.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccodiagnose/GeccoDiagnoseCodeDefiningCodeMaps.java index 580114704..f5ee57a58 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoDiagnose/GeccoDiagnoseCodeDefiningCodeMaps.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccodiagnose/GeccoDiagnoseCodeDefiningCodeMaps.java @@ -1,4 +1,4 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.geccoDiagnose; +package org.ehrbase.fhirbridge.ehr.converter.specific.geccodiagnose; import org.ehrbase.fhirbridge.ehr.opt.geccodiagnosecomposition.definition.KategorieDefiningCode; import org.ehrbase.fhirbridge.ehr.opt.geccodiagnosecomposition.definition.NameDerKoerperstelleDefiningCode; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoDiagnose/UnbekannteDiagnoseEvaluationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccodiagnose/UnbekannteDiagnoseEvaluationConverter.java similarity index 95% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoDiagnose/UnbekannteDiagnoseEvaluationConverter.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccodiagnose/UnbekannteDiagnoseEvaluationConverter.java index d9e1d46c4..a59250280 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoDiagnose/UnbekannteDiagnoseEvaluationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccodiagnose/UnbekannteDiagnoseEvaluationConverter.java @@ -1,4 +1,4 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.geccoDiagnose; +package org.ehrbase.fhirbridge.ehr.converter.specific.geccodiagnose; import org.ehrbase.fhirbridge.ehr.converter.generic.EntryEntityConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoDiagnose/VorliegendeDiagnoseEvaluationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccodiagnose/VorliegendeDiagnoseEvaluationConverter.java similarity index 98% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoDiagnose/VorliegendeDiagnoseEvaluationConverter.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccodiagnose/VorliegendeDiagnoseEvaluationConverter.java index 3bdcd250b..e0284ee6f 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoDiagnose/VorliegendeDiagnoseEvaluationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccodiagnose/VorliegendeDiagnoseEvaluationConverter.java @@ -1,4 +1,4 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.geccoDiagnose; +package org.ehrbase.fhirbridge.ehr.converter.specific.geccodiagnose; import org.ehrbase.fhirbridge.ehr.converter.ConversionException; import org.ehrbase.fhirbridge.ehr.converter.generic.EntryEntityConverter; @@ -10,7 +10,6 @@ import org.hl7.fhir.r4.model.Condition; import java.util.List; -import java.util.Optional; public class VorliegendeDiagnoseEvaluationConverter extends EntryEntityConverter<Condition, VorliegendeDiagnoseEvaluation> { diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoVirologischerbefund/PCRCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccovirologischerbefund/PCRCompositionConverter.java similarity index 97% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoVirologischerbefund/PCRCompositionConverter.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccovirologischerbefund/PCRCompositionConverter.java index 26d34fd26..a67e9b990 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoVirologischerbefund/PCRCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccovirologischerbefund/PCRCompositionConverter.java @@ -1,4 +1,4 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.geccoVirologischerbefund; +package org.ehrbase.fhirbridge.ehr.converter.specific.geccovirologischerbefund; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.ehrbase.fhirbridge.ehr.converter.generic.ObservationToCompositionConverter; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoVirologischerbefund/PCRObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccovirologischerbefund/PCRObservationConverter.java similarity index 98% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoVirologischerbefund/PCRObservationConverter.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccovirologischerbefund/PCRObservationConverter.java index 1b4c4978a..e406c05e1 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccoVirologischerbefund/PCRObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccovirologischerbefund/PCRObservationConverter.java @@ -1,4 +1,4 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.geccoVirologischerbefund; +package org.ehrbase.fhirbridge.ehr.converter.specific.geccovirologischerbefund; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import com.nedap.archie.rm.archetyped.FeederAudit; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/radiologischerBefund/BildgebendesUntersuchungsergebnisObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/radiologischerbefund/BildgebendesUntersuchungsergebnisObservationConverter.java similarity index 99% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/radiologischerBefund/BildgebendesUntersuchungsergebnisObservationConverter.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/radiologischerbefund/BildgebendesUntersuchungsergebnisObservationConverter.java index 3a8ead8a7..a9855b8de 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/radiologischerBefund/BildgebendesUntersuchungsergebnisObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/radiologischerbefund/BildgebendesUntersuchungsergebnisObservationConverter.java @@ -1,4 +1,4 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.radiologischerBefund; +package org.ehrbase.fhirbridge.ehr.converter.specific.radiologischerbefund; import org.ehrbase.fhirbridge.ehr.converter.ConversionException; import org.ehrbase.fhirbridge.ehr.converter.generic.DiagnosticReportToObservationConverter; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/radiologischerBefund/RadiologischerBefundCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/radiologischerbefund/RadiologischerBefundCompositionConverter.java similarity index 99% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/radiologischerBefund/RadiologischerBefundCompositionConverter.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/radiologischerbefund/RadiologischerBefundCompositionConverter.java index 0f28b9180..75689f3cc 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/radiologischerBefund/RadiologischerBefundCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/radiologischerbefund/RadiologischerBefundCompositionConverter.java @@ -1,4 +1,4 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.radiologischerBefund; +package org.ehrbase.fhirbridge.ehr.converter.specific.radiologischerbefund; import org.ehrbase.fhirbridge.ehr.converter.ConversionException; import org.ehrbase.fhirbridge.ehr.converter.generic.DiagnosticReportToCompositionConverter; diff --git a/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/BloodGasPanelBundleValidator.java b/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/BloodGasPanelBundleValidator.java index 02aa86156..e44a99f13 100644 --- a/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/BloodGasPanelBundleValidator.java +++ b/src/main/java/org/ehrbase/fhirbridge/fhir/bundle/validator/BloodGasPanelBundleValidator.java @@ -1,17 +1,16 @@ package org.ehrbase.fhirbridge.fhir.bundle.validator; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.hl7.fhir.r4.model.Bundle; import java.util.Map; public class BloodGasPanelBundleValidator extends AbstractBundleValidator { - private static final String bloodGasUrl = "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-gas-panel"; - private static final String pHUrl = "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pH"; - private static final String carbonDioxidePartialPressureUrl = "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/carbon-dioxide-partial-pressure"; - private static final String oxygenPartialPressureUrl = "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/oxygen-partial-pressure"; - private static final String oxygenSaturationUrl = "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/oxygen-saturation"; + private static final String BLOOD_GAS_URL = "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-gas-panel"; + private static final String PH_URL = "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/pH"; + private static final String CARBON_DIOXIDE_PARTIAL_PRESSURE_URL = "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/carbon-dioxide-partial-pressure"; + private static final String OXYGEN_PARTIAL_PRESSURE_URL = "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/oxygen-partial-pressure"; + private static final String OXYGEN_SATURATION_URL = "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/oxygen-saturation"; private int bloodGasProfilesContained = 0; private int phProfilesContained = 0; @@ -45,19 +44,19 @@ private void validateProfiles(Bundle.BundleEntryComponent entry) { try { String profileUrl = entry.getResource().getMeta().getProfile().get(0).getValue(); switch (profileUrl) { - case bloodGasUrl: + case BLOOD_GAS_URL: setBloodGasPanel(); break; - case pHUrl: + case PH_URL: phProfilesContained += 1; break; - case carbonDioxidePartialPressureUrl: + case CARBON_DIOXIDE_PARTIAL_PRESSURE_URL: carbonDioxideProfilesContained += 1; break; - case oxygenPartialPressureUrl: + case OXYGEN_PARTIAL_PRESSURE_URL: oxygenPartialProfilesContained += 1; break; - case oxygenSaturationUrl: + case OXYGEN_SATURATION_URL: oxygenSaturationProfilesContained += 1; break; default: diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/condition/GECCODiagnoseIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/condition/GECCODiagnoseIT.java index 9afaaede8..40a83b78a 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/condition/GECCODiagnoseIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/condition/GECCODiagnoseIT.java @@ -2,7 +2,7 @@ import org.ehrbase.fhirbridge.comparators.CustomTemporalAcessorComparator; import org.ehrbase.fhirbridge.ehr.converter.ConversionException; -import org.ehrbase.fhirbridge.ehr.converter.specific.geccoDiagnose.GECCODiagnoseCompositionConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.geccodiagnose.GECCODiagnoseCompositionConverter; import org.ehrbase.fhirbridge.ehr.opt.geccodiagnosecomposition.GECCODiagnoseComposition; import org.ehrbase.fhirbridge.ehr.opt.geccodiagnosecomposition.definition.AusgeschlosseneDiagnoseEvaluation; import org.ehrbase.fhirbridge.ehr.opt.geccodiagnosecomposition.definition.KoerperstelleCluster; diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/RadiologyReportIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/RadiologyReportIT.java index dc5a15c75..710ce22fc 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/RadiologyReportIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/diagnosticreport/RadiologyReportIT.java @@ -3,7 +3,7 @@ import ca.uhn.fhir.parser.DataFormatException; import org.ehrbase.fhirbridge.comparators.CustomTemporalAcessorComparator; import org.ehrbase.fhirbridge.ehr.converter.ConversionException; -import org.ehrbase.fhirbridge.ehr.converter.specific.radiologischerBefund.RadiologischerBefundCompositionConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.radiologischerbefund.RadiologischerBefundCompositionConverter; import org.ehrbase.fhirbridge.ehr.opt.geccoradiologischerbefundcomposition.GECCORadiologischerBefundComposition; import org.ehrbase.fhirbridge.ehr.opt.geccoradiologischerbefundcomposition.definition.BildgebendesUntersuchungsergebnisObservation; import org.ehrbase.fhirbridge.ehr.opt.geccoradiologischerbefundcomposition.definition.RadiologischerBefundKategorieElement; diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/immunization/HistoryOfVaccinationIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/immunization/HistoryOfVaccinationIT.java index cea0354c2..4631e7bd4 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/immunization/HistoryOfVaccinationIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/immunization/HistoryOfVaccinationIT.java @@ -1,19 +1,13 @@ package org.ehrbase.fhirbridge.fhir.immunization; import org.ehrbase.fhirbridge.comparators.CustomTemporalAcessorComparator; -import org.ehrbase.fhirbridge.ehr.converter.ConversionException; import org.ehrbase.fhirbridge.ehr.converter.specific.impfstatus.ImpfstatusCompositionConverter; -import org.ehrbase.fhirbridge.ehr.converter.specific.radiologischerBefund.RadiologischerBefundCompositionConverter; -import org.ehrbase.fhirbridge.ehr.opt.geccoradiologischerbefundcomposition.GECCORadiologischerBefundComposition; -import org.ehrbase.fhirbridge.ehr.opt.geccoradiologischerbefundcomposition.definition.BildgebendesUntersuchungsergebnisObservation; -import org.ehrbase.fhirbridge.ehr.opt.geccoradiologischerbefundcomposition.definition.RadiologischerBefundKategorieElement; import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.ImpfstatusComposition; import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.ImpfungAction; import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.ImpfungImpfungGegenElement; import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.UnbekannterImpfstatusEvaluation; import org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.definition.VerabreichteDosenCluster; import org.ehrbase.fhirbridge.fhir.AbstractMappingTestSetupIT; -import org.hl7.fhir.r4.model.DiagnosticReport; import org.hl7.fhir.r4.model.Immunization; import org.javers.core.Javers; import org.javers.core.JaversBuilder; diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/PCRIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/PCRIT.java index 5c7437b56..6f25e5a47 100644 --- a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/PCRIT.java +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/PCRIT.java @@ -2,7 +2,7 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.ehrbase.fhirbridge.comparators.CustomTemporalAcessorComparator; -import org.ehrbase.fhirbridge.ehr.converter.specific.geccoVirologischerbefund.PCRCompositionConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.geccovirologischerbefund.PCRCompositionConverter; import org.ehrbase.fhirbridge.ehr.opt.geccovirologischerbefundcomposition.GECCOVirologischerBefundComposition; import org.ehrbase.fhirbridge.ehr.opt.geccovirologischerbefundcomposition.definition.*; import org.ehrbase.fhirbridge.fhir.AbstractMappingTestSetupIT; From 3f465f08e8e910076d2f5d2ff2722033700c1a57 Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Mon, 5 Jul 2021 16:09:05 +0200 Subject: [PATCH 128/141] moved codes to opt generated package --- .../symptom/AusgeschlossenesSymptomEvaluationConverter.java | 4 ++-- .../specific/symptom/SymptomCompositionConverter.java | 2 +- .../symptom/UnbekanntesSymptomEvaluationConverter.java | 4 ++-- .../symptom/VorliegendesSymptomObservationConverter.java | 5 ++--- .../definition/KategorieDefiningCode.java | 1 - .../definition}/AussageUberDenAusschlussDefiningCode.java | 2 +- .../symptomcomposition/definition}/DefiningCode.java | 2 +- .../definition}/KategorieDefiningCodeSymptom.java | 2 +- .../definition}/KrankheitsanzeichenCode.java | 2 +- .../definition}/SchweregradSymptomCode.java | 2 +- 10 files changed, 12 insertions(+), 14 deletions(-) rename src/main/java/org/ehrbase/fhirbridge/ehr/{converter/specific/symptom/codes => opt/symptomcomposition/definition}/AussageUberDenAusschlussDefiningCode.java (95%) rename src/main/java/org/ehrbase/fhirbridge/ehr/{converter/specific/symptom/codes => opt/symptomcomposition/definition}/DefiningCode.java (95%) rename src/main/java/org/ehrbase/fhirbridge/ehr/{converter/specific/symptom/codes => opt/symptomcomposition/definition}/KategorieDefiningCodeSymptom.java (95%) rename src/main/java/org/ehrbase/fhirbridge/ehr/{converter/specific/symptom/codes => opt/symptomcomposition/definition}/KrankheitsanzeichenCode.java (98%) rename src/main/java/org/ehrbase/fhirbridge/ehr/{converter/specific/symptom/codes => opt/symptomcomposition/definition}/SchweregradSymptomCode.java (96%) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/AusgeschlossenesSymptomEvaluationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/AusgeschlossenesSymptomEvaluationConverter.java index ffcb15752..4fe714240 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/AusgeschlossenesSymptomEvaluationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/AusgeschlossenesSymptomEvaluationConverter.java @@ -3,8 +3,8 @@ import org.ehrbase.fhirbridge.ehr.converter.ConversionException; import org.ehrbase.fhirbridge.ehr.converter.generic.EntryEntityConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem; -import org.ehrbase.fhirbridge.ehr.converter.specific.symptom.codes.AussageUberDenAusschlussDefiningCode; -import org.ehrbase.fhirbridge.ehr.converter.specific.symptom.codes.KrankheitsanzeichenCode; +import org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition.AussageUberDenAusschlussDefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition.KrankheitsanzeichenCode; import org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition.AusgeschlossenesSymptomEvaluation; import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.Condition; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/SymptomCompositionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/SymptomCompositionConverter.java index 0f7984310..50e220d6e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/SymptomCompositionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/SymptomCompositionConverter.java @@ -2,7 +2,7 @@ import org.ehrbase.fhirbridge.ehr.converter.generic.ConditionToCompositionConverter; -import org.ehrbase.fhirbridge.ehr.converter.specific.symptom.codes.KategorieDefiningCodeSymptom; +import org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition.KategorieDefiningCodeSymptom; import org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.SymptomComposition; import org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition.StatusDefiningCode; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/UnbekanntesSymptomEvaluationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/UnbekanntesSymptomEvaluationConverter.java index e6bd6ccf0..d9e4b7840 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/UnbekanntesSymptomEvaluationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/UnbekanntesSymptomEvaluationConverter.java @@ -3,8 +3,8 @@ import org.ehrbase.fhirbridge.ehr.converter.ConversionException; import org.ehrbase.fhirbridge.ehr.converter.generic.EntryEntityConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem; -import org.ehrbase.fhirbridge.ehr.converter.specific.symptom.codes.DefiningCode; -import org.ehrbase.fhirbridge.ehr.converter.specific.symptom.codes.KrankheitsanzeichenCode; +import org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition.DefiningCode; +import org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition.KrankheitsanzeichenCode; import org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition.UnbekanntesSymptomAussageUeberDieFehlendeInformationElement; import org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition.UnbekanntesSymptomEvaluation; import org.hl7.fhir.r4.model.Coding; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/VorliegendesSymptomObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/VorliegendesSymptomObservationConverter.java index 0b9ca3481..a0fa2ea95 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/VorliegendesSymptomObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/VorliegendesSymptomObservationConverter.java @@ -2,10 +2,9 @@ import org.ehrbase.fhirbridge.ehr.converter.ConversionException; import org.ehrbase.fhirbridge.ehr.converter.generic.ConditionToObservationConverter; -import org.ehrbase.fhirbridge.ehr.converter.generic.EntryEntityConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem; -import org.ehrbase.fhirbridge.ehr.converter.specific.symptom.codes.KrankheitsanzeichenCode; -import org.ehrbase.fhirbridge.ehr.converter.specific.symptom.codes.SchweregradSymptomCode; +import org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition.KrankheitsanzeichenCode; +import org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition.SchweregradSymptomCode; import org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition.VorliegendesSymptomAnatomischeLokalisationElement; import org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition.VorliegendesSymptomObservation; import org.hl7.fhir.r4.model.CodeableConcept; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoprozedurcomposition/definition/KategorieDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoprozedurcomposition/definition/KategorieDefiningCode.java index ac29b9097..643cfb26e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoprozedurcomposition/definition/KategorieDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/geccoprozedurcomposition/definition/KategorieDefiningCode.java @@ -5,7 +5,6 @@ import java.util.Map; import org.ehrbase.client.classgenerator.EnumValueSet; -import org.ehrbase.fhirbridge.ehr.converter.specific.symptom.codes.KrankheitsanzeichenCode; public enum KategorieDefiningCode implements EnumValueSet { DIAGNOSTIC_PROCEDURE("Diagnostic procedure", "", "SNOMED Clinical Terms", "103693007"), diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/codes/AussageUberDenAusschlussDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/symptomcomposition/definition/AussageUberDenAusschlussDefiningCode.java similarity index 95% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/codes/AussageUberDenAusschlussDefiningCode.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/opt/symptomcomposition/definition/AussageUberDenAusschlussDefiningCode.java index 0cda1d797..520d5060c 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/codes/AussageUberDenAusschlussDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/symptomcomposition/definition/AussageUberDenAusschlussDefiningCode.java @@ -1,4 +1,4 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.symptom.codes; +package org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition; import com.nedap.archie.rm.datatypes.CodePhrase; import com.nedap.archie.rm.datavalues.DvCodedText; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/codes/DefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/symptomcomposition/definition/DefiningCode.java similarity index 95% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/codes/DefiningCode.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/opt/symptomcomposition/definition/DefiningCode.java index 53db0eff2..f1717e767 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/codes/DefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/symptomcomposition/definition/DefiningCode.java @@ -1,4 +1,4 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.symptom.codes; +package org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition; import com.nedap.archie.rm.datatypes.CodePhrase; import com.nedap.archie.rm.datavalues.DvCodedText; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/codes/KategorieDefiningCodeSymptom.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/symptomcomposition/definition/KategorieDefiningCodeSymptom.java similarity index 95% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/codes/KategorieDefiningCodeSymptom.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/opt/symptomcomposition/definition/KategorieDefiningCodeSymptom.java index 254124860..d2950a9e3 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/codes/KategorieDefiningCodeSymptom.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/symptomcomposition/definition/KategorieDefiningCodeSymptom.java @@ -1,4 +1,4 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.symptom.codes; +package org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition; import com.nedap.archie.rm.datatypes.CodePhrase; import com.nedap.archie.rm.datavalues.DvCodedText; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/codes/KrankheitsanzeichenCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/symptomcomposition/definition/KrankheitsanzeichenCode.java similarity index 98% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/codes/KrankheitsanzeichenCode.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/opt/symptomcomposition/definition/KrankheitsanzeichenCode.java index fe1d4bf62..9f1726319 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/codes/KrankheitsanzeichenCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/symptomcomposition/definition/KrankheitsanzeichenCode.java @@ -1,4 +1,4 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.symptom.codes; +package org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition; import com.nedap.archie.rm.datatypes.CodePhrase; import com.nedap.archie.rm.datavalues.DvCodedText; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/codes/SchweregradSymptomCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/symptomcomposition/definition/SchweregradSymptomCode.java similarity index 96% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/codes/SchweregradSymptomCode.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/opt/symptomcomposition/definition/SchweregradSymptomCode.java index bb9f2f513..cbf839b3a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/symptom/codes/SchweregradSymptomCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/symptomcomposition/definition/SchweregradSymptomCode.java @@ -1,4 +1,4 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.symptom.codes; +package org.ehrbase.fhirbridge.ehr.opt.symptomcomposition.definition; import com.nedap.archie.rm.datatypes.CodePhrase; import com.nedap.archie.rm.datavalues.DvCodedText; From 21fa2fb1416daf30701d93a6a1d5f7160d122175 Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Mon, 5 Jul 2021 16:12:53 +0200 Subject: [PATCH 129/141] two more moved to opt --- .../PatientAufDerIntensivstationObservationConverter.java | 5 +++-- .../smokingstatus/RaucherstatusEvaluationConverter.java | 1 + .../WurdeDieAktivitatDurchgefuhrtDefiningCode.java} | 6 +++--- .../definition}/RauchverhaltenDefiningCode.java | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) rename src/main/java/org/ehrbase/fhirbridge/ehr/{converter/specific/patientinicu/WurdeDieAktivitatDurchgefuhrtDefiningcode.java => opt/patientauficucomposition/definition/WurdeDieAktivitatDurchgefuhrtDefiningCode.java} (88%) rename src/main/java/org/ehrbase/fhirbridge/ehr/{converter/specific/smokingstatus => opt/raucherstatuscomposition/definition}/RauchverhaltenDefiningCode.java (95%) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientinicu/PatientAufDerIntensivstationObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientinicu/PatientAufDerIntensivstationObservationConverter.java index 6d7330bd3..e69c7f9ed 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientinicu/PatientAufDerIntensivstationObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientinicu/PatientAufDerIntensivstationObservationConverter.java @@ -4,17 +4,18 @@ import com.nedap.archie.rm.datavalues.DvCodedText; import org.ehrbase.fhirbridge.ehr.converter.generic.ObservationToObservationConverter; import org.ehrbase.fhirbridge.ehr.opt.patientauficucomposition.definition.PatientAufDerIntensivstationObservation; +import org.ehrbase.fhirbridge.ehr.opt.patientauficucomposition.definition.WurdeDieAktivitatDurchgefuhrtDefiningCode; import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.Observation; import java.util.HashMap; public class PatientAufDerIntensivstationObservationConverter extends ObservationToObservationConverter<PatientAufDerIntensivstationObservation> { - private static final HashMap<String, WurdeDieAktivitatDurchgefuhrtDefiningcode> aktivitatDurchgefuehrtDefiningcodeMap + private static final HashMap<String, WurdeDieAktivitatDurchgefuhrtDefiningCode> aktivitatDurchgefuehrtDefiningcodeMap = new HashMap<>(); static { - for (WurdeDieAktivitatDurchgefuhrtDefiningcode code : WurdeDieAktivitatDurchgefuhrtDefiningcode.values()) { + for (WurdeDieAktivitatDurchgefuhrtDefiningCode code : WurdeDieAktivitatDurchgefuhrtDefiningCode.values()) { if (code.getTerminologyId().equals("SNOMED Clinical Terms")) { aktivitatDurchgefuehrtDefiningcodeMap.put(code.getCode(), code); } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/smokingstatus/RaucherstatusEvaluationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/smokingstatus/RaucherstatusEvaluationConverter.java index 470682f4c..67e9f3a16 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/smokingstatus/RaucherstatusEvaluationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/smokingstatus/RaucherstatusEvaluationConverter.java @@ -3,6 +3,7 @@ import org.ehrbase.fhirbridge.ehr.converter.ConversionException; import org.ehrbase.fhirbridge.ehr.converter.generic.EntryEntityConverter; import org.ehrbase.fhirbridge.ehr.opt.raucherstatuscomposition.definition.RaucherstatusEvaluation; +import org.ehrbase.fhirbridge.ehr.opt.raucherstatuscomposition.definition.RauchverhaltenDefiningCode; import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.Observation; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientinicu/WurdeDieAktivitatDurchgefuhrtDefiningcode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientauficucomposition/definition/WurdeDieAktivitatDurchgefuhrtDefiningCode.java similarity index 88% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientinicu/WurdeDieAktivitatDurchgefuhrtDefiningcode.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientauficucomposition/definition/WurdeDieAktivitatDurchgefuhrtDefiningCode.java index 0766393ba..ce37b5ffd 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/patientinicu/WurdeDieAktivitatDurchgefuhrtDefiningcode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/patientauficucomposition/definition/WurdeDieAktivitatDurchgefuhrtDefiningCode.java @@ -1,11 +1,11 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.patientinicu; +package org.ehrbase.fhirbridge.ehr.opt.patientauficucomposition.definition; import com.nedap.archie.rm.datatypes.CodePhrase; import com.nedap.archie.rm.datavalues.DvCodedText; import com.nedap.archie.rm.support.identification.TerminologyId; import org.ehrbase.client.classgenerator.EnumValueSet; -public enum WurdeDieAktivitatDurchgefuhrtDefiningcode implements EnumValueSet { +public enum WurdeDieAktivitatDurchgefuhrtDefiningCode implements EnumValueSet { N74964007("Other", "Other", "SNOMED Clinical Terms", "74964007"), N373066001("Yes", "Yes", "SNOMED Clinical Terms", "373066001"), @@ -25,7 +25,7 @@ public enum WurdeDieAktivitatDurchgefuhrtDefiningcode implements EnumValueSet { private String code; - WurdeDieAktivitatDurchgefuhrtDefiningcode(String value, String description, String terminologyId, + WurdeDieAktivitatDurchgefuhrtDefiningCode(String value, String description, String terminologyId, String code) { this.value = value; this.description = description; diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/smokingstatus/RauchverhaltenDefiningCode.java b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/raucherstatuscomposition/definition/RauchverhaltenDefiningCode.java similarity index 95% rename from src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/smokingstatus/RauchverhaltenDefiningCode.java rename to src/main/java/org/ehrbase/fhirbridge/ehr/opt/raucherstatuscomposition/definition/RauchverhaltenDefiningCode.java index 69a9cadb9..df6620944 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/smokingstatus/RauchverhaltenDefiningCode.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/opt/raucherstatuscomposition/definition/RauchverhaltenDefiningCode.java @@ -1,4 +1,4 @@ -package org.ehrbase.fhirbridge.ehr.converter.specific.smokingstatus; +package org.ehrbase.fhirbridge.ehr.opt.raucherstatuscomposition.definition; import com.nedap.archie.rm.datatypes.CodePhrase; import com.nedap.archie.rm.datavalues.DvCodedText; From 1b7d808d6dffc4f453cff29b4cbdfdb524e176a6 Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Mon, 5 Jul 2021 16:29:19 +0200 Subject: [PATCH 130/141] added messages --- .../generic/ConditionToObservationConverter.java | 8 ++++++-- .../DiagnosticReportToObservationConverter.java | 9 +++++++-- .../generic/EncounterToAdminEntryConverter.java | 12 +++++++++--- .../generic/ImmunizationToActionConverter.java | 6 +++++- .../MedicationStatementToObservationConverter.java | 9 +++++++-- .../generic/ObservationToObservationConverter.java | 9 +++++++-- .../generic/ProcedureToProcedureActionConverter.java | 9 +++++++-- .../QuestionnaireResponseItemToActionConverter.java | 6 +++++- ...stionnaireResponseItemToObservationConverter.java | 9 +++++++-- src/main/resources/messages/messages.properties | 2 ++ 10 files changed, 62 insertions(+), 17 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConditionToObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConditionToObservationConverter.java index 231dff077..28270d56f 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConditionToObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConditionToObservationConverter.java @@ -5,6 +5,7 @@ import org.hl7.fhir.r4.model.DiagnosticReport; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.context.support.MessageSourceAccessor; import org.springframework.lang.NonNull; import java.lang.reflect.InvocationTargetException; @@ -15,6 +16,8 @@ public abstract class ConditionToObservationConverter<E extends EntryEntity> ext private static final Logger LOG = LoggerFactory.getLogger(ConditionToObservationConverter.class); + private MessageSourceAccessor messages; + @Override public E convert(@NonNull Condition resource) { E entryEntity = super.convert(resource); @@ -32,7 +35,7 @@ public void invokeSetTimeValue(E entryEntity, Condition resource){ Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, TimeConverter.convertConditionTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method, error: " + exception.toString()); + LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); } catch (NoSuchMethodException ignored){ //ignored } @@ -43,7 +46,8 @@ public void invokeOriginValue(E entryEntity, Condition resource){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertConditionTime(resource)); } catch ( IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method, error: " + exception.toString()); + LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); + }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/DiagnosticReportToObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/DiagnosticReportToObservationConverter.java index 7d02cefb0..43e65f1a9 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/DiagnosticReportToObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/DiagnosticReportToObservationConverter.java @@ -5,6 +5,7 @@ import org.hl7.fhir.r4.model.Observation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.context.support.MessageSourceAccessor; import org.springframework.lang.NonNull; import java.lang.reflect.InvocationTargetException; @@ -15,6 +16,8 @@ public abstract class DiagnosticReportToObservationConverter<E extends EntryEnti private static final Logger LOG = LoggerFactory.getLogger(DiagnosticReportToObservationConverter.class); + private MessageSourceAccessor messages; + @Override public E convert(@NonNull DiagnosticReport resource) { E entryEntity = super.convert(resource); @@ -32,7 +35,8 @@ public void invokeSetTimeValue(E entryEntity, DiagnosticReport resource){ Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, TimeConverter.convertDiagnosticReportTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method, error: " + exception.toString()); + LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); + } catch (NoSuchMethodException ignored){ //ignored } @@ -43,7 +47,8 @@ public void invokeOriginValue(E entryEntity, DiagnosticReport resource){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertDiagnosticReportTime(resource)); } catch ( IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method, error: " + exception.toString()); + LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); + }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java index cdc7d1ae3..da30e4c14 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java @@ -4,6 +4,7 @@ import org.hl7.fhir.r4.model.Encounter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.context.support.MessageSourceAccessor; import org.springframework.lang.NonNull; import org.ehrbase.fhirbridge.fhir.support.Encounters; import java.lang.reflect.InvocationTargetException; @@ -14,6 +15,8 @@ public abstract class EncounterToAdminEntryConverter <E extends EntryEntity> ext private static final Logger LOG = LoggerFactory.getLogger(EncounterToAdminEntryConverter.class); + private MessageSourceAccessor messages; + @Override public E convert(@NonNull Encounter resource) { E entryEntity = super.convert(resource); @@ -48,7 +51,8 @@ public void invokeSetBeginEndValue(E entryEntity, Encounter resource){ setEndValue.invoke(entryEntity, TimeConverter.convertEncounterLocationEndTime(location).get()); } } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method, error: " + exception.toString()); + LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); + } catch (NoSuchMethodException ignored){ //ignored } @@ -59,7 +63,8 @@ public void invokeSetAufnahmeValue(E entryEntity, Encounter resource) { Method setDatumUhrzeitDerAufnahmeValue = entryEntity.getClass().getMethod("setDatumUhrzeitDerAufnahmeValue", TemporalAccessor.class); setDatumUhrzeitDerAufnahmeValue.invoke(entryEntity, TimeConverter.convertEncounterTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method, error: " + exception.toString()); + LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); + } catch (NoSuchMethodException ignored){ //ignored } @@ -74,7 +79,8 @@ public void invokeSetEntlassungValue(E entryEntity, Encounter resource) { } } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method, error: " + exception.toString()); + LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); + } catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToActionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToActionConverter.java index 051e702bd..46ff57f3a 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToActionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToActionConverter.java @@ -5,6 +5,7 @@ import org.hl7.fhir.r4.model.Observation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.context.support.MessageSourceAccessor; import org.springframework.lang.NonNull; import java.lang.reflect.InvocationTargetException; @@ -15,6 +16,8 @@ public abstract class ImmunizationToActionConverter<E extends EntryEntity> exten private static final Logger LOG = LoggerFactory.getLogger(ImmunizationToActionConverter.class); + private MessageSourceAccessor messages; + @Override public E convert(@NonNull Immunization resource) { E entryEntity = super.convert(resource); @@ -27,7 +30,8 @@ protected void invokeTimeValues(E entryEntity, Immunization resource){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertImmunizationTime(resource)); } catch ( IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method, error: " + exception.toString()); + LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); + }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/MedicationStatementToObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/MedicationStatementToObservationConverter.java index 7c7a8f961..6e4e38ec4 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/MedicationStatementToObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/MedicationStatementToObservationConverter.java @@ -4,6 +4,7 @@ import org.hl7.fhir.r4.model.MedicationStatement; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.context.support.MessageSourceAccessor; import org.springframework.lang.NonNull; import java.lang.reflect.InvocationTargetException; @@ -14,6 +15,8 @@ public abstract class MedicationStatementToObservationConverter<E extends EntryE private static final Logger LOG = LoggerFactory.getLogger(MedicationStatementToObservationConverter.class); + private MessageSourceAccessor messages; + @Override public E convert(@NonNull MedicationStatement resource) { E entryEntity = super.convert(resource); @@ -31,7 +34,8 @@ public void invokeSetTimeValue(E entryEntity, MedicationStatement resource){ Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, TimeConverter.convertMedicationStatmentTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method, error: " + exception.toString()); + LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); + } catch (NoSuchMethodException ignored){ //ignored } @@ -42,7 +46,8 @@ public void invokeOriginValue(E entryEntity, MedicationStatement resource){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertMedicationStatmentTime(resource)); } catch ( IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method, error: " + exception.toString()); + LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); + }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ObservationToObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ObservationToObservationConverter.java index 31817723b..a86a5da92 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ObservationToObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ObservationToObservationConverter.java @@ -4,6 +4,7 @@ import org.hl7.fhir.r4.model.Observation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.context.support.MessageSourceAccessor; import org.springframework.lang.NonNull; import java.lang.reflect.InvocationTargetException; @@ -14,6 +15,8 @@ public abstract class ObservationToObservationConverter<E extends EntryEntity> e private static final Logger LOG = LoggerFactory.getLogger(ObservationToObservationConverter.class); + private MessageSourceAccessor messages; + @Override public E convert(@NonNull Observation resource) { E entryEntity = super.convert(resource); @@ -31,7 +34,8 @@ public void invokeSetTimeValue(E entryEntity, Observation resource){ Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, TimeConverter.convertObservationTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method, error: " + exception.toString()); + LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); + } catch (NoSuchMethodException ignored){ //ignored } @@ -42,7 +46,8 @@ public void invokeOriginValue(E entryEntity, Observation resource){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertObservationTime(resource)); } catch ( IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method, error: " + exception.toString()); + LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); + }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ProcedureToProcedureActionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ProcedureToProcedureActionConverter.java index 9d178ae58..3ca318deb 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ProcedureToProcedureActionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ProcedureToProcedureActionConverter.java @@ -4,6 +4,7 @@ import org.hl7.fhir.r4.model.Procedure; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.context.support.MessageSourceAccessor; import org.springframework.lang.NonNull; import java.lang.reflect.InvocationTargetException; @@ -14,6 +15,8 @@ public abstract class ProcedureToProcedureActionConverter<E extends EntryEntity> private static final Logger LOG = LoggerFactory.getLogger(ProcedureToProcedureActionConverter.class); + private MessageSourceAccessor messages; + @Override public E convert(@NonNull Procedure resource) { E entryEntity = super.convert(resource); @@ -31,7 +34,8 @@ public void invokeSetTimeValue(E entryEntity, Procedure resource) { Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, TimeConverter.convertProcedureTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method, error: " + exception.toString()); + LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); + } catch (NoSuchMethodException ignored) { //ignored } @@ -42,7 +46,8 @@ public void invokeOriginValue(E entryEntity, Procedure resource) { Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertProcedureTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method, error: " + exception.toString()); + LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); + } catch (NoSuchMethodException ignored) { //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToActionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToActionConverter.java index 9b9d67708..02aaf4c6e 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToActionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToActionConverter.java @@ -5,6 +5,7 @@ import org.hl7.fhir.r4.model.QuestionnaireResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.context.support.MessageSourceAccessor; import org.springframework.lang.NonNull; import java.lang.reflect.InvocationTargetException; @@ -15,6 +16,8 @@ public abstract class QuestionnaireResponseItemToActionConverter<E extends Entry private static final Logger LOG = LoggerFactory.getLogger(QuestionnaireResponseItemToActionConverter.class); + private MessageSourceAccessor messages; + @Override public E convert(@NonNull QuestionnaireResponse.QuestionnaireResponseItemComponent questionnaireResponseItemComponent, @NonNull Language language, @NonNull TemporalAccessor authored) { E entryEntity = super.convert(questionnaireResponseItemComponent, language, authored); @@ -27,7 +30,8 @@ protected void invokeTimeValue(E entryEntity, TemporalAccessor authored){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, authored); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method, error: " + exception.toString()); + LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); + } catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToObservationConverter.java index 6b74419e0..b580d6f63 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToObservationConverter.java @@ -5,6 +5,7 @@ import org.hl7.fhir.r4.model.QuestionnaireResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.context.support.MessageSourceAccessor; import org.springframework.lang.NonNull; import java.lang.reflect.InvocationTargetException; @@ -15,6 +16,8 @@ public abstract class QuestionnaireResponseItemToObservationConverter<E extends private static final Logger LOG = LoggerFactory.getLogger(QuestionnaireResponseItemToObservationConverter.class); + private MessageSourceAccessor messages; + @Override public E convert(@NonNull QuestionnaireResponse.QuestionnaireResponseItemComponent questionnaireResponseItemComponent, @NonNull Language language,@NonNull TemporalAccessor authored) { E entryEntity = super.convert(questionnaireResponseItemComponent, language, authored); @@ -32,7 +35,8 @@ public void invokeSetTimeValue(E entryEntity, TemporalAccessor authored) { Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, authored); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method, error: " + exception.toString()); + LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); + } catch (NoSuchMethodException ignored){ //ignored } @@ -43,7 +47,8 @@ public void invokeOriginValue(E entryEntity, TemporalAccessor authored) { Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, authored); } catch ( IllegalAccessException | InvocationTargetException exception) { - LOG.error("Exception occured when invoking method, error: " + exception.toString()); + LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); + }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/resources/messages/messages.properties b/src/main/resources/messages/messages.properties index e37e678fc..1bc461cd3 100644 --- a/src/main/resources/messages/messages.properties +++ b/src/main/resources/messages/messages.properties @@ -12,3 +12,5 @@ validation.terminology.expand=The code {0} was not found using the expand operat validation.terminology.lookup=The code {0} was not found in the code system {1} ehrbase.wrongStatusCode=HTTP status ''{0} {1}'' was returned by EHRbase while trying to save the composition. Details: {2} + +fhir-bridge.invokeError=Exception occurred when invoking method, error: {0} From 9a81ba887ad6f4ef2a60f28a8bea97fb116bde28 Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Mon, 5 Jul 2021 16:43:00 +0200 Subject: [PATCH 131/141] fixed messages to enum --- .../ehr/converter/LoggerMessages.java | 17 +++++++++++++++++ .../ConditionToObservationConverter.java | 8 +++----- .../DiagnosticReportToObservationConverter.java | 9 +++------ .../generic/EncounterToAdminEntryConverter.java | 12 ++++-------- .../generic/ImmunizationToActionConverter.java | 6 ++---- ...dicationStatementToObservationConverter.java | 9 +++------ .../ObservationToObservationConverter.java | 9 +++------ .../ProcedureToProcedureActionConverter.java | 9 +++------ ...stionnaireResponseItemToActionConverter.java | 6 ++---- ...naireResponseItemToObservationConverter.java | 9 +++------ src/main/resources/messages/messages.properties | 1 - 11 files changed, 43 insertions(+), 52 deletions(-) create mode 100644 src/main/java/org/ehrbase/fhirbridge/ehr/converter/LoggerMessages.java diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/LoggerMessages.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/LoggerMessages.java new file mode 100644 index 000000000..91c086683 --- /dev/null +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/LoggerMessages.java @@ -0,0 +1,17 @@ +package org.ehrbase.fhirbridge.ehr.converter; + +public enum LoggerMessages { + + INVOKE_EXCEPTION ("Exception occurred when invoking method, error: "); + + private String errorMessage; + + LoggerMessages(String errorMessage) { + this.errorMessage = errorMessage; + } + + public static String printInvokeError(Exception exception){ + return INVOKE_EXCEPTION.errorMessage + exception.toString(); + } + +} diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConditionToObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConditionToObservationConverter.java index 28270d56f..753c4e4b4 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConditionToObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ConditionToObservationConverter.java @@ -1,6 +1,7 @@ package org.ehrbase.fhirbridge.ehr.converter.generic; import org.ehrbase.client.classgenerator.interfaces.EntryEntity; +import org.ehrbase.fhirbridge.ehr.converter.LoggerMessages; import org.hl7.fhir.r4.model.Condition; import org.hl7.fhir.r4.model.DiagnosticReport; import org.slf4j.Logger; @@ -16,8 +17,6 @@ public abstract class ConditionToObservationConverter<E extends EntryEntity> ext private static final Logger LOG = LoggerFactory.getLogger(ConditionToObservationConverter.class); - private MessageSourceAccessor messages; - @Override public E convert(@NonNull Condition resource) { E entryEntity = super.convert(resource); @@ -35,7 +34,7 @@ public void invokeSetTimeValue(E entryEntity, Condition resource){ Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, TimeConverter.convertConditionTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); + LOG.error(LoggerMessages.printInvokeError(exception)); } catch (NoSuchMethodException ignored){ //ignored } @@ -46,8 +45,7 @@ public void invokeOriginValue(E entryEntity, Condition resource){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertConditionTime(resource)); } catch ( IllegalAccessException | InvocationTargetException exception) { - LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); - + LOG.error(LoggerMessages.printInvokeError(exception)); }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/DiagnosticReportToObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/DiagnosticReportToObservationConverter.java index 43e65f1a9..00ea3b962 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/DiagnosticReportToObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/DiagnosticReportToObservationConverter.java @@ -1,6 +1,7 @@ package org.ehrbase.fhirbridge.ehr.converter.generic; import org.ehrbase.client.classgenerator.interfaces.EntryEntity; +import org.ehrbase.fhirbridge.ehr.converter.LoggerMessages; import org.hl7.fhir.r4.model.DiagnosticReport; import org.hl7.fhir.r4.model.Observation; import org.slf4j.Logger; @@ -16,8 +17,6 @@ public abstract class DiagnosticReportToObservationConverter<E extends EntryEnti private static final Logger LOG = LoggerFactory.getLogger(DiagnosticReportToObservationConverter.class); - private MessageSourceAccessor messages; - @Override public E convert(@NonNull DiagnosticReport resource) { E entryEntity = super.convert(resource); @@ -35,8 +34,7 @@ public void invokeSetTimeValue(E entryEntity, DiagnosticReport resource){ Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, TimeConverter.convertDiagnosticReportTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); - + LOG.error(LoggerMessages.printInvokeError(exception)); } catch (NoSuchMethodException ignored){ //ignored } @@ -47,8 +45,7 @@ public void invokeOriginValue(E entryEntity, DiagnosticReport resource){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertDiagnosticReportTime(resource)); } catch ( IllegalAccessException | InvocationTargetException exception) { - LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); - + LOG.error(LoggerMessages.printInvokeError(exception)); }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java index da30e4c14..b6a0118eb 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/EncounterToAdminEntryConverter.java @@ -1,6 +1,7 @@ package org.ehrbase.fhirbridge.ehr.converter.generic; import org.ehrbase.client.classgenerator.interfaces.EntryEntity; +import org.ehrbase.fhirbridge.ehr.converter.LoggerMessages; import org.hl7.fhir.r4.model.Encounter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -15,8 +16,6 @@ public abstract class EncounterToAdminEntryConverter <E extends EntryEntity> ext private static final Logger LOG = LoggerFactory.getLogger(EncounterToAdminEntryConverter.class); - private MessageSourceAccessor messages; - @Override public E convert(@NonNull Encounter resource) { E entryEntity = super.convert(resource); @@ -51,8 +50,7 @@ public void invokeSetBeginEndValue(E entryEntity, Encounter resource){ setEndValue.invoke(entryEntity, TimeConverter.convertEncounterLocationEndTime(location).get()); } } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); - + LOG.error(LoggerMessages.printInvokeError(exception)); } catch (NoSuchMethodException ignored){ //ignored } @@ -63,8 +61,7 @@ public void invokeSetAufnahmeValue(E entryEntity, Encounter resource) { Method setDatumUhrzeitDerAufnahmeValue = entryEntity.getClass().getMethod("setDatumUhrzeitDerAufnahmeValue", TemporalAccessor.class); setDatumUhrzeitDerAufnahmeValue.invoke(entryEntity, TimeConverter.convertEncounterTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); - + LOG.error(LoggerMessages.printInvokeError(exception)); } catch (NoSuchMethodException ignored){ //ignored } @@ -79,8 +76,7 @@ public void invokeSetEntlassungValue(E entryEntity, Encounter resource) { } } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); - + LOG.error(LoggerMessages.printInvokeError(exception)); } catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToActionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToActionConverter.java index 46ff57f3a..1e035be1b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToActionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ImmunizationToActionConverter.java @@ -1,6 +1,7 @@ package org.ehrbase.fhirbridge.ehr.converter.generic; import org.ehrbase.client.classgenerator.interfaces.EntryEntity; +import org.ehrbase.fhirbridge.ehr.converter.LoggerMessages; import org.hl7.fhir.r4.model.Immunization; import org.hl7.fhir.r4.model.Observation; import org.slf4j.Logger; @@ -16,8 +17,6 @@ public abstract class ImmunizationToActionConverter<E extends EntryEntity> exten private static final Logger LOG = LoggerFactory.getLogger(ImmunizationToActionConverter.class); - private MessageSourceAccessor messages; - @Override public E convert(@NonNull Immunization resource) { E entryEntity = super.convert(resource); @@ -30,8 +29,7 @@ protected void invokeTimeValues(E entryEntity, Immunization resource){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertImmunizationTime(resource)); } catch ( IllegalAccessException | InvocationTargetException exception) { - LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); - + LOG.error(LoggerMessages.printInvokeError(exception)); }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/MedicationStatementToObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/MedicationStatementToObservationConverter.java index 6e4e38ec4..c995cddf5 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/MedicationStatementToObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/MedicationStatementToObservationConverter.java @@ -1,6 +1,7 @@ package org.ehrbase.fhirbridge.ehr.converter.generic; import org.ehrbase.client.classgenerator.interfaces.EntryEntity; +import org.ehrbase.fhirbridge.ehr.converter.LoggerMessages; import org.hl7.fhir.r4.model.MedicationStatement; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -15,8 +16,6 @@ public abstract class MedicationStatementToObservationConverter<E extends EntryE private static final Logger LOG = LoggerFactory.getLogger(MedicationStatementToObservationConverter.class); - private MessageSourceAccessor messages; - @Override public E convert(@NonNull MedicationStatement resource) { E entryEntity = super.convert(resource); @@ -34,8 +33,7 @@ public void invokeSetTimeValue(E entryEntity, MedicationStatement resource){ Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, TimeConverter.convertMedicationStatmentTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); - + LOG.error(LoggerMessages.printInvokeError(exception)); } catch (NoSuchMethodException ignored){ //ignored } @@ -46,8 +44,7 @@ public void invokeOriginValue(E entryEntity, MedicationStatement resource){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertMedicationStatmentTime(resource)); } catch ( IllegalAccessException | InvocationTargetException exception) { - LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); - + LOG.error(LoggerMessages.printInvokeError(exception)); }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ObservationToObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ObservationToObservationConverter.java index a86a5da92..f54f16f07 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ObservationToObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ObservationToObservationConverter.java @@ -1,6 +1,7 @@ package org.ehrbase.fhirbridge.ehr.converter.generic; import org.ehrbase.client.classgenerator.interfaces.EntryEntity; +import org.ehrbase.fhirbridge.ehr.converter.LoggerMessages; import org.hl7.fhir.r4.model.Observation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -15,8 +16,6 @@ public abstract class ObservationToObservationConverter<E extends EntryEntity> e private static final Logger LOG = LoggerFactory.getLogger(ObservationToObservationConverter.class); - private MessageSourceAccessor messages; - @Override public E convert(@NonNull Observation resource) { E entryEntity = super.convert(resource); @@ -34,8 +33,7 @@ public void invokeSetTimeValue(E entryEntity, Observation resource){ Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, TimeConverter.convertObservationTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); - + LOG.error(LoggerMessages.printInvokeError(exception)); } catch (NoSuchMethodException ignored){ //ignored } @@ -46,8 +44,7 @@ public void invokeOriginValue(E entryEntity, Observation resource){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertObservationTime(resource)); } catch ( IllegalAccessException | InvocationTargetException exception) { - LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); - + LOG.error(LoggerMessages.printInvokeError(exception)); }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ProcedureToProcedureActionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ProcedureToProcedureActionConverter.java index 3ca318deb..5ab3ad141 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ProcedureToProcedureActionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/ProcedureToProcedureActionConverter.java @@ -1,6 +1,7 @@ package org.ehrbase.fhirbridge.ehr.converter.generic; import org.ehrbase.client.classgenerator.interfaces.EntryEntity; +import org.ehrbase.fhirbridge.ehr.converter.LoggerMessages; import org.hl7.fhir.r4.model.Procedure; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -15,8 +16,6 @@ public abstract class ProcedureToProcedureActionConverter<E extends EntryEntity> private static final Logger LOG = LoggerFactory.getLogger(ProcedureToProcedureActionConverter.class); - private MessageSourceAccessor messages; - @Override public E convert(@NonNull Procedure resource) { E entryEntity = super.convert(resource); @@ -34,8 +33,7 @@ public void invokeSetTimeValue(E entryEntity, Procedure resource) { Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, TimeConverter.convertProcedureTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); - + LOG.error(LoggerMessages.printInvokeError(exception)); } catch (NoSuchMethodException ignored) { //ignored } @@ -46,8 +44,7 @@ public void invokeOriginValue(E entryEntity, Procedure resource) { Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, TimeConverter.convertProcedureTime(resource)); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); - + LOG.error(LoggerMessages.printInvokeError(exception)); } catch (NoSuchMethodException ignored) { //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToActionConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToActionConverter.java index 02aaf4c6e..e7f245136 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToActionConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToActionConverter.java @@ -2,6 +2,7 @@ import org.ehrbase.client.classgenerator.interfaces.EntryEntity; import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.fhirbridge.ehr.converter.LoggerMessages; import org.hl7.fhir.r4.model.QuestionnaireResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -16,8 +17,6 @@ public abstract class QuestionnaireResponseItemToActionConverter<E extends Entry private static final Logger LOG = LoggerFactory.getLogger(QuestionnaireResponseItemToActionConverter.class); - private MessageSourceAccessor messages; - @Override public E convert(@NonNull QuestionnaireResponse.QuestionnaireResponseItemComponent questionnaireResponseItemComponent, @NonNull Language language, @NonNull TemporalAccessor authored) { E entryEntity = super.convert(questionnaireResponseItemComponent, language, authored); @@ -30,8 +29,7 @@ protected void invokeTimeValue(E entryEntity, TemporalAccessor authored){ Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, authored); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); - + LOG.error(LoggerMessages.printInvokeError(exception)); } catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToObservationConverter.java index b580d6f63..92b5aeaba 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/generic/QuestionnaireResponseItemToObservationConverter.java @@ -2,6 +2,7 @@ import org.ehrbase.client.classgenerator.interfaces.EntryEntity; import org.ehrbase.client.classgenerator.shareddefinition.Language; +import org.ehrbase.fhirbridge.ehr.converter.LoggerMessages; import org.hl7.fhir.r4.model.QuestionnaireResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -16,8 +17,6 @@ public abstract class QuestionnaireResponseItemToObservationConverter<E extends private static final Logger LOG = LoggerFactory.getLogger(QuestionnaireResponseItemToObservationConverter.class); - private MessageSourceAccessor messages; - @Override public E convert(@NonNull QuestionnaireResponse.QuestionnaireResponseItemComponent questionnaireResponseItemComponent, @NonNull Language language,@NonNull TemporalAccessor authored) { E entryEntity = super.convert(questionnaireResponseItemComponent, language, authored); @@ -35,8 +34,7 @@ public void invokeSetTimeValue(E entryEntity, TemporalAccessor authored) { Method setOriginValue = entryEntity.getClass().getMethod("setOriginValue", TemporalAccessor.class); setOriginValue.invoke(entryEntity, authored); } catch (IllegalAccessException | InvocationTargetException exception) { - LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); - + LOG.error(LoggerMessages.printInvokeError(exception)); } catch (NoSuchMethodException ignored){ //ignored } @@ -47,8 +45,7 @@ public void invokeOriginValue(E entryEntity, TemporalAccessor authored) { Method setTimeValue = entryEntity.getClass().getMethod("setTimeValue", TemporalAccessor.class); setTimeValue.invoke(entryEntity, authored); } catch ( IllegalAccessException | InvocationTargetException exception) { - LOG.error(messages.getMessage("fhir-bridge.invokeError", exception.toString())); - + LOG.error(LoggerMessages.printInvokeError(exception)); }catch (NoSuchMethodException ignored){ //ignored } diff --git a/src/main/resources/messages/messages.properties b/src/main/resources/messages/messages.properties index 1bc461cd3..b090711f6 100644 --- a/src/main/resources/messages/messages.properties +++ b/src/main/resources/messages/messages.properties @@ -13,4 +13,3 @@ validation.terminology.lookup=The code {0} was not found in the code system {1} ehrbase.wrongStatusCode=HTTP status ''{0} {1}'' was returned by EHRbase while trying to save the composition. Details: {2} -fhir-bridge.invokeError=Exception occurred when invoking method, error: {0} From 770076230d4e31b40ec632bb311aba49d8a6b6ee Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Mon, 5 Jul 2021 17:31:23 +0200 Subject: [PATCH 132/141] Add javadoc and fix issue with identifier --- .../processor/BundleResponseProcessor.java | 12 ++-- .../processor/DefaultExceptionHandler.java | 36 +++++++++- .../camel/processor/EhrLookupProcessor.java | 22 +++++- .../camel/processor/FhirProfileValidator.java | 37 +++++++++- .../camel/processor/FhirRequestProcessor.java | 9 +++ .../processor/PatientReferenceProcessor.java | 72 +++++++++++++------ .../ProvideResourceAuditHandler.java | 11 ++- .../ProvideResourceResponseProcessor.java | 9 ++- .../ResourcePersistenceProcessor.java | 9 ++- .../camel/route/AbstractRouteBuilder.java | 20 ------ ...monRoutes.java => CommonRouteBuilder.java} | 17 +++-- .../camel/route/ResourceRouteBuilder.java | 28 +++++--- .../camel/route/TransactionRouteBuilder.java | 6 +- 13 files changed, 214 insertions(+), 74 deletions(-) delete mode 100644 src/main/java/org/ehrbase/fhirbridge/camel/route/AbstractRouteBuilder.java rename src/main/java/org/ehrbase/fhirbridge/camel/route/{CommonRoutes.java => CommonRouteBuilder.java} (69%) diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/BundleResponseProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/BundleResponseProcessor.java index 84774662d..fc2964d6b 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/BundleResponseProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/BundleResponseProcessor.java @@ -24,24 +24,24 @@ import org.springframework.stereotype.Component; /** - * Camel {@link Processor} that converts back the persisted resource with contained resources into a Bundle. + * {@link Processor} that transforms a {@link MethodOutcome} in a {@link Bundle} with type + * <code>transaction-response</code>. * * @since 1.0.0 */ @Component(BundleResponseProcessor.BEAN_ID) +@SuppressWarnings("java:S6212") public class BundleResponseProcessor implements Processor { public static final String BEAN_ID = "bundleResponseProcessor"; @Override public void process(Exchange exchange) throws Exception { - MethodOutcome methodOutcome = exchange.getIn().getMandatoryBody(MethodOutcome.class); - + MethodOutcome methodOutcome = exchange.getIn().getBody(MethodOutcome.class); Bundle responseBundle = new Bundle() .setType(Bundle.BundleType.TRANSACTIONRESPONSE) - .addEntry( - new Bundle.BundleEntryComponent() - .setResource((Resource) methodOutcome.getResource())); + .addEntry(new Bundle.BundleEntryComponent() + .setResource((Resource) methodOutcome.getResource())); exchange.getMessage().setBody(responseBundle); } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/DefaultExceptionHandler.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/DefaultExceptionHandler.java index 026fa61aa..16dcf97e1 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/DefaultExceptionHandler.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/DefaultExceptionHandler.java @@ -1,5 +1,22 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.ehrbase.fhirbridge.camel.processor; +import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.apache.camel.Exchange; import org.apache.camel.Processor; @@ -12,9 +29,17 @@ import org.springframework.lang.NonNull; import org.springframework.stereotype.Component; -@Component +/** + * {@link Processor} that handles exceptions thrown by Camel routes. + * + * @since 1.0.0 + */ +@Component(DefaultExceptionHandler.BEAN_ID) +@SuppressWarnings("java:S6212") public class DefaultExceptionHandler implements Processor, MessageSourceAware { + public static final String BEAN_ID = "defaultExceptionHandler"; + private MessageSourceAccessor messages; @Override @@ -25,18 +50,25 @@ public void process(Exchange exchange) { handleWrongStatusCode((WrongStatusCodeException) ex); } else if (ex instanceof ConversionException) { handleConversionException((ConversionException) ex); + } else { + handleException(ex); } } private void handleWrongStatusCode(WrongStatusCodeException ex) { HttpStatus status = HttpStatus.valueOf(ex.getActualStatusCode()); - throw new UnprocessableEntityException(messages.getMessage("ehrbase.wrongStatusCode", new Object[]{status.value(), status.getReasonPhrase(), ex.getMessage()}), ex); + throw new UnprocessableEntityException(messages.getMessage("ehrbase.wrongStatusCode", + new Object[]{status.value(), status.getReasonPhrase(), ex.getMessage()}), ex); } private void handleConversionException(ConversionException ex) { throw new UnprocessableEntityException(ex.getMessage()); } + private void handleException(Exception ex) { + throw new InternalErrorException(ex.getMessage()); + } + @Override public void setMessageSource(@NonNull MessageSource messageSource) { messages = new MessageSourceAccessor(messageSource); diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrLookupProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrLookupProcessor.java index 0964039f5..8bc10e52f 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrLookupProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/EhrLookupProcessor.java @@ -36,10 +36,18 @@ import java.util.UUID; -@Component +/** + * {@link org.apache.camel.Processor Processor} that retrieves the EHR ID of the patient involved in the current + * exchange. If the patient does not have an EHR, a new one is created and the EHR ID is stored in the database. + * + * @since 1.2.0 + */ +@Component(EhrLookupProcessor.BEAN_ID) @SuppressWarnings("java:S6212") public class EhrLookupProcessor implements FhirRequestProcessor { + public static final String BEAN_ID = "ehrLookupProcessor"; + private static final Logger LOG = LoggerFactory.getLogger(EhrLookupProcessor.class); private static final String ARCHETYPE_NODE_ID = "openEHR-EHR-EHR_STATUS.generic.v1"; @@ -64,6 +72,12 @@ public void process(Exchange exchange) throws Exception { exchange.getMessage().setHeader(CompositionConstants.EHR_ID, ehrId); } + /** + * Gets the current patient ID. + * + * @param exchange the current exchange + * @return the patient ID + */ private String getPatientId(Exchange exchange) { Resource resource = exchange.getIn().getBody(Resource.class); @@ -74,6 +88,12 @@ private String getPatientId(Exchange exchange) { } } + /** + * Creates an EHR for the given patient ID. + * + * @param patientId the given patient ID + * @return the EHR ID + */ private UUID createEhr(String patientId) { PartySelf subject = new PartySelf(new PartyRef(new HierObjectId(patientId), "DEMOGRAPHIC", "PERSON")); EhrStatus ehrStatus = new EhrStatus(ARCHETYPE_NODE_ID, new DvText("EHR Status"), subject, true, true, null); diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirProfileValidator.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirProfileValidator.java index eb7de3999..b2cf5aee5 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirProfileValidator.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirProfileValidator.java @@ -1,3 +1,19 @@ +/* + * Copyright 2020-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.ehrbase.fhirbridge.camel.processor; import ca.uhn.fhir.context.FhirContext; @@ -23,10 +39,17 @@ import java.util.List; import java.util.Set; -@Component +/** + * {@link Processor} that validates if the profile is supported by the submitted resource and the application. + * + * @since 1.0.0 + */ +@Component(FhirProfileValidator.BEAN_ID) @SuppressWarnings("java:S6212") public class FhirProfileValidator implements Processor, MessageSourceAware { + public static final String BEAN_ID = "fhirProfileValidator"; + private static final Logger LOG = LoggerFactory.getLogger(FhirProfileValidator.class); private final FhirContext fhirContext; @@ -52,6 +75,12 @@ public void process(Exchange exchange) { LOG.info("{} resource validated", resource.getResourceType()); } + /** + * Validates if the default profile is supported by the resource. + * + * @param resource the submitted resource + * @param exchange the current exchange + */ private void validateDefault(Resource resource, Exchange exchange) { Class<? extends Resource> clazz = resource.getClass(); Profile profile = Profile.getDefaultProfile(clazz); @@ -68,6 +97,12 @@ private void validateDefault(Resource resource, Exchange exchange) { exchange.getMessage().setHeader(CamelConstants.PROFILE, profile); } + /** + * Validates the profiles for the given resource. + * + * @param resource the submitted resource + * @param exchange the current exchange + */ private void validateProfiles(Resource resource, Exchange exchange) { Set<Profile> supportedProfiles = Profile.resolveAll(resource); Class<? extends Resource> resourceType = resource.getClass(); diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirRequestProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirRequestProcessor.java index 64263b73d..051bced71 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirRequestProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/FhirRequestProcessor.java @@ -22,8 +22,17 @@ import org.apache.camel.util.ObjectHelper; import org.openehealth.ipf.commons.ihe.fhir.Constants; +/** + * @since 1.2.0 + */ public interface FhirRequestProcessor extends Processor { + /** + * Returns the current request details. + * + * @param exchange the current exchange + * @return the request details + */ default RequestDetails getRequestDetails(Exchange exchange) { if (ObjectHelper.isEmpty(exchange.getIn().getHeader(Constants.FHIR_REQUEST_DETAILS))) { throw new IllegalArgumentException("RequestDetails must not be null"); diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/PatientReferenceProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/PatientReferenceProcessor.java index 9b12683ba..744592843 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/PatientReferenceProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/PatientReferenceProcessor.java @@ -39,10 +39,18 @@ import java.util.List; import java.util.Set; -@Component +/** + * {@link org.apache.camel.Processor Processor} that retrieves the patient associated to the submitted resource. + * If no patient is found, a new one is created. + * + * @since 1.2.0 + */ +@Component(PatientReferenceProcessor.BEAN_ID) @SuppressWarnings("java:S6212") public class PatientReferenceProcessor implements FhirRequestProcessor { + public static final String BEAN_ID = "patientReferenceProcessor"; + private static final Logger LOG = LoggerFactory.getLogger(PatientReferenceProcessor.class); private final IFhirResourceDao<Patient> patientDao; @@ -58,36 +66,60 @@ public void process(Exchange exchange) throws Exception { if (!Resources.isPatient(resource)) { Reference subject = Resources.getSubject(resource) - .orElseThrow(() -> new UnprocessableEntityException("Resource should have one patient")); + .orElseThrow(() -> new UnprocessableEntityException(requestDetails.getResourceName() + " should be linked to a subject/patient")); IIdType patientId; if (subject.hasReference()) { patientId = subject.getReferenceElement(); + } else if (subject.hasIdentifier() && subject.getIdentifier().hasSystem() && subject.getIdentifier().hasValue()) { + patientId = handleSubjectIdentifier(subject, requestDetails); } else { - Identifier identifier = subject.getIdentifier(); - SearchParameterMap parameters = new SearchParameterMap(); - parameters.add(Patient.SP_IDENTIFIER, new TokenParam(identifier.getSystem(), identifier.getValue())); - Set<ResourcePersistentId> ids = patientDao.searchForIds(parameters, requestDetails); - - if (ids.isEmpty()) { - patientId = createPatient(identifier, requestDetails); - } else if (ids.size() == 1) { - IBundleProvider bundleProvider = patientDao.search(parameters, requestDetails); - List<IBaseResource> result = bundleProvider.getResources(0, 1); - Patient patient = (Patient) result.get(0); - patientId = patient.getIdElement(); - LOG.debug("Resolved existing Patient: id={}", patientId); - } else { - throw new UnprocessableEntityException("More than one patient"); - } - - subject.setReferenceElement(patientId); + throw new UnprocessableEntityException("Subject identifier is required"); } exchange.getIn().setHeader(CamelConstants.PATIENT_ID, patientId.getIdPart()); } } + /** + * Retrieves the patient ID corresponding the given subject. If there is no matching {@link Patient} exist, + * a new one is created. + * + * @param subject the current subject + * @param requestDetails the current request details + * @return the patient ID + */ + private IIdType handleSubjectIdentifier(Reference subject, RequestDetails requestDetails) { + Identifier identifier = subject.getIdentifier(); + SearchParameterMap parameters = new SearchParameterMap(); + parameters.add(Patient.SP_IDENTIFIER, new TokenParam(identifier.getSystem(), identifier.getValue())); + Set<ResourcePersistentId> ids = patientDao.searchForIds(parameters, requestDetails); + + IIdType patientId; + if (ids.isEmpty()) { + patientId = createPatient(identifier, requestDetails); + } else if (ids.size() == 1) { + IBundleProvider bundleProvider = patientDao.search(parameters, requestDetails); + List<IBaseResource> result = bundleProvider.getResources(0, 1); + Patient patient = (Patient) result.get(0); + patientId = patient.getIdElement(); + LOG.debug("Resolved existing Patient: id={}", patientId); + } else { + throw new UnprocessableEntityException("More than one patient"); + } + + subject.setReferenceElement(patientId); + + return patientId; + } + + /** + * Creates a new dummy patient with the given identifier system and value. + * + * @param identifier the identifier of the new patient. + * @param requestDetails the current request details + * @return the patient ID + */ private IIdType createPatient(Identifier identifier, RequestDetails requestDetails) { IIdType id = patientDao.create(new Patient().addIdentifier(identifier), requestDetails).getId(); LOG.debug("Created Patient: id={}", id); diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceAuditHandler.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceAuditHandler.java index f11a09c4c..952410d88 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceAuditHandler.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceAuditHandler.java @@ -16,9 +16,18 @@ import java.util.Date; -@Component +/** + * {@link Processor} that registers an {@link AuditEvent} in the database for each "Provide [resource type]" + * transaction. + * + * @since 1.0.0 + */ +@Component(ProvideResourceAuditHandler.BEAN_ID) +@SuppressWarnings("java:S6212") public class ProvideResourceAuditHandler implements Processor { + public static final String BEAN_ID = "provideResourceAuditHandler"; + private final IFhirResourceDao<AuditEvent> auditEventDao; @Value("${spring.application.name}") diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java index 5ca81437b..00c8dcca8 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ProvideResourceResponseProcessor.java @@ -27,10 +27,17 @@ import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; -@Component +/** + * {@link Processor} that stores the link between the FHIR resource and the openEHR composition. + * + * @since 1.0.0 + */ +@Component(ProvideResourceResponseProcessor.BEAN_ID) @SuppressWarnings("java:S6212") public class ProvideResourceResponseProcessor implements Processor { + public static final String BEAN_ID = "provideResourceResponseProcessor"; + private static final Logger LOG = LoggerFactory.getLogger(ProvideResourceResponseProcessor.class); private final ResourceCompositionRepository resourceCompositionRepository; diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourcePersistenceProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourcePersistenceProcessor.java index db57b0af9..723551d1d 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourcePersistenceProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/ResourcePersistenceProcessor.java @@ -35,10 +35,17 @@ import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; -@Component +/** + * {@link org.apache.camel.Processor Processor} that handles FHIR operations using DAOs from HAPI FHIR JPA module. + * + * @since 1.2.0 + */ +@Component(ResourcePersistenceProcessor.BEAN_ID) @SuppressWarnings({"java:S6212", "rawtypes", "unchecked"}) public class ResourcePersistenceProcessor implements FhirRequestProcessor { + public static final String BEAN_ID = "resourcePersistenceProcessor"; + private static final Logger LOG = LoggerFactory.getLogger(ResourcePersistenceProcessor.class); private final DaoRegistry daoRegistry; diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/AbstractRouteBuilder.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/AbstractRouteBuilder.java deleted file mode 100644 index fd98db993..000000000 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/AbstractRouteBuilder.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.ehrbase.fhirbridge.camel.route; - -import org.apache.camel.builder.RouteBuilder; -import org.springframework.beans.factory.annotation.Value; - -public abstract class AbstractRouteBuilder extends RouteBuilder { - - @Value("${fhir-bridge.debug.enabled:false}") - private boolean debug; - - @Override - public void configure() throws Exception { - errorHandler(defaultErrorHandler() - .logStackTrace(debug) - .logExhaustedMessageHistory(debug)); - - onException(Exception.class) - .process("defaultExceptionHandler"); - } -} diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRouteBuilder.java similarity index 69% rename from src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java rename to src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRouteBuilder.java index 23b36ef18..ac79cf046 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRoutes.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/CommonRouteBuilder.java @@ -6,10 +6,15 @@ import org.ehrbase.client.classgenerator.interfaces.CompositionEntity; import org.ehrbase.client.openehrclient.VersionUid; import org.ehrbase.fhirbridge.camel.CamelConstants; +import org.ehrbase.fhirbridge.camel.processor.EhrLookupProcessor; +import org.ehrbase.fhirbridge.camel.processor.FhirProfileValidator; +import org.ehrbase.fhirbridge.camel.processor.PatientReferenceProcessor; +import org.ehrbase.fhirbridge.camel.processor.ProvideResourceAuditHandler; +import org.ehrbase.fhirbridge.camel.processor.ResourcePersistenceProcessor; import org.springframework.stereotype.Component; @Component -public class CommonRoutes extends RouteBuilder { +public class CommonRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception { @@ -19,12 +24,12 @@ public void configure() throws Exception { from("direct:provideResource") .routeId("provideResourceRoute") .onCompletion() - .process("provideResourceAuditHandler") + .process(ProvideResourceAuditHandler.BEAN_ID) .end() - .process("fhirProfileValidator") - .process("patientReferenceProcessor") - .process("resourcePersistenceProcessor") - .process("ehrLookupProcessor") + .process(FhirProfileValidator.BEAN_ID) + .process(PatientReferenceProcessor.BEAN_ID) + .process(ResourcePersistenceProcessor.BEAN_ID) + .process(EhrLookupProcessor.BEAN_ID) .doTry() .to("bean:fhirResourceConversionService?method=convert(${headers.CamelFhirBridgeProfile}, ${body})") .process(exchange -> { diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/ResourceRouteBuilder.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/ResourceRouteBuilder.java index 1f8e80bfa..4fcd1c88f 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/ResourceRouteBuilder.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/ResourceRouteBuilder.java @@ -17,9 +17,15 @@ package org.ehrbase.fhirbridge.camel.route; import org.apache.camel.builder.RouteBuilder; +import org.ehrbase.fhirbridge.camel.processor.ResourcePersistenceProcessor; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; +/** + * {@link RouteBuilder} implementation that configures the routes for FHIR resources. + * + * @since 1.2.0 + */ @Component @SuppressWarnings("java:S1192") public class ResourceRouteBuilder extends RouteBuilder { @@ -54,7 +60,7 @@ public void configure() throws Exception { */ private void configureAuditEvent() { from("audit-event-find:auditEventEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") - .process("resourcePersistenceProcessor"); + .process(ResourcePersistenceProcessor.BEAN_ID); } /** @@ -65,7 +71,7 @@ private void configureCondition() { .to("direct:provideResource"); from("condition-find:conditionEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") - .process("resourcePersistenceProcessor"); + .process(ResourcePersistenceProcessor.BEAN_ID); } /** @@ -76,7 +82,7 @@ private void configureConsent() { .throwException(UnsupportedOperationException.class, "Not yet implemented"); from("consent-find:consentEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") - .process("resourcePersistenceProcessor"); + .process(ResourcePersistenceProcessor.BEAN_ID); } /** @@ -87,7 +93,7 @@ private void configureDiagnosticReport() { .to("direct:provideResource"); from("diagnostic-report-find:diagnosticReportEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") - .process("resourcePersistenceProcessor"); + .process(ResourcePersistenceProcessor.BEAN_ID); } /** @@ -98,7 +104,7 @@ private void configureEncounter() { .to("direct:provideResource"); from("encounter-find:encounterEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") - .process("resourcePersistenceProcessor"); + .process(ResourcePersistenceProcessor.BEAN_ID); } /** @@ -109,7 +115,7 @@ private void configureImmunization() { .to("direct:provideResource"); from("immunization-find:immunizationEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") - .process("resourcePersistenceProcessor"); + .process(ResourcePersistenceProcessor.BEAN_ID); } /** @@ -120,7 +126,7 @@ private void configureMedicationStatement() { .to("direct:provideResource"); from("medication-statement-find:medicationStatementEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") - .process("resourcePersistenceProcessor"); + .process(ResourcePersistenceProcessor.BEAN_ID); } /** @@ -131,7 +137,7 @@ private void configureObservation() { .to("direct:provideResource"); from("observation-find:observationEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") - .process("resourcePersistenceProcessor"); + .process(ResourcePersistenceProcessor.BEAN_ID); } /** @@ -142,7 +148,7 @@ private void configurePatient() { .to("direct:provideResource"); from("patient-find:patientEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") - .process("resourcePersistenceProcessor"); + .process(ResourcePersistenceProcessor.BEAN_ID); } /** @@ -153,7 +159,7 @@ private void configureProcedure() { .to("direct:provideResource"); from("procedure-find:procedureEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") - .process("resourcePersistenceProcessor"); + .process(ResourcePersistenceProcessor.BEAN_ID); } /** @@ -165,6 +171,6 @@ private void configureQuestionnaireResponse() { .to("direct:provideResource"); from("questionnaire-response-find:questionnaireResponseEndpoint?fhirContext=#fhirContext&lazyLoadBundles=true") - .process("resourcePersistenceProcessor"); + .process(ResourcePersistenceProcessor.BEAN_ID); } } diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/route/TransactionRouteBuilder.java b/src/main/java/org/ehrbase/fhirbridge/camel/route/TransactionRouteBuilder.java index 1b37e9a41..06c950b37 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/route/TransactionRouteBuilder.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/route/TransactionRouteBuilder.java @@ -31,19 +31,17 @@ import org.springframework.stereotype.Component; /** - * Implementation of {@link RouteBuilder} that provides route definitions for transactions - * linked to {@link org.hl7.fhir.r4.model.Bundle Bundle} resource. + * Implementation of {@link RouteBuilder} that configures the route definitions for transaction. * * @since 1.0.0 */ @Component @SuppressWarnings("java:S1192") -public class TransactionRouteBuilder extends AbstractRouteBuilder { +public class TransactionRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception { // @formatter:off - super.configure(); from("bundle-provide:consumer?fhirContext=#fhirContext") .setHeader(CamelConstants.PROFILE, method(Bundles.class, "getTransactionProfile")) From 0860482221207aece05826c24b7ba4fc5cbaea87 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Mon, 5 Jul 2021 18:49:59 +0200 Subject: [PATCH 133/141] Fix Sonar issue: CognitiveComplexity --- .../camel/processor/PatientReferenceProcessor.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/camel/processor/PatientReferenceProcessor.java b/src/main/java/org/ehrbase/fhirbridge/camel/processor/PatientReferenceProcessor.java index 744592843..9d79281e0 100644 --- a/src/main/java/org/ehrbase/fhirbridge/camel/processor/PatientReferenceProcessor.java +++ b/src/main/java/org/ehrbase/fhirbridge/camel/processor/PatientReferenceProcessor.java @@ -71,7 +71,7 @@ public void process(Exchange exchange) throws Exception { IIdType patientId; if (subject.hasReference()) { patientId = subject.getReferenceElement(); - } else if (subject.hasIdentifier() && subject.getIdentifier().hasSystem() && subject.getIdentifier().hasValue()) { + } else if (hasIdentifier(subject)) { patientId = handleSubjectIdentifier(subject, requestDetails); } else { throw new UnprocessableEntityException("Subject identifier is required"); @@ -125,4 +125,10 @@ private IIdType createPatient(Identifier identifier, RequestDetails requestDetai LOG.debug("Created Patient: id={}", id); return id; } + + private boolean hasIdentifier(Reference subject) { + return subject.hasIdentifier() && + subject.getIdentifier().hasSystem() && + subject.getIdentifier().hasValue(); + } } From 226390c1257e91c8dc353d4f5dbbb0edafc3685b Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 6 Jul 2021 13:29:00 +0200 Subject: [PATCH 134/141] Bugfix ArrayIndexOutOfBoundsException in PCRObservationConverter --- .../PCRObservationConverter.java | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccovirologischerbefund/PCRObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccovirologischerbefund/PCRObservationConverter.java index e406c05e1..80c96e38c 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccovirologischerbefund/PCRObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccovirologischerbefund/PCRObservationConverter.java @@ -10,33 +10,45 @@ import org.ehrbase.fhirbridge.ehr.opt.geccovirologischerbefundcomposition.definition.NachweisDefiningCode; import org.ehrbase.fhirbridge.ehr.opt.geccovirologischerbefundcomposition.definition.ProAnalytCluster; import org.ehrbase.fhirbridge.ehr.opt.geccovirologischerbefundcomposition.definition.VirusnachweistestDefiningCode; +import org.hl7.fhir.r4.model.Identifier; import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.r4.model.Reference; import java.util.ArrayList; import java.util.List; +@SuppressWarnings("java:S6212") public class PCRObservationConverter extends ObservationToObservationConverter<BefundObservation> { @Override protected BefundObservation convertInternal(Observation resource) { BefundObservation befundObservation = new BefundObservation(); - befundObservation.setFeederAudit(createIdentifierSection(resource)); befundObservation.setLabortestBezeichnungDefiningCode(LabortestBezeichnungDefiningCode.DETECTION_OF_VIRUS_PROCEDURE); befundObservation.setLabortestPanel(createLabortestPanel(resource)); + + if (resource.hasIdentifier()) { + befundObservation.setFeederAudit(createIdentifierSection(resource)); + } return befundObservation; } private FeederAudit createIdentifierSection(Observation observation) { FeederAudit feederAudit = new FeederAudit(); List<DvIdentifier> identifierList = new ArrayList<>(); - com.nedap.archie.rm.datavalues.DvIdentifier e = new com.nedap.archie.rm.datavalues.DvIdentifier(); - e.setAssigner(observation.getIdentifier().get(0).getAssigner().getReference()); - e.setType(observation.getIdentifier().get(0).getType().toString().split("@")[0]); - e.setId(observation.getIdentifier().get(0).getValue()); + DvIdentifier e = new DvIdentifier(); + Identifier identifier = observation.getIdentifierFirstRep(); + Reference assigner = identifier.getAssigner(); + if (assigner.hasReference()) { + e.setAssigner(assigner.getReference()); + } else { + e.setAssigner(assigner.getIdentifier().getValue()); + } + e.setType(identifier.getType().toString().split("@")[0]); + e.setId(identifier.getValue()); identifierList.add(e); feederAudit.setOriginatingSystemItemIds(identifierList); com.nedap.archie.rm.archetyped.FeederAuditDetails originatingSystemAudit = new com.nedap.archie.rm.archetyped.FeederAuditDetails(); - originatingSystemAudit.setSystemId(observation.getIdentifier().get(0).getSystem()); + originatingSystemAudit.setSystemId(identifier.getSystem()); feederAudit.setOriginatingSystemAudit(originatingSystemAudit); return feederAudit; } @@ -45,7 +57,7 @@ private LabortestPanelCluster createLabortestPanel(Observation observation) { LabortestPanelCluster labortestPanel = new LabortestPanelCluster(); ProAnalytCluster analyt = new ProAnalytCluster(); analyt.setVirusnachweistestDefiningCode(VirusnachweistestDefiningCode.SARS_COV2_COVID19_RNA_PRESENCE_IN_RESPIRATORY_SPECIMEN_BY_NAA_WITH_PROBE_DETECTION); - switch(observation.getValueCodeableConcept().getCoding().get(0).getCode()) { + switch (observation.getValueCodeableConcept().getCoding().get(0).getCode()) { case "260373001": analyt.setNachweisDefiningCode(NachweisDefiningCode.DETECTED_QUALIFIER_VALUE); break; From 4448079f927bed796cd41198b97c0a38b93ad267 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 6 Jul 2021 14:25:45 +0200 Subject: [PATCH 135/141] Remove createIdentifierSection method --- .../PCRObservationConverter.java | 32 ------------------- 1 file changed, 32 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccovirologischerbefund/PCRObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccovirologischerbefund/PCRObservationConverter.java index 80c96e38c..df2934f84 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccovirologischerbefund/PCRObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccovirologischerbefund/PCRObservationConverter.java @@ -1,8 +1,6 @@ package org.ehrbase.fhirbridge.ehr.converter.specific.geccovirologischerbefund; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; -import com.nedap.archie.rm.archetyped.FeederAudit; -import com.nedap.archie.rm.datavalues.DvIdentifier; import org.ehrbase.fhirbridge.ehr.converter.generic.ObservationToObservationConverter; import org.ehrbase.fhirbridge.ehr.opt.geccovirologischerbefundcomposition.definition.BefundObservation; import org.ehrbase.fhirbridge.ehr.opt.geccovirologischerbefundcomposition.definition.LabortestBezeichnungDefiningCode; @@ -10,12 +8,7 @@ import org.ehrbase.fhirbridge.ehr.opt.geccovirologischerbefundcomposition.definition.NachweisDefiningCode; import org.ehrbase.fhirbridge.ehr.opt.geccovirologischerbefundcomposition.definition.ProAnalytCluster; import org.ehrbase.fhirbridge.ehr.opt.geccovirologischerbefundcomposition.definition.VirusnachweistestDefiningCode; -import org.hl7.fhir.r4.model.Identifier; import org.hl7.fhir.r4.model.Observation; -import org.hl7.fhir.r4.model.Reference; - -import java.util.ArrayList; -import java.util.List; @SuppressWarnings("java:S6212") public class PCRObservationConverter extends ObservationToObservationConverter<BefundObservation> { @@ -25,34 +18,9 @@ protected BefundObservation convertInternal(Observation resource) { BefundObservation befundObservation = new BefundObservation(); befundObservation.setLabortestBezeichnungDefiningCode(LabortestBezeichnungDefiningCode.DETECTION_OF_VIRUS_PROCEDURE); befundObservation.setLabortestPanel(createLabortestPanel(resource)); - - if (resource.hasIdentifier()) { - befundObservation.setFeederAudit(createIdentifierSection(resource)); - } return befundObservation; } - private FeederAudit createIdentifierSection(Observation observation) { - FeederAudit feederAudit = new FeederAudit(); - List<DvIdentifier> identifierList = new ArrayList<>(); - DvIdentifier e = new DvIdentifier(); - Identifier identifier = observation.getIdentifierFirstRep(); - Reference assigner = identifier.getAssigner(); - if (assigner.hasReference()) { - e.setAssigner(assigner.getReference()); - } else { - e.setAssigner(assigner.getIdentifier().getValue()); - } - e.setType(identifier.getType().toString().split("@")[0]); - e.setId(identifier.getValue()); - identifierList.add(e); - feederAudit.setOriginatingSystemItemIds(identifierList); - com.nedap.archie.rm.archetyped.FeederAuditDetails originatingSystemAudit = new com.nedap.archie.rm.archetyped.FeederAuditDetails(); - originatingSystemAudit.setSystemId(identifier.getSystem()); - feederAudit.setOriginatingSystemAudit(originatingSystemAudit); - return feederAudit; - } - private LabortestPanelCluster createLabortestPanel(Observation observation) { LabortestPanelCluster labortestPanel = new LabortestPanelCluster(); ProAnalytCluster analyt = new ProAnalytCluster(); From ac82e7585e758749936f7dbb2cae99c3bc938667 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 6 Jul 2021 14:53:17 +0200 Subject: [PATCH 136/141] Fix issue with IT linked to previous removed method --- src/test/resources/Observation/PCR/paragon-PCR.json | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/test/resources/Observation/PCR/paragon-PCR.json b/src/test/resources/Observation/PCR/paragon-PCR.json index 9f7e19e8e..6100d0fda 100644 --- a/src/test/resources/Observation/PCR/paragon-PCR.json +++ b/src/test/resources/Observation/PCR/paragon-PCR.json @@ -147,19 +147,6 @@ "_type" : "DV_TEXT", "value" : "Befund" }, - "feeder_audit" : { - "_type" : "FEEDER_AUDIT", - "originating_system_item_ids" : [ { - "_type" : "DV_IDENTIFIER", - "assigner" : "Organization/Charité", - "id" : "94500-6_SARS-CoV-2-RNA-Presence-in-Respiratory-specimen", - "type" : "org.hl7.fhir.r4.model.CodeableConcept" - } ], - "originating_system_audit" : { - "_type" : "FEEDER_AUDIT_DETAILS", - "system_id" : "https://www.charite.de/fhir/CodeSystem/lab-identifiers" - } - }, "language" : { "_type" : "CODE_PHRASE", "terminology_id" : { From 88e422a02442c597e632bd11fc147da340ee0d2f Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Tue, 6 Jul 2021 15:36:51 +0200 Subject: [PATCH 137/141] refactored Bloodpressure --- ...borergebnisBefundObservationConverter.java | 5 +- .../BlutdruckObservationConverter.java | 56 +++++++++++++++---- 2 files changed, 47 insertions(+), 14 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/bloodgas/LaborergebnisBefundObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/bloodgas/LaborergebnisBefundObservationConverter.java index dbe7e2950..0896069b7 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/bloodgas/LaborergebnisBefundObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/bloodgas/LaborergebnisBefundObservationConverter.java @@ -1,6 +1,7 @@ package org.ehrbase.fhirbridge.ehr.converter.specific.bloodgas; +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.ehrbase.fhirbridge.ehr.converter.generic.ObservationToObservationConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.bloodgas.laboratoryanalyteconverter.KohlendioxidpartialdruckConverter; import org.ehrbase.fhirbridge.ehr.converter.specific.bloodgas.laboratoryanalyteconverter.PhWertConverter; @@ -54,10 +55,10 @@ private static LabortestBezeichnungDefiningCode mapLabortestBezeichnung(Observat }else if(code.equals( LabortestBezeichnungDefiningCode.GAS_PANEL_ARTERIAL_BLOOD.getCode())){ return LabortestBezeichnungDefiningCode.GAS_PANEL_ARTERIAL_BLOOD; }else if(code.equals( LabortestBezeichnungDefiningCode.GAS_PANEL_CAPILLARY_BLOOD.getCode())){ - return LabortestBezeichnungDefiningCode.GAS_PANEL_CAPILLARY_BLOOD; + return LabortestBezeichnungDefiningCode.GAS_PANEL_CAPILLARY_BLOOD; } } - throw new IllegalArgumentException("The coding of the LabortestBezeichnung: "+fhirObservation.getCode().getCoding()+" cannot be mapped, needs to be either blood (LOINC code 24338-6)" + + throw new UnprocessableEntityException("The coding of the LabortestBezeichnung: "+fhirObservation.getCode().getCoding()+" cannot be mapped, needs to be either blood (LOINC code 24338-6)" + ", arterial blood (24336-0) or capillary blood (24337-8), check JSON at path Observation.code.coding"); } diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/bloodpressure/BlutdruckObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/bloodpressure/BlutdruckObservationConverter.java index 5092a109d..86a2260c3 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/bloodpressure/BlutdruckObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/bloodpressure/BlutdruckObservationConverter.java @@ -2,25 +2,57 @@ import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.ehrbase.fhirbridge.ehr.converter.generic.ObservationToObservationConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem; import org.ehrbase.fhirbridge.ehr.opt.blutdruckcomposition.definition.BlutdruckObservation; +import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.Observation; +import java.util.Optional; + public class BlutdruckObservationConverter extends ObservationToObservationConverter<BlutdruckObservation> { @Override protected BlutdruckObservation convertInternal(Observation resource) { BlutdruckObservation bloodPressure = new BlutdruckObservation(); - try { - double systolicBPValue = resource.getComponent().get(0).getValueQuantity().getValue().doubleValue(); - String systolicBPUnit = resource.getComponent().get(0).getValueQuantity().getCode(); //mmHg, mm[Hg] - bloodPressure.setSystolischMagnitude(systolicBPValue); - bloodPressure.setSystolischUnits(systolicBPUnit); - double diastolicBPValue = resource.getComponent().get(1).getValueQuantity().getValue().doubleValue(); - String diastolicBPUnit = resource.getComponent().get(1).getValueQuantity().getCode(); - bloodPressure.setDiastolischMagnitude(diastolicBPValue); - bloodPressure.setDiastolischUnits(diastolicBPUnit); - } catch (Exception e) { - throw new UnprocessableEntityException(e.getMessage()); - } + setSystolicAndDiastolic(bloodPressure, resource); return bloodPressure; } + + private void setSystolicAndDiastolic(BlutdruckObservation bloodPressure, Observation resource) { + for (Observation.ObservationComponentComponent component:resource.getComponent()) { + for(Coding coding:component.getCode().getCoding()){ + mapSystolicAndDiastolic(coding, bloodPressure, component); + } + } + } + + private void mapSystolicAndDiastolic(Coding coding, BlutdruckObservation bloodPressure, Observation.ObservationComponentComponent component) { + if (coding.getSystem().equals(CodeSystem.LOINC.getUrl()) && coding.getCode().equals("8480-6")){ + getValue(component).ifPresent(bloodPressure::setSystolischMagnitude); + getUnit(component).ifPresent(bloodPressure::setSystolischUnits); + }else if(coding.getSystem().equals(CodeSystem.LOINC.getUrl()) && coding.getCode().equals("8462-4")){ + getValue(component).ifPresent(bloodPressure::setDiastolischMagnitude); + getUnit(component).ifPresent(bloodPressure::setDiastolischUnits); + }else{ + throw new UnprocessableEntityException("Component.coding.code has to contain the correct LOINC codes"); + } + } + + private Optional<Double> getValue(Observation.ObservationComponentComponent component) { + if(component.hasValueQuantity() ){ + return Optional.of(component.getValueQuantity().getValue().doubleValue()); + }else{ + return Optional.empty(); + } + } + + private Optional<String> getUnit(Observation.ObservationComponentComponent component) { + if(component.hasValueQuantity() ){ + return Optional.of(component.getValueQuantity().getCode()); + }else{ + return Optional.empty(); + } + } + + } + From 3d3eccf6bdb27e680cc50b6efd01d7016645df12 Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Tue, 6 Jul 2021 16:02:24 +0200 Subject: [PATCH 138/141] refactored Blood pressure --- .../BlutdruckObservationConverter.java | 6 +- src/main/resources/application.yml | 2 +- .../CustomTemporalAcessorComparator.java | 1 - .../fhir/observation/BloodPressureIT.java | 78 ++++++++ .../BloodPressure/create-blood-pressure.json | 152 ++++++++++++++++ .../create-blood-pressure_loinc-datetime.json | 74 ++++++++ .../create-blood-pressure_loinc-period.json | 77 ++++++++ .../paragon-create-blood-pressure.json | 166 ++++++++++++++++++ ...-create-blood-pressure_loinc-datetime.json | 162 +++++++++++++++++ ...on-create-blood-pressure_loinc-period.json | 166 ++++++++++++++++++ 10 files changed, 878 insertions(+), 6 deletions(-) create mode 100644 src/test/java/org/ehrbase/fhirbridge/fhir/observation/BloodPressureIT.java create mode 100644 src/test/resources/Observation/BloodPressure/create-blood-pressure.json create mode 100755 src/test/resources/Observation/BloodPressure/create-blood-pressure_loinc-datetime.json create mode 100755 src/test/resources/Observation/BloodPressure/create-blood-pressure_loinc-period.json create mode 100644 src/test/resources/Observation/BloodPressure/paragon-create-blood-pressure.json create mode 100755 src/test/resources/Observation/BloodPressure/paragon-create-blood-pressure_loinc-datetime.json create mode 100755 src/test/resources/Observation/BloodPressure/paragon-create-blood-pressure_loinc-period.json diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/bloodpressure/BlutdruckObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/bloodpressure/BlutdruckObservationConverter.java index 86a2260c3..690362391 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/bloodpressure/BlutdruckObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/bloodpressure/BlutdruckObservationConverter.java @@ -26,14 +26,12 @@ private void setSystolicAndDiastolic(BlutdruckObservation bloodPressure, Observa } private void mapSystolicAndDiastolic(Coding coding, BlutdruckObservation bloodPressure, Observation.ObservationComponentComponent component) { - if (coding.getSystem().equals(CodeSystem.LOINC.getUrl()) && coding.getCode().equals("8480-6")){ + if (coding.getSystem().equals(CodeSystem.LOINC.getUrl()) && coding.getCode().equals("8480-6")){ getValue(component).ifPresent(bloodPressure::setSystolischMagnitude); getUnit(component).ifPresent(bloodPressure::setSystolischUnits); - }else if(coding.getSystem().equals(CodeSystem.LOINC.getUrl()) && coding.getCode().equals("8462-4")){ + }else if(coding.getSystem().equals(CodeSystem.LOINC.getUrl()) && coding.getCode().equals("8462-4")){ getValue(component).ifPresent(bloodPressure::setDiastolischMagnitude); getUnit(component).ifPresent(bloodPressure::setDiastolischUnits); - }else{ - throw new UnprocessableEntityException("Component.coding.code has to contain the correct LOINC codes"); } } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index c9b176134..729234702 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -13,7 +13,7 @@ fhir-bridge: allowed-origins: '*' # Debug Properties debug: - enabled: false + enabled: true mapping-output-directory: ${java.io.tmpdir}/mappings # EHRbase Properties ehrbase: diff --git a/src/test/java/org/ehrbase/fhirbridge/comparators/CustomTemporalAcessorComparator.java b/src/test/java/org/ehrbase/fhirbridge/comparators/CustomTemporalAcessorComparator.java index c3cf6ed7a..17d785ee5 100644 --- a/src/test/java/org/ehrbase/fhirbridge/comparators/CustomTemporalAcessorComparator.java +++ b/src/test/java/org/ehrbase/fhirbridge/comparators/CustomTemporalAcessorComparator.java @@ -27,7 +27,6 @@ private LocalDateTime parseToLocalDateTime(TemporalAccessor temporalAccessor) { return (LocalDateTime) temporalAccessor; } - @Override public String toString(TemporalAccessor temporalAccessor) { return temporalAccessor.toString(); diff --git a/src/test/java/org/ehrbase/fhirbridge/fhir/observation/BloodPressureIT.java b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/BloodPressureIT.java new file mode 100644 index 000000000..2aa2f5981 --- /dev/null +++ b/src/test/java/org/ehrbase/fhirbridge/fhir/observation/BloodPressureIT.java @@ -0,0 +1,78 @@ +package org.ehrbase.fhirbridge.fhir.observation; + +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import org.ehrbase.fhirbridge.comparators.CustomTemporalAcessorComparator; +import org.ehrbase.fhirbridge.ehr.converter.specific.bloodpressure.BloodPressureCompositionConverter; +import org.ehrbase.fhirbridge.ehr.converter.specific.clinicalfrailty.ClinicalFrailtyScaleScoreCompositionConverter; +import org.ehrbase.fhirbridge.ehr.opt.blutdruckcomposition.BlutdruckComposition; +import org.ehrbase.fhirbridge.ehr.opt.blutdruckcomposition.definition.BlutdruckObservation; +import org.ehrbase.fhirbridge.ehr.opt.klinischefrailtyskalacomposition.KlinischeFrailtySkalaComposition; +import org.ehrbase.fhirbridge.ehr.opt.klinischefrailtyskalacomposition.definition.KlinischeFrailtySkalaCfsObservation; +import org.ehrbase.fhirbridge.fhir.AbstractMappingTestSetupIT; +import org.hl7.fhir.r4.model.Observation; +import org.javers.core.Javers; +import org.javers.core.JaversBuilder; +import org.javers.core.diff.Diff; +import org.javers.core.metamodel.clazz.ValueObjectDefinition; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.time.temporal.TemporalAccessor; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +public class BloodPressureIT extends AbstractMappingTestSetupIT { + public BloodPressureIT() { + super("Observation/BloodPressure/", Observation.class); //fhir-Resource + } + + @Test + void createBloodPressure() throws IOException { + create("create-blood-pressure.json"); + } + + @Test + void testCreateBloodPressure() throws IOException { + testMapping("create-blood-pressure.json", "paragon-create-blood-pressure.json"); + } + + @Test + void testLOINCDatetime() throws IOException { + testMapping("create-blood-pressure_loinc-datetime.json", "paragon-create-blood-pressure_loinc-datetime.json"); + } + + @Test + void testLOINCPeriod() throws IOException { + testMapping("create-blood-pressure_loinc-period.json", "paragon-create-blood-pressure_loinc-period.json"); + } + + + @Override + public Javers getJavers() { + return JaversBuilder.javers() + .registerValue(TemporalAccessor.class, new CustomTemporalAcessorComparator()) + .registerValueObject(new ValueObjectDefinition(BlutdruckComposition.class, List.of("location", "feederAudit"))) + .registerValueObject(BlutdruckObservation.class) + .build(); + } + + @Override + public Exception executeMappingException(String path) throws IOException { + Observation obs = (Observation) testFileLoader.loadResource(path); + return assertThrows(UnprocessableEntityException.class, () -> + new BloodPressureCompositionConverter().convert(obs) + ); + } + + @Override + public void testMapping(String resourcePath, String paragonPath) throws IOException { + Observation observation = (Observation) super.testFileLoader.loadResource(resourcePath); + BloodPressureCompositionConverter compositionConverter = new BloodPressureCompositionConverter(); + BlutdruckComposition mapped = compositionConverter.convert(observation); + Diff diff = compareCompositions(getJavers(), paragonPath, mapped); + assertEquals(0, diff.getChanges().size()); + } + +} diff --git a/src/test/resources/Observation/BloodPressure/create-blood-pressure.json b/src/test/resources/Observation/BloodPressure/create-blood-pressure.json new file mode 100644 index 000000000..7e81e9543 --- /dev/null +++ b/src/test/resources/Observation/BloodPressure/create-blood-pressure.json @@ -0,0 +1,152 @@ +{ + "resourceType": "Observation", + "id": "blood-pressure", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-pressure" + ] + }, + "text": { + "status": "generated", + "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: blood-pressure</p><p><b>meta</b>: </p><p><b>identifier</b>: urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281</p><p><b>basedOn</b>: </p><p><b>status</b>: final</p><p><b>category</b>: Vital Signs <span>(Details : {http://terminology.hl7.org/CodeSystem/observation-category code 'vital-signs' = 'Vital Signs', given as 'Vital Signs'})</span></p><p><b>code</b>: Blood pressure systolic & diastolic <span>(Details : {LOINC code '85354-9' = 'Blood pressure panel with all children optional', given as 'Blood pressure panel with all children optional'})</span></p><p><b>subject</b>: <a>urn:uuid:example</a></p><p><b>effective</b>: 17/09/2012</p><p><b>performer</b>: <a>Practitioner/example</a></p><p><b>interpretation</b>: Below low normal <span>(Details : {http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation code 'L' = 'Low', given as 'low'})</span></p><p><b>bodySite</b>: Right arm <span>(Details : {SNOMED CT code '368209003' = 'Right upper arm', given as 'Right arm'})</span></p><blockquote><p><b>component</b></p><p><b>code</b>: Systolic blood pressure <span>(Details : {LOINC code '8480-6' = 'Systolic blood pressure', given as 'Systolic blood pressure'}; {SNOMED CT code '271649006' = 'Systolic blood pressure', given as 'Systolic blood pressure'}; {http://acme.org/devices/clinical-codes code 'bp-s' = 'bp-s', given as 'Systolic Blood pressure'})</span></p><p><b>value</b>: 107 mmHg<span> (Details: UCUM code mm[Hg] = 'mmHg')</span></p><p><b>interpretation</b>: Normal <span>(Details : {http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation code 'N' = 'Normal', given as 'normal'})</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Diastolic blood pressure <span>(Details : {LOINC code '8462-4' = 'Diastolic blood pressure', given as 'Diastolic blood pressure'})</span></p><p><b>value</b>: 60 mmHg<span> (Details: UCUM code mm[Hg] = 'mmHg')</span></p><p><b>interpretation</b>: Below low normal <span>(Details : {http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation code 'L' = 'Low', given as 'low'})</span></p></blockquote></div>" + }, + "identifier": [ + { + "system": "urn:ietf:rfc:3986", + "value": "urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281" + } + ], + "basedOn": [ + { + "identifier": { + "system": "https://acme.org/identifiers", + "value": "1234" + } + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "vital-signs", + "display": "Vital Signs" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "85354-9", + "display": "Blood pressure panel with all children optional" + } + ], + "text": "Blood pressure systolic & diastolic" + }, + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2012-09-17", + "performer": [ + { + "reference": "http://external.fhir.server/Practitioner/example" + } + ], + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "L", + "display": "low" + } + ], + "text": "Below low normal" + } + ], + "bodySite": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "368209003", + "display": "Right arm" + } + ] + }, + "component": [ + { + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "8480-6", + "display": "Systolic blood pressure" + }, + { + "system": "http://snomed.info/sct", + "code": "271649006", + "display": "Systolic blood pressure" + }, + { + "system": "http://acme.org/devices/clinical-codes", + "code": "bp-s", + "display": "Systolic Blood pressure" + } + ] + }, + "valueQuantity": { + "value": 107, + "unit": "mmHg", + "system": "http://unitsofmeasure.org", + "code": "mm[Hg]" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "N", + "display": "normal" + } + ], + "text": "Normal" + } + ] + }, + { + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "8462-4", + "display": "Diastolic blood pressure" + } + ] + }, + "valueQuantity": { + "value": 60, + "unit": "mmHg", + "system": "http://unitsofmeasure.org", + "code": "mm[Hg]" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "L", + "display": "low" + } + ], + "text": "Below low normal" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/test/resources/Observation/BloodPressure/create-blood-pressure_loinc-datetime.json b/src/test/resources/Observation/BloodPressure/create-blood-pressure_loinc-datetime.json new file mode 100755 index 000000000..2d0247e7b --- /dev/null +++ b/src/test/resources/Observation/BloodPressure/create-blood-pressure_loinc-datetime.json @@ -0,0 +1,74 @@ +{ + "resourceType": "Observation", + "id": "blood-pressure", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-pressure" + ] + }, + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "vital-signs", + "display": "Vital Signs" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "85354-9", + "display": "Blood pressure panel with all children optional" + } + ], + "text": "Blood pressure systolic & diastolic" + }, + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectiveDateTime": "2012-09-17", + "component": [ + { + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "8480-6", + "display": "Systolic blood pressure" + } + ] + }, + "valueQuantity": { + "value": 107, + "unit": "mmHg", + "system": "http://unitsofmeasure.org", + "code": "mm[Hg]" + } + }, + { + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "8462-4", + "display": "Diastolic blood pressure" + } + ] + }, + "valueQuantity": { + "value": 60, + "unit": "mmHg", + "system": "http://unitsofmeasure.org", + "code": "mm[Hg]" + } + } + ] +} \ No newline at end of file diff --git a/src/test/resources/Observation/BloodPressure/create-blood-pressure_loinc-period.json b/src/test/resources/Observation/BloodPressure/create-blood-pressure_loinc-period.json new file mode 100755 index 000000000..5964fa076 --- /dev/null +++ b/src/test/resources/Observation/BloodPressure/create-blood-pressure_loinc-period.json @@ -0,0 +1,77 @@ +{ + "resourceType": "Observation", + "id": "blood-pressure", + "meta": { + "profile": [ + "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/blood-pressure" + ] + }, + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "vital-signs", + "display": "Vital Signs" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "85354-9", + "display": "Blood pressure panel with all children optional" + } + ], + "text": "Blood pressure systolic & diastolic" + }, + "subject": { + "identifier": { + "system": "urn:ietf:rfc:4122", + "value": "{{patientId}}" + } + }, + "effectivePeriod": { + "start": "2012-09-17", + "end": "2012-09-17" + }, + "component": [ + { + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "8480-6", + "display": "Systolic blood pressure" + } + ] + }, + "valueQuantity": { + "value": 107, + "unit": "mmHg", + "system": "http://unitsofmeasure.org", + "code": "mm[Hg]" + } + }, + { + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "8462-4", + "display": "Diastolic blood pressure" + } + ] + }, + "valueQuantity": { + "value": 60, + "unit": "mmHg", + "system": "http://unitsofmeasure.org", + "code": "mm[Hg]" + } + } + ] +} \ No newline at end of file diff --git a/src/test/resources/Observation/BloodPressure/paragon-create-blood-pressure.json b/src/test/resources/Observation/BloodPressure/paragon-create-blood-pressure.json new file mode 100644 index 000000000..0aa7b403a --- /dev/null +++ b/src/test/resources/Observation/BloodPressure/paragon-create-blood-pressure.json @@ -0,0 +1,166 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Blutdruck" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "Blutdruck" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/1/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_IDENTIFIED", + "identifiers" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "http://external.fhir.server/Practitioner/example" + } ] + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2012-09-17T00:00:00+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + } + }, + "content" : [ { + "_type" : "OBSERVATION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Blutdruck" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "name" : { + "_type" : "DV_TEXT", + "value" : "Historie" + }, + "origin" : { + "_type" : "DV_DATE_TIME", + "value" : "2012-09-17T00:00:00+02:00" + }, + "events" : [ { + "_type" : "POINT_EVENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Beliebiges Ereignis" + }, + "time" : { + "_type" : "DV_DATE_TIME", + "value" : "2012-09-17T00:00:00+02:00" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Blutdruck" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Systolisch" + }, + "value" : { + "_type" : "DV_QUANTITY", + "units" : "mm[Hg]", + "magnitude" : 107.0 + }, + "archetype_node_id" : "at0004" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Diastolisch" + }, + "value" : { + "_type" : "DV_QUANTITY", + "units" : "mm[Hg]", + "magnitude" : 60.0 + }, + "archetype_node_id" : "at0005" + } ], + "archetype_node_id" : "at0003" + }, + "archetype_node_id" : "at0006" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-OBSERVATION.blood_pressure.v2" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/test/resources/Observation/BloodPressure/paragon-create-blood-pressure_loinc-datetime.json b/src/test/resources/Observation/BloodPressure/paragon-create-blood-pressure_loinc-datetime.json new file mode 100755 index 000000000..b85e207db --- /dev/null +++ b/src/test/resources/Observation/BloodPressure/paragon-create-blood-pressure_loinc-datetime.json @@ -0,0 +1,162 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Blutdruck" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "Blutdruck" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/3/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2012-09-17T00:00:00+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + } + }, + "content" : [ { + "_type" : "OBSERVATION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Blutdruck" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "name" : { + "_type" : "DV_TEXT", + "value" : "Historie" + }, + "origin" : { + "_type" : "DV_DATE_TIME", + "value" : "2012-09-17T00:00:00+02:00" + }, + "events" : [ { + "_type" : "POINT_EVENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Beliebiges Ereignis" + }, + "time" : { + "_type" : "DV_DATE_TIME", + "value" : "2012-09-17T00:00:00+02:00" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Blutdruck" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Systolisch" + }, + "value" : { + "_type" : "DV_QUANTITY", + "units" : "mm[Hg]", + "magnitude" : 107.0 + }, + "archetype_node_id" : "at0004" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Diastolisch" + }, + "value" : { + "_type" : "DV_QUANTITY", + "units" : "mm[Hg]", + "magnitude" : 60.0 + }, + "archetype_node_id" : "at0005" + } ], + "archetype_node_id" : "at0003" + }, + "archetype_node_id" : "at0006" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-OBSERVATION.blood_pressure.v2" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file diff --git a/src/test/resources/Observation/BloodPressure/paragon-create-blood-pressure_loinc-period.json b/src/test/resources/Observation/BloodPressure/paragon-create-blood-pressure_loinc-period.json new file mode 100755 index 000000000..6dd9afdc2 --- /dev/null +++ b/src/test/resources/Observation/BloodPressure/paragon-create-blood-pressure_loinc-period.json @@ -0,0 +1,166 @@ +{ + "_type" : "COMPOSITION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Blutdruck" + }, + "archetype_details" : { + "archetype_id" : { + "value" : "openEHR-EHR-COMPOSITION.registereintrag.v1" + }, + "template_id" : { + "value" : "Blutdruck" + }, + "rm_version" : "1.0.4" + }, + "feeder_audit" : { + "_type" : "FEEDER_AUDIT", + "originating_system_item_ids" : [ { + "_type" : "DV_IDENTIFIER", + "id" : "Observation/5/_history/1", + "type" : "fhir_logical_id" + } ], + "originating_system_audit" : { + "_type" : "FEEDER_AUDIT_DETAILS", + "system_id" : "FHIR-Bridge" + } + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "territory" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_3166-1" + }, + "code_string" : "DE" + }, + "category" : { + "_type" : "DV_CODED_TEXT", + "value" : "event", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "433" + } + }, + "composer" : { + "_type" : "PARTY_SELF" + }, + "context" : { + "_type" : "EVENT_CONTEXT", + "start_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2012-09-17T00:00:00+02:00" + }, + "end_time" : { + "_type" : "DV_DATE_TIME", + "value" : "2012-09-17T00:00:00+02:00" + }, + "setting" : { + "_type" : "DV_CODED_TEXT", + "value" : "secondary medical care", + "defining_code" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "openehr" + }, + "code_string" : "232" + } + } + }, + "content" : [ { + "_type" : "OBSERVATION", + "name" : { + "_type" : "DV_TEXT", + "value" : "Blutdruck" + }, + "language" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "ISO_639-1" + }, + "code_string" : "de" + }, + "encoding" : { + "_type" : "CODE_PHRASE", + "terminology_id" : { + "_type" : "TERMINOLOGY_ID", + "value" : "IANA_character-sets" + }, + "code_string" : "UTF-8" + }, + "subject" : { + "_type" : "PARTY_SELF" + }, + "data" : { + "name" : { + "_type" : "DV_TEXT", + "value" : "Historie" + }, + "origin" : { + "_type" : "DV_DATE_TIME", + "value" : "2012-09-17T00:00:00+02:00" + }, + "events" : [ { + "_type" : "POINT_EVENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Beliebiges Ereignis" + }, + "time" : { + "_type" : "DV_DATE_TIME", + "value" : "2012-09-17T00:00:00+02:00" + }, + "data" : { + "_type" : "ITEM_TREE", + "name" : { + "_type" : "DV_TEXT", + "value" : "Blutdruck" + }, + "items" : [ { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Systolisch" + }, + "value" : { + "_type" : "DV_QUANTITY", + "units" : "mm[Hg]", + "magnitude" : 107.0 + }, + "archetype_node_id" : "at0004" + }, { + "_type" : "ELEMENT", + "name" : { + "_type" : "DV_TEXT", + "value" : "Diastolisch" + }, + "value" : { + "_type" : "DV_QUANTITY", + "units" : "mm[Hg]", + "magnitude" : 60.0 + }, + "archetype_node_id" : "at0005" + } ], + "archetype_node_id" : "at0003" + }, + "archetype_node_id" : "at0006" + } ], + "archetype_node_id" : "at0001" + }, + "archetype_node_id" : "openEHR-EHR-OBSERVATION.blood_pressure.v2" + } ], + "archetype_node_id" : "openEHR-EHR-COMPOSITION.registereintrag.v1" +} \ No newline at end of file From 7a13b03a97f6cb7ea24d69890a4882671d78ec1a Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Tue, 6 Jul 2021 16:12:06 +0200 Subject: [PATCH 139/141] refactored body height --- .../GroesseLaengeObservationConverter.java | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/bodyheight/GroesseLaengeObservationConverter.java b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/bodyheight/GroesseLaengeObservationConverter.java index 18f6522ed..bf99325ae 100644 --- a/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/bodyheight/GroesseLaengeObservationConverter.java +++ b/src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/bodyheight/GroesseLaengeObservationConverter.java @@ -4,13 +4,32 @@ import org.ehrbase.fhirbridge.ehr.opt.koerpergroessecomposition.definition.GroesseLaengeObservation; import org.hl7.fhir.r4.model.Observation; +import java.util.Optional; + public class GroesseLaengeObservationConverter extends ObservationToObservationConverter<GroesseLaengeObservation> { @Override protected GroesseLaengeObservation convertInternal(Observation resource) { GroesseLaengeObservation groesseLaengeObservation = new GroesseLaengeObservation(); - groesseLaengeObservation.setGroesseLaengeUnits(resource.getValueQuantity().getCode()); - groesseLaengeObservation.setGroesseLaengeMagnitude(resource.getValueQuantity().getValue().doubleValue()); + setGroesseLaengeUnits(resource).ifPresent(groesseLaengeObservation::setGroesseLaengeUnits); + setGroesseLaengeValue(resource).ifPresent(groesseLaengeObservation::setGroesseLaengeMagnitude); return groesseLaengeObservation; } + + private Optional<Double> setGroesseLaengeValue(Observation resource) { + if (resource.hasValueQuantity()) { + return Optional.of(resource.getValueQuantity().getValue().doubleValue()); + } else { + return Optional.empty(); + } + } + + private Optional<String> setGroesseLaengeUnits(Observation resource) { + if (resource.hasValueQuantity()) { + return Optional.of(resource.getValueQuantity().getCode()); + } else { + return Optional.empty(); + } + } + } From 41eb88a101ad3bf23f482af3828576625d693d6e Mon Sep 17 00:00:00 2001 From: SevKohler <kohlerseverin@posteo.de> Date: Tue, 6 Jul 2021 16:19:27 +0200 Subject: [PATCH 140/141] refactored body height --- .attach_pid132846 | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .attach_pid132846 diff --git a/.attach_pid132846 b/.attach_pid132846 new file mode 100644 index 000000000..e69de29bb From 4ed06306040d69e963477435e98dc86e287b0011 Mon Sep 17 00:00:00 2001 From: Renaud Subiger <renaud@subiger.com> Date: Tue, 6 Jul 2021 18:12:50 +0200 Subject: [PATCH 141/141] Updated release version to v1.2.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 321e0ddc3..89c016945 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ <groupId>org.ehrbase.fhirbridge</groupId> <artifactId>fhir-bridge</artifactId> - <version>1.2.0-SNAPSHOT</version> + <version>1.2.0</version> <name>FHIR Bridge</name>