From 4c4de99dde08e5d42321d186edb6b6b636b9cdd3 Mon Sep 17 00:00:00 2001 From: Bryn Rhodes Date: Tue, 28 Mar 2017 15:18:05 -0600 Subject: [PATCH] #99: Added support for FHIR STU3. #89: FHIRHelpers libraries are now distributed as resources with the FHIR model info. --- .../Zika/zika-virus-intervention-logic.cql | 3 +- .../Zika/zika-virus-intervention-logic.xml | 700 +- .../cql/cql2elm/CqlTranslator.java | 1 + .../cql2elm/DefaultLibrarySourceLoader.java | 5 + .../cql2elm/DefaultLibrarySourceProvider.java | 13 +- .../cql2elm/FhirLibrarySourceProvider.java | 16 + .../cql/cql2elm/FhirModelInfoProvider.java | 6 +- .../cql/cql2elm/ModelInfoLoader.java | 1 + .../org/hl7/fhir}/FHIRHelpers-1.0.2.cql | 0 .../org/hl7/fhir/FHIRHelpers-1.6.cql | 0 .../org/hl7/fhir}/FHIRHelpers-1.8.cql | 0 .../org/hl7/fhir/FHIRHelpers-3.0.0.cql | 80 +- .../org/hl7/fhir/fhir-modelinfo-1.8.xml | 2 +- .../org/hl7/fhir/fhir-modelinfo-3.0.0.xml | 6000 +++++++++++++++++ 14 files changed, 6508 insertions(+), 319 deletions(-) create mode 100644 Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/FhirLibrarySourceProvider.java rename {Examples/EH_CMS9v4_NQF0480_BF_ExclusiveBreastFeed => Src/java/quick/src/main/resources/org/hl7/fhir}/FHIRHelpers-1.0.2.cql (100%) rename Examples/EH_CMS9v4_NQF0480_BF_ExclusiveBreastFeed/FHIRHelpers.cql => Src/java/quick/src/main/resources/org/hl7/fhir/FHIRHelpers-1.6.cql (100%) rename {Examples/EH_CMS9v4_NQF0480_BF_ExclusiveBreastFeed => Src/java/quick/src/main/resources/org/hl7/fhir}/FHIRHelpers-1.8.cql (100%) rename Examples/Zika/FHIRHelpers-1.8.cql => Src/java/quick/src/main/resources/org/hl7/fhir/FHIRHelpers-3.0.0.cql (79%) create mode 100644 Src/java/quick/src/main/resources/org/hl7/fhir/fhir-modelinfo-3.0.0.xml diff --git a/Examples/Zika/zika-virus-intervention-logic.cql b/Examples/Zika/zika-virus-intervention-logic.cql index 48e7546b9..f82ae0950 100644 --- a/Examples/Zika/zika-virus-intervention-logic.cql +++ b/Examples/Zika/zika-virus-intervention-logic.cql @@ -35,6 +35,7 @@ define "Pregnancy Conditions": [Condition: "Pregnancy"] C where C.clinicalStatus = 'active' and C.verificationStatus = 'confirmed' + // well, this is ugly.... and Interval[C.onsetDateTime, C.abatementDateTime] includes Today() define "Is Patient Pregnant": @@ -123,7 +124,7 @@ define "Has Possible Zika Exposure": define "Zika Symptom Onset": First( "Zika Symptoms" S - sort by S.onsetDateTime + sort by (S.onsetDateTime) ).onsetDateTime define "Time Since Symptom Onset": diff --git a/Examples/Zika/zika-virus-intervention-logic.xml b/Examples/Zika/zika-virus-intervention-logic.xml index ad6bd0469..4021ae946 100644 --- a/Examples/Zika/zika-virus-intervention-logic.xml +++ b/Examples/Zika/zika-virus-intervention-logic.xml @@ -4,52 +4,52 @@ - + - + - - + + - + - - - - - - - - - - - - - + + + + + + + + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + @@ -58,155 +58,192 @@ - - - - + + + define "Pregnancy Conditions": + [Condition: "Pregnancy"] C + where C.clinicalStatus = 'active' + and C.verificationStatus = 'confirmed' + // well, this is ugly.... + and Interval[C.onsetDateTime, C.abatementDateTime] includes Today() + + + + - - - + + + - + - + - + - + - + - + - - - + + + - - - + + + - - - + + + - - - + + + - + - - - + + + define "Is Patient Pregnant": + Patient.gender = 'female' + and exists ("Pregnancy Conditions") + + + - - + + - + - - + + - - - + + + define "Zika Exposure Assessment": + Code 'Zika Virus Exposure Assessment' from "Example Questionnaires" + + + - - - - - + + + define "Zika Exposure Assessment Result": + First( + [Observation: "Zika Exposure Assessment"] O + where O.status = 'final' + and O.encounter.reference = "Current Encounter".id // TODO: fix + sort by (O.effectiveDateTime) desc + ) + + + + + - - + + - + - + - - - + + + - - + + - - - + + + - - + + + define "Has Zika Exposure Assessment": + "Zika Exposure Assessment Result" is not null + + - + - - - - + + + define "Zika Symptoms": + [Condition: "Zika Virus Signs and Symptoms"] C + where C.clinicalStatus = 'active' + and C.verificationStatus = 'confirmed' + and C."context".reference = "Current Encounter".id + + + + - - - + + + - + - + - + - + - + - - - + + + - - + + @@ -214,327 +251,432 @@ - - - + + + define "Has Zika Symptoms": + exists "Zika Symptoms" + + + - - - + + + define "No Zika Symptoms": + not "Has Zika Symptoms" + + + - - - + + + define "Yes": { 'Yes' } + + + - - - - - + + + define "Resident of or Frequent Traveler to Zika Area": + exists ( + "Zika Exposure Assessment Result".component C + // TODO: Need to streamline, this ought to have worked, not sure why it didn't (without the coding[0] access) + where C.code.coding[0] = "CDE: Resident of or Frequent Traveler to Zika Area" + and C.valueString in "Yes" + ) + + + + + - - + + - - - + + + - + - + - + - + - + - - - - - + + + define "Recent Travel to Zika Area": + exists ( + "Zika Exposure Assessment Result".component C + where C.code.coding[0] = "CDE: Recent Travel to Zika Area" + and C.valueString in "Yes" + ) + + + + + - - + + - - - + + + - + - + - + - + - + - - - - - + + + define "Time Since Returned From Travel": + singleton from ( + "Zika Exposure Assessment Result".component C + where C.code.coding[0] = "CDE: Time Since Returned From Travel" + return C.valueQuantity + ) + + + + + - + - - - + + + - + - + - - + + - - - - - + + + define "Recent Sexual Encounter With Traveler to Zika Area": + exists ( + "Zika Exposure Assessment Result".component C + where C.code.coding[0] = "CDE: Recent Sexual Encounter With Traveler to Zika Area" + and C.valueString in "Yes" + ) + + + + + - - + + - - - + + + - + - + - + - + - + - - - - - + + + define "Time Since Sexual Encounter": + singleton from ( + "Zika Exposure Assessment Result".component C + where C.code.coding[0] = "CDE: Time Since Sexual Encounter" + return C.valueQuantity + ) + + + + + - + - - - + + + - + - + - - + + - - - - + + + define "Time Since Possible Exposure": + Coalesce("Time Since Returned From Travel", "Time Since Sexual Encounter") + + + + - - - - - + + + define "Planned Travel to Zika Area": + exists ( + "Zika Exposure Assessment Result".component C + where C.code.coding[0] = "CDE: Planned Travel to Zika Area" + and C.valueString in "Yes" + ) + + + + + - - + + - - - + + + - + - + - + - + - + - - - - - + + + define "Has Possible Zika Exposure": + "Resident of or Frequent Traveler to Zika Area" + or "Recent Travel to Zika Area" + or "Recent Sexual Encounter With Traveler to Zika Area" + + + + + - + - - - - - - + + + define "Zika Symptom Onset": + First( + "Zika Symptoms" S + sort by (S.onsetDateTime) + ).onsetDateTime + + + + + + - - - + + + - - + + + define "Time Since Symptom Onset": + System.Quantity { value: weeks between "Zika Symptom Onset" and Today(), unit: 'wk' } + + - + - + - + - + - - - + + + define "Should Administer Zika Exposure Assessment": + not ("Has Zika Exposure Assessment") + + + - - - - - - + + + define "Should Order Serum + Urine rRT-PCR Test": + ("Has Possible Zika Exposure" and "Has Zika Symptoms" and "Time Since Symptom Onset" < 2 weeks) + or ("No Zika Symptoms" and "Time Since Possible Exposure" < 2 weeks) + + + + + + - - - + + + - - - + + + - + - + - - - - - - - + + + define "Should Order Serum Zika Virus IgM + Dengue Virus IgM": + ("Has Possible Zika Exposure" and "Has Zika Symptoms" and "Time Since Symptom Onset" in Interval[2 weeks, 12 weeks)) + or ("Resident of or Frequent Traveler to Zika Area" and "No Zika Symptoms") + or ("No Zika Symptoms" and "Time Since Possible Exposure" in Interval[2 weeks, 12 weeks)) + + + + + + + - - - - - + + + + + - - - + + + - - - + + + - + - - - + + + - - - - - - + + + define "Should Consider IgM Antibody Testing": + ("Has Possible Zika Exposure" and "Has Zika Symptoms" and "Time Since Symptom Onset" >= 12 weeks) + or ("No Zika Symptoms" and "Time Since Possible Exposure" >= 12 weeks) + + + + + + - - - + + + - - - + + + - + - + - - + + + define "Should Provide Mosquito Prevention and Contraception Advice": + "Planned Travel to Zika Area" + + diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/CqlTranslator.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/CqlTranslator.java index e141b45b7..87d6bae95 100644 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/CqlTranslator.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/CqlTranslator.java @@ -185,6 +185,7 @@ private static void writeELM(Path inPath, Path outPath, Format format, boolean d LibraryManager libraryManager = new LibraryManager(); libraryManager.getLibrarySourceLoader().registerProvider(new DefaultLibrarySourceProvider(inPath.getParent())); + libraryManager.getLibrarySourceLoader().registerProvider(new FhirLibrarySourceProvider()); CqlTranslator translator = fromFile(inPath.toFile(), libraryManager, options.toArray(new Options[options.size()])); libraryManager.getLibrarySourceLoader().clearProviders(); diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/DefaultLibrarySourceLoader.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/DefaultLibrarySourceLoader.java index b38e453a6..130135159 100644 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/DefaultLibrarySourceLoader.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/DefaultLibrarySourceLoader.java @@ -51,6 +51,11 @@ public InputStream getLibrarySource(VersionedIdentifier libraryIdentifier) { } } + if (source == null) { + throw new IllegalArgumentException(String.format("Could not load source for library %s, version %s.", + libraryIdentifier.getId(), libraryIdentifier.getVersion())); + } + return source; } } diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/DefaultLibrarySourceProvider.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/DefaultLibrarySourceProvider.java index d4ef17ae5..0113dc703 100644 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/DefaultLibrarySourceProvider.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/DefaultLibrarySourceProvider.java @@ -55,16 +55,21 @@ public boolean accept(File path, String name) { } } - if (mostRecentFile == null) { - throw new IllegalArgumentException(String.format("Could not resolve most recent source library for library %s.", libraryIdentifier.getId())); - } + // Do not throw, allow the loader to throw, just report null + //if (mostRecentFile == null) { + // throw new IllegalArgumentException(String.format("Could not resolve most recent source library for library %s.", libraryIdentifier.getId())); + //} libraryFile = mostRecentFile; } try { - return new FileInputStream(libraryFile); + if (libraryFile != null) { + return new FileInputStream(libraryFile); + } } catch (FileNotFoundException e) { throw new IllegalArgumentException(String.format("Could not load source for library %s.", libraryIdentifier.getId()), e); } + + return null; } } diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/FhirLibrarySourceProvider.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/FhirLibrarySourceProvider.java new file mode 100644 index 000000000..73ca0b87d --- /dev/null +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/FhirLibrarySourceProvider.java @@ -0,0 +1,16 @@ +package org.cqframework.cql.cql2elm; + +import org.hl7.elm.r1.VersionedIdentifier; + +import java.io.InputStream; + +/** + * Created by Bryn on 3/28/2017. + */ +public class FhirLibrarySourceProvider implements LibrarySourceProvider { + @Override + public InputStream getLibrarySource(VersionedIdentifier libraryIdentifier) { + return FhirLibrarySourceProvider.class.getResourceAsStream(String.format("/org/hl7/fhir/%s-%s.cql", libraryIdentifier.getId(), + libraryIdentifier.getVersion())); + } +} diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/FhirModelInfoProvider.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/FhirModelInfoProvider.java index fa3fe1f39..70f56e4ff 100644 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/FhirModelInfoProvider.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/FhirModelInfoProvider.java @@ -36,10 +36,14 @@ public ModelInfo load() { ModelInfo.class); case "1.8": - case "": return JAXB.unmarshal(FhirModelInfoProvider.class.getResourceAsStream("/org/hl7/fhir/fhir-modelinfo-1.8.xml"), ModelInfo.class); + case "3.0.0": + case "": + return JAXB.unmarshal(FhirModelInfoProvider.class.getResourceAsStream("/org/hl7/fhir/fhir-modelinfo-3.0.0.xml"), + ModelInfo.class); + default: throw new IllegalArgumentException(String.format("Unknown version %s of the FHIR model.", localVersion)); } diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/ModelInfoLoader.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/ModelInfoLoader.java index f07e385ca..162b56216 100644 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/ModelInfoLoader.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/ModelInfoLoader.java @@ -24,6 +24,7 @@ public class ModelInfoLoader { registerModelInfoProvider(new VersionedIdentifier().withId("FHIR").withVersion("1.6"), new FhirModelInfoProvider().withVersion("1.6")); registerModelInfoProvider(new VersionedIdentifier().withId("FHIR").withVersion("1.4"), new FhirModelInfoProvider().withVersion("1.4")); registerModelInfoProvider(new VersionedIdentifier().withId("FHIR").withVersion("1.8"), new FhirModelInfoProvider().withVersion("1.8")); + registerModelInfoProvider(new VersionedIdentifier().withId("FHIR").withVersion("3.0.0"), new FhirModelInfoProvider().withVersion("3.0.0")); } public static ModelInfoProvider getModelInfoProvider(VersionedIdentifier modelIdentifier) { diff --git a/Examples/EH_CMS9v4_NQF0480_BF_ExclusiveBreastFeed/FHIRHelpers-1.0.2.cql b/Src/java/quick/src/main/resources/org/hl7/fhir/FHIRHelpers-1.0.2.cql similarity index 100% rename from Examples/EH_CMS9v4_NQF0480_BF_ExclusiveBreastFeed/FHIRHelpers-1.0.2.cql rename to Src/java/quick/src/main/resources/org/hl7/fhir/FHIRHelpers-1.0.2.cql diff --git a/Examples/EH_CMS9v4_NQF0480_BF_ExclusiveBreastFeed/FHIRHelpers.cql b/Src/java/quick/src/main/resources/org/hl7/fhir/FHIRHelpers-1.6.cql similarity index 100% rename from Examples/EH_CMS9v4_NQF0480_BF_ExclusiveBreastFeed/FHIRHelpers.cql rename to Src/java/quick/src/main/resources/org/hl7/fhir/FHIRHelpers-1.6.cql diff --git a/Examples/EH_CMS9v4_NQF0480_BF_ExclusiveBreastFeed/FHIRHelpers-1.8.cql b/Src/java/quick/src/main/resources/org/hl7/fhir/FHIRHelpers-1.8.cql similarity index 100% rename from Examples/EH_CMS9v4_NQF0480_BF_ExclusiveBreastFeed/FHIRHelpers-1.8.cql rename to Src/java/quick/src/main/resources/org/hl7/fhir/FHIRHelpers-1.8.cql diff --git a/Examples/Zika/FHIRHelpers-1.8.cql b/Src/java/quick/src/main/resources/org/hl7/fhir/FHIRHelpers-3.0.0.cql similarity index 79% rename from Examples/Zika/FHIRHelpers-1.8.cql rename to Src/java/quick/src/main/resources/org/hl7/fhir/FHIRHelpers-3.0.0.cql index 094498661..342e5688e 100644 --- a/Examples/Zika/FHIRHelpers-1.8.cql +++ b/Src/java/quick/src/main/resources/org/hl7/fhir/FHIRHelpers-3.0.0.cql @@ -1,6 +1,6 @@ -library FHIRHelpers version '1.8' +library FHIRHelpers version '3.0.0' -using FHIR version '1.8' +using FHIR version '3.0.0' define function ToInterval(period FHIR.Period): Interval[period."start".value, period."end".value] @@ -26,7 +26,7 @@ define function ToConcept(concept FHIR.CodeableConcept): } define function ToString(value FHIR.uuid): value.value -define function ToString(value FHIR.PlanActionPrecheckBehavior): value.value +define function ToString(value FHIR.TestScriptRequestMethodCode): value.value define function ToString(value FHIR.ProvenanceEntityRole): value.value define function ToString(value FHIR.UnitsOfTime): value.value define function ToString(value FHIR.AddressType): value.value @@ -35,21 +35,27 @@ define function ToString(value FHIR.SpecimenStatus): value.value define function ToString(value FHIR.RestfulCapabilityMode): value.value define function ToString(value FHIR.DetectedIssueSeverity): value.value define function ToString(value FHIR.IssueSeverity): value.value +define function ToString(value FHIR.CareTeamStatus): value.value define function ToString(value FHIR.DataElementStringency): value.value -define function ToString(value FHIR.PlanActionConditionKind): value.value +define function ToString(value FHIR.VisionEyes): value.value define function ToString(value FHIR.EncounterStatus): value.value define function ToString(value FHIR.StructureDefinitionKind): value.value define function ToString(value FHIR.PublicationStatus): value.value define function ToString(value FHIR.ConsentDataMeaning): value.value +define function ToString(value FHIR.StructureMapSourceListMode): value.value +define function ToString(value FHIR.RequestStatus): value.value define function ToString(value FHIR.QuestionnaireResponseStatus): value.value define function ToString(value FHIR.SearchComparator): value.value +define function ToString(value FHIR.ChargeItemStatus): value.value +define function ToString(value FHIR.ActionParticipantType): value.value define function ToString(value FHIR.AllergyIntoleranceType): value.value define function ToString(value FHIR.DocumentRelationshipType): value.value define function ToString(value FHIR.AllergyIntoleranceClinicalStatus): value.value define function ToString(value FHIR.CarePlanActivityStatus): value.value define function ToString(value FHIR.ActionList): value.value define function ToString(value FHIR.ParticipationStatus): value.value -define function ToString(value FHIR.PlanActionSelectionBehavior): value.value +define function ToString(value FHIR.TestReportResult): value.value +define function ToString(value FHIR.ConceptMapGroupUnmappedMode): value.value define function ToDateTime(value FHIR.instant): value.value define function ToDateTime(value FHIR.dateTime): value.value define function ToDateTime(value FHIR.date): value.value @@ -60,105 +66,115 @@ define function ToString(value FHIR.IssueType): value.value define function ToString(value FHIR.ContentType): value.value define function ToString(value FHIR.StructureMapContextType): value.value define function ToString(value FHIR.FamilyHistoryStatus): value.value -define function ToString(value FHIR.MedicationStatementCategory): value.value define function ToInteger(value FHIR.positiveInt): value.value -define function ToString(value FHIR.CommunicationStatus): value.value define function ToString(value FHIR.ClinicalImpressionStatus): value.value define function ToString(value FHIR.AssertionResponseTypes): value.value +define function ToString(value FHIR.RequestIntent): value.value define function ToString(value FHIR.NarrativeStatus): value.value -define function ToString(value FHIR.ReferralCategory): value.value define function ToString(value FHIR.MeasmntPrinciple): value.value define function ToString(value FHIR.ConsentExceptType): value.value define function ToString(value FHIR.string): value.value +define function ToString(value FHIR.ActionRequiredBehavior): value.value define function ToString(value FHIR.EndpointStatus): value.value define function ToString(value FHIR.GuidePageKind): value.value define function ToString(value FHIR.GuideDependencyType): value.value define function ToString(value FHIR.ResourceVersionPolicy): value.value define function ToString(value FHIR.MedicationRequestStatus): value.value define function ToString(value FHIR.MedicationAdministrationStatus): value.value +define function ToString(value FHIR.ActionCardinalityBehavior): value.value +define function ToString(value FHIR.MedicationRequestIntent): value.value define function ToString(value FHIR.NamingSystemIdentifierType): value.value +define function ToString(value FHIR.ImmunizationStatusCodes): value.value define function ToString(value FHIR.AccountStatus): value.value -define function ToString(value FHIR.ProcedureRequestPriority): value.value define function ToString(value FHIR.MedicationDispenseStatus): value.value +define function ToString(value FHIR.ConfidentialityClassification): value.value define function ToString(value FHIR.IdentifierUse): value.value define function ToString(value FHIR.DigitalMediaType): value.value +define function ToString(value FHIR.StructureMapTargetListMode): value.value define function ToString(value FHIR.TestReportParticipantType): value.value define function ToString(value FHIR.BindingStrength): value.value -define function ToString(value FHIR.ConsentStatus): value.value +define function ToString(value FHIR.RequestPriority): value.value define function ToString(value FHIR.ParticipantRequired): value.value +define function ToString(value FHIR.DiscriminatorType): value.value define function ToString(value FHIR.XPathUsageType): value.value define function ToString(value FHIR.StructureMapInputMode): value.value define function ToString(value FHIR.InstanceAvailability): value.value define function ToString(value FHIR.id): value.value define function ToString(value FHIR.LinkageType): value.value define function ToString(value FHIR.ReferenceHandlingPolicy): value.value +define function ToString(value FHIR.MedicationStatus): value.value define function ToString(value FHIR.FilterOperator): value.value define function ToString(value FHIR.NamingSystemType): value.value define function ToString(value FHIR.ResearchStudyStatus): value.value define function ToString(value FHIR.ExtensionContext): value.value +define function ToString(value FHIR.FHIRDefinedType): value.value define function ToString(value FHIR.AuditEventOutcome): value.value +define function ToString(value FHIR.ActionRelationshipType): value.value define function ToString(value FHIR.ConstraintSeverity): value.value define function ToString(value FHIR.EventCapabilityMode): value.value -define function ToString(value FHIR.PlanActionParticipantType): value.value -define function ToString(value FHIR.ProcedureStatus): value.value +define function ToString(value FHIR.ContractResourceStatusCodes): value.value define function ToString(value FHIR.ResearchSubjectStatus): value.value -define function ToString(value FHIR.PlanActionGroupingBehavior): value.value -define function ToString(value FHIR.CompositeMeasureScoring): value.value +define function ToString(value FHIR.UDIEntryType): value.value define function ToString(value FHIR.DeviceMetricCategory): value.value -define function ToString(value FHIR.QuestionnaireStatus): value.value +define function ToString(value FHIR.TestReportActionResult): value.value define function ToString(value FHIR.StructureMapTransform): value.value define function ToString(value FHIR.ResponseType): value.value define function ToDecimal(value FHIR.decimal): value.value define function ToString(value FHIR.AggregationMode): value.value define function ToString(value FHIR.CapabilityStatementKind): value.value -define function ToString(value FHIR.sequenceType): value.value define function ToString(value FHIR.AllergyIntoleranceVerificationStatus): value.value define function ToString(value FHIR.EventTiming): value.value define function ToString(value FHIR.GoalStatus): value.value define function ToString(value FHIR.SearchParamType): value.value define function ToString(value FHIR.SystemRestfulInteraction): value.value +define function ToString(value FHIR.ActionGroupingBehavior): value.value define function ToString(value FHIR.StructureMapModelMode): value.value define function ToString(value FHIR.TaskStatus): value.value -define function ToString(value FHIR.MeasurePopulationType): value.value +define function ToString(value FHIR.AdverseEventCausality): value.value define function ToString(value FHIR.SubscriptionChannelType): value.value -define function ToString(value FHIR.ProcedureRequestStatus): value.value -define function ToString(value FHIR.ReferralStatus): value.value +define function ToString(value FHIR.GraphCompartmentRule): value.value define function ToString(value FHIR.AssertionDirectionType): value.value +define function ToString(value FHIR.CarePlanIntent): value.value define function ToString(value FHIR.SlicingRules): value.value define function ToString(value FHIR.ExplanationOfBenefitStatus): value.value +define function ToString(value FHIR.ConsentState): value.value +define function ToString(value FHIR.AdverseEventCategory): value.value define function ToString(value FHIR.LinkType): value.value define function ToString(value FHIR.AllergyIntoleranceCriticality): value.value +define function ToString(value FHIR.MedicationRequestPriority): value.value define function ToString(value FHIR.ConceptMapEquivalence): value.value +define function ToString(value FHIR.FHIRAllTypes): value.value define function ToString(value FHIR.PropertyRepresentation): value.value define function ToString(value FHIR.AuditEventAction): value.value -define function ToString(value FHIR.MeasureDataUsage): value.value define function ToString(value FHIR.TriggerType): value.value -define function ToString(value FHIR.ActivityDefinitionCategory): value.value define function ToString(value FHIR.SearchModifierCode): value.value define function ToString(value FHIR.CompositionStatus): value.value define function ToString(value FHIR.AppointmentStatus): value.value define function ToString(value FHIR.MessageSignificanceCategory): value.value +define function ToString(value FHIR.EventStatus): value.value define function ToString(value FHIR.OperationParameterUse): value.value define function ToString(value FHIR.ListMode): value.value +define function ToString(value FHIR.ActionConditionKind): value.value define function ToString(value FHIR.ObservationStatus): value.value define function ToString(value FHIR.qualityType): value.value define function ToString(value FHIR.AdministrativeGender): value.value -define function ToString(value FHIR.MeasureType): value.value +define function ToString(value FHIR.ResourceType): value.value define function ToString(value FHIR.QuestionnaireItemType): value.value -define function ToString(value FHIR.StructureMapListMode): value.value define function ToBoolean(value FHIR.boolean): value.value +define function ToString(value FHIR.StructureMapGroupTypeMode): value.value define function ToString(value FHIR.DeviceMetricCalibrationType): value.value define function ToString(value FHIR.code): value.value define function ToString(value FHIR.SupplyRequestStatus): value.value +define function ToString(value FHIR.ActionSelectionBehavior): value.value define function ToString(value FHIR.EncounterLocationStatus): value.value define function ToString(value FHIR.SupplyDeliveryStatus): value.value define function ToString(value FHIR.DiagnosticReportStatus): value.value define function ToString(value FHIR.FlagStatus): value.value -define function ToString(value FHIR.AllergyIntoleranceCertainty): value.value define function ToString(value FHIR.CarePlanStatus): value.value +define function ToString(value FHIR.ConditionClinicalStatusCodes): value.value define function ToString(value FHIR.ListStatus): value.value define function Tobase64Binary(value FHIR.base64Binary): value.value -define function ToString(value FHIR.MeasureScoring): value.value +define function ToString(value FHIR.DeviceUseStatementStatus): value.value define function ToString(value FHIR.AuditEventAgentNetworkType): value.value define function ToString(value FHIR.AddressUse): value.value define function ToString(value FHIR.ConditionalDeleteStatus): value.value @@ -177,26 +193,26 @@ define function ToTime(value FHIR.time): value.value define function ToString(value FHIR.ConditionalReadStatus): value.value define function ToString(value FHIR.ConditionVerificationStatus): value.value define function ToString(value FHIR.AllergyIntoleranceSeverity): value.value +define function ToString(value FHIR.FinancialResourceStatusCodes): value.value define function ToString(value FHIR.OperationKind): value.value define function ToString(value FHIR.ObservationRelationshipType): value.value define function ToInteger(value FHIR.unsignedInt): value.value define function ToString(value FHIR.NameUse): value.value define function ToString(value FHIR.SubscriptionStatus): value.value -define function ToString(value FHIR.CommunicationRequestStatus): value.value define function ToString(value FHIR.DocumentReferenceStatus): value.value define function ToString(value FHIR.LocationMode): value.value define function ToInteger(value FHIR.integer): value.value define function ToString(value FHIR.repositoryType): value.value -define function ToString(value FHIR.CarePlanRelationship): value.value define function ToString(value FHIR.LocationStatus): value.value +define function ToString(value FHIR.FHIRSubstanceStatus): value.value define function ToString(value FHIR.UnknownContentCode): value.value define function ToString(value FHIR.NoteType): value.value define function ToString(value FHIR.TestReportStatus): value.value define function ToString(value FHIR.HTTPVerb): value.value define function ToString(value FHIR.CodeSystemContentMode): value.value -define function ToString(value FHIR.PlanActionRelationshipType): value.value define function ToString(value FHIR.EpisodeOfCareStatus): value.value define function ToString(value FHIR.RemittanceOutcome): value.value +define function ToString(value FHIR.FHIRDeviceStatus): value.value define function ToString(value FHIR.ContactPointSystem): value.value define function ToString(value FHIR.SlotStatus): value.value define function ToString(value FHIR.PropertyType): value.value @@ -207,18 +223,16 @@ define function ToString(value FHIR.GuidanceResponseStatus): value.value define function ToString(value FHIR.QuantityComparator): value.value define function ToString(value FHIR.RelatedArtifactType): value.value define function ToString(value FHIR.oid): value.value -define function ToString(value FHIR.DeviceStatus): value.value -define function ToString(value FHIR.TestReportResultCodes): value.value define function ToString(value FHIR.MeasureReportType): value.value +define function ToString(value FHIR.ActionPrecheckBehavior): value.value define function ToString(value FHIR.SampledDataDataType): value.value +define function ToString(value FHIR.MedicationStatementTaken): value.value define function ToString(value FHIR.CompartmentType): value.value define function ToString(value FHIR.CompositionAttestationMode): value.value -define function ToString(value FHIR.PlanActionRequiredBehavior): value.value define function ToString(value FHIR.DeviceMetricCalibrationState): value.value define function ToString(value FHIR.GroupType): value.value define function ToString(value FHIR.TypeRestfulInteraction): value.value -define function ToString(value FHIR.PlanActionCardinalityBehavior): value.value define function ToString(value FHIR.CodeSystemHierarchyMeaning): value.value -define function ToString(value FHIR.MedicationStatementNotTaken): value.value +define function ToString(value FHIR.VisionBase): value.value define function ToString(value FHIR.BundleType): value.value define function ToString(value FHIR.SystemVersionProcessingMode): value.value diff --git a/Src/java/quick/src/main/resources/org/hl7/fhir/fhir-modelinfo-1.8.xml b/Src/java/quick/src/main/resources/org/hl7/fhir/fhir-modelinfo-1.8.xml index 6f305fb7d..b2ae30ba8 100644 --- a/Src/java/quick/src/main/resources/org/hl7/fhir/fhir-modelinfo-1.8.xml +++ b/Src/java/quick/src/main/resources/org/hl7/fhir/fhir-modelinfo-1.8.xml @@ -1593,7 +1593,7 @@ - + diff --git a/Src/java/quick/src/main/resources/org/hl7/fhir/fhir-modelinfo-3.0.0.xml b/Src/java/quick/src/main/resources/org/hl7/fhir/fhir-modelinfo-3.0.0.xml new file mode 100644 index 000000000..02e2c2dab --- /dev/null +++ b/Src/java/quick/src/main/resources/org/hl7/fhir/fhir-modelinfo-3.0.0.xml @@ -0,0 +1,6000 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +