From f7ffa9e16ca1afc876d62f67cc5de5386759924b Mon Sep 17 00:00:00 2001 From: Taha Date: Mon, 31 Jul 2023 15:53:46 -0700 Subject: [PATCH] Aphl 608 is owned and effective period (#727) * [APHL-305] release operation tests * [APHL-305] added dependency and component test * [APHL-608] isOwned checking and effectivePeriod propagation * [APHL-608] added some notOwned relatedArtifact Components for testing and updated draft to use isOwned * [APHL-608] updated tests and handling of relatedArtifacts * [APHL-608] remove deprecated methods --------- Co-authored-by: taha.attari@smilecdr.com --- .../ruler/cql/KnowledgeArtifactAdapter.java | 54 ++++ .../ruler/cql/KnowledgeArtifactProcessor.java | 94 ++++-- .../cqf/ruler/cql/RepositoryServiceTest.java | 85 +++++- .../ersd-active-library-example.json | 16 +- ...rsd-active-transaction-bundle-example.json | 76 ++++- .../test/resources/ersd-bundle-example.json | 64 +++- .../resources/ersd-draft-library-example.json | 16 +- ...ersd-draft-transaction-bundle-example.json | 64 +++- .../test/resources/ersd-release-bundle.json | 84 +++++- ...issing-approvalDate-validation-bundle.json | 24 +- .../resources/ersd-small-active-bundle.json | 36 ++- .../ersd-small-approved-draft-bundle.json | 24 +- ...roved-draft-no-child-effective-period.json | 282 ++++++++++++++++++ 13 files changed, 842 insertions(+), 77 deletions(-) create mode 100644 plugin/cql/src/test/resources/ersd-small-approved-draft-no-child-effective-period.json diff --git a/plugin/cql/src/main/java/org/opencds/cqf/ruler/cql/KnowledgeArtifactAdapter.java b/plugin/cql/src/main/java/org/opencds/cqf/ruler/cql/KnowledgeArtifactAdapter.java index aedc40b36..8006e07ed 100644 --- a/plugin/cql/src/main/java/org/opencds/cqf/ruler/cql/KnowledgeArtifactAdapter.java +++ b/plugin/cql/src/main/java/org/opencds/cqf/ruler/cql/KnowledgeArtifactAdapter.java @@ -8,11 +8,13 @@ import java.util.stream.Collectors; import org.hl7.fhir.r4.model.ActivityDefinition; +import org.hl7.fhir.r4.model.BooleanType; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.ContactDetail; import org.hl7.fhir.r4.model.Library; import org.hl7.fhir.r4.model.Measure; import org.hl7.fhir.r4.model.MetadataResource; +import org.hl7.fhir.r4.model.Period; import org.hl7.fhir.r4.model.PlanDefinition; import org.hl7.fhir.r4.model.RelatedArtifact; import org.hl7.fhir.r4.model.Resource; @@ -91,6 +93,34 @@ public MetadataResource setRelatedArtifact(List theRelatedArtif return resource; } + public Period getEffectivePeriod(){ + switch (resource.getClass().getSimpleName()) { + case "ActivityDefinition": + return ((ActivityDefinition) resource).getEffectivePeriod(); + case "Library": + return ((Library) resource).getEffectivePeriod(); + case "Measure": + return ((Measure) resource).getEffectivePeriod(); + case "PlanDefinition": + return ((PlanDefinition) resource).getEffectivePeriod(); + default: + return new Period(); + } + } + public MetadataResource setEffectivePeriod(Period effectivePeriod) { + switch (resource.getClass().getSimpleName()) { + case "ActivityDefinition": + return ((ActivityDefinition) resource).setEffectivePeriod(effectivePeriod); + case "Library": + return ((Library) resource).setEffectivePeriod(effectivePeriod); + case "Measure": + return ((Measure) resource).setEffectivePeriod(effectivePeriod); + case "PlanDefinition": + return ((PlanDefinition) resource).setEffectivePeriod(effectivePeriod); + default: + return resource; + } + } public List getRelatedArtifactsByType(RelatedArtifact.RelatedArtifactType relatedArtifactType) { List relatedArtifacts = getRelatedArtifact().stream() .filter(ra -> ra.getType() == relatedArtifactType) @@ -99,6 +129,30 @@ public List getRelatedArtifactsByType(RelatedArtifact.RelatedAr return relatedArtifacts; } + public List getOwnedRelatedArtifacts(){ + switch (resource.getClass().getSimpleName()) { + case "ActivityDefinition": + case "Library": + case "Measure": + case "PlanDefinition": + return getOwnedRelatedArtifactsOfKnowledgeArtifact(); + default : + return new ArrayList<>(); + } + } + private List getOwnedRelatedArtifactsOfKnowledgeArtifact() { + return getRelatedArtifact().stream() + .filter(ra -> checkIfRelatedArtifactIsOwned(ra)) + .collect(Collectors.toList()); + } + static Boolean checkIfRelatedArtifactIsOwned(RelatedArtifact ra){ + return ra.getExtension() + .stream() + .filter(ext -> ext.getUrl().equals("http://hl7.org/fhir/StructureDefinition/crmi-isOwned")) + .findAny() + .map(e -> ((BooleanType) e.getValue()).getValue()) + .orElseGet(()-> false); + } public List getComponents() { switch (resource.getClass().getSimpleName()) { case "ActivityDefinition": diff --git a/plugin/cql/src/main/java/org/opencds/cqf/ruler/cql/KnowledgeArtifactProcessor.java b/plugin/cql/src/main/java/org/opencds/cqf/ruler/cql/KnowledgeArtifactProcessor.java index 54e9f24c6..b59ac9988 100644 --- a/plugin/cql/src/main/java/org/opencds/cqf/ruler/cql/KnowledgeArtifactProcessor.java +++ b/plugin/cql/src/main/java/org/opencds/cqf/ruler/cql/KnowledgeArtifactProcessor.java @@ -24,6 +24,7 @@ import org.hl7.fhir.r4.model.IdType; import org.hl7.fhir.r4.model.MarkdownType; import org.hl7.fhir.r4.model.MetadataResource; +import org.hl7.fhir.r4.model.Period; import org.hl7.fhir.r4.model.Reference; import org.hl7.fhir.r4.model.RelatedArtifact; import org.hl7.fhir.r4.model.Resource; @@ -172,7 +173,7 @@ ArtifactAssessment createApprovalAssessment(IdType id, String artifactCommentTyp * 1. A new version of the base artifact where status is changed to * draft and version changed to a new version number + "-draft" * - * 2. New versions of related artifacts where status is changed to + * 2. New versions of owned related artifacts where status is changed to * draft and version changed to a new version number + "-draft" * * Links and references between Bundle resources are updated to point to @@ -209,7 +210,7 @@ public Bundle createDraftBundle(IdType baseArtifactId, FhirDal fhirDal, String v for(int i = 0; i < resourcesToCreate.size(); i++){ KnowledgeArtifactAdapter newResourceAdapter = new KnowledgeArtifactAdapter(resourcesToCreate.get(i)); updateUsageContextReferencesWithUrns(resourcesToCreate.get(i), resourcesToCreate, urnList); - updateRelatedArtifactUrlsWithNewVersions(newResourceAdapter.getComponents(), draftVersion); + updateRelatedArtifactUrlsWithNewVersions(newResourceAdapter.getOwnedRelatedArtifacts(), draftVersion); MetadataResource updateIdForBundle = newResourceAdapter.copy(); updateIdForBundle.setId(urnList.get(i)); transactionBundle.addEntry(createEntry(updateIdForBundle)); @@ -292,10 +293,11 @@ private List createDraftsOfArtifactAndRelated(MetadataResource newResource.setStatus(Enumerations.PublicationStatus.DRAFT); newResource.setVersion(draftVersion); resourcesToCreate.add(newResource); - for (RelatedArtifact ra : sourceResourceAdapter.getComponents()) { - // If it’s a composed-of then we want to copy it - // If it’s a depends-on, we just want to reference it, but not copy it - // (references are updated in createDraftBundle before adding to the bundle) + for (RelatedArtifact ra : sourceResourceAdapter.getOwnedRelatedArtifacts()) { + // If it’s an owned RelatedArtifact composed-of then we want to copy it + // If it’s not owned, we just want to reference it, but not copy it + // (references are updated in createDraftBundle before adding to the bundle + // hence they are ignored here) if (ra.hasUrl()) { Bundle referencedResourceBundle = searchResourceByUrl(ra.getUrl(), fhirDal); processReferencedResourceForDraft(fhirDal, referencedResourceBundle, ra, version, resourcesToCreate); @@ -345,6 +347,24 @@ private Optional getReleaseVersion(String version, CodeType versionBehav } /* $release */ + /* + * The operation changes the state of a Base Artifact to active + * + * This method generates the transaction bundle for this operation. + * + * This bundle consists of: + * 1. A new version of the base artifact where status is changed to + * active and version changed to a new version number and removing "-draft" + * + * 2. New versions of owned related artifacts where status is changed to + * active and version changed to a new version number removing "-draft" + * + * 3. EffectivePeriod from the Base Artifact is propagated to all owned + * RelatedArtifacts which do not specify their own effectivePeriod + * + * Links and references between Bundle resources are updated to point to + * the new versions. + */ public Bundle createReleaseBundle(IdType idType, String version, CodeType versionBehavior, boolean latestFromTxServer, FhirDal fhirDal) throws UnprocessableEntityException, ResourceNotFoundException, PreconditionFailedException { // TODO: This check is to avoid partial releases and should be removed once the argument is supported. if (latestFromTxServer) { @@ -360,7 +380,8 @@ public Bundle createReleaseBundle(IdType idType, String version, CodeType versio String existingVersion = rootArtifact.hasVersion() ? rootArtifact.getVersion().replace("-draft","") : null; String releaseVersion = getReleaseVersion(version, versionBehavior, existingVersion) .orElseThrow(() -> new UnprocessableEntityException("Could not resolve a version for the root artifact.")); - List resourcesToUpdate = internalRelease(rootArtifactAdapter, releaseVersion, versionBehavior, latestFromTxServer, fhirDal); + Period rootEffectivePeriod = rootArtifactAdapter.getEffectivePeriod(); + List resourcesToUpdate = internalRelease(rootArtifactAdapter, releaseVersion, rootEffectivePeriod, versionBehavior, latestFromTxServer, fhirDal); // once iteration is complete, delete all depends-on RAs in the root artifact rootArtifactAdapter.getRelatedArtifact().removeIf(ra -> ra.getType() == RelatedArtifact.RelatedArtifactType.DEPENDSON); @@ -376,20 +397,37 @@ public Bundle createReleaseBundle(IdType idType, String version, CodeType versio // and child artifact components recursively // as root artifact dependencies for(RelatedArtifact component : components){ - MetadataResource resource = checkIfReferenceInList(component, resourcesToUpdate) - .orElseGet(() -> getLatestActiveVersionOfReference(component.getResource(), fhirDal, artifact.getUrl())); - String reference = String.format("%s|%s", resource.getUrl(), resource.getVersion()); - component.setResource(reference); + MetadataResource resource; + if (KnowledgeArtifactAdapter.checkIfRelatedArtifactIsOwned(component)) { + resource = checkIfReferenceInList(component, resourcesToUpdate) + .orElseGet(() -> { + try { + return getLatestActiveVersionOfReference(component.getResource(), fhirDal, artifact.getUrl()); + } catch (ResourceNotFoundException e) { + throw new PreconditionFailedException( + String.format("Resource with URL '%s' is an owned component of resource '%s', but no active version of that resource was found on this server, nor is there a draft version which can be updated.", + component.getResource(), + artifact.getUrl())); + } + }); + String reference = String.format("%s|%s", resource.getUrl(), resource.getVersion()); + component.setResource(reference); + } RelatedArtifact componentToDependency = new RelatedArtifact().setType(RelatedArtifact.RelatedArtifactType.DEPENDSON).setResource(component.getResourceElement().getValueAsString()); rootArtifactAdapter.getRelatedArtifact().add(componentToDependency); } List dependencies = artifactAdapter.getDependencies(); for(RelatedArtifact dependency : dependencies){ - MetadataResource resource = checkIfReferenceInList(dependency, resourcesToUpdate) - .orElseGet(() -> getLatestActiveVersionOfReference(dependency.getResource(), fhirDal, artifact.getUrl())); - String reference = String.format("%s|%s", resource.getUrl(), resource.getVersion()); - dependency.setResource(reference); + // get latest version of dependency if available + try { + MetadataResource resource = checkIfReferenceInList(dependency, resourcesToUpdate) + .orElseGet(() -> getLatestActiveVersionOfReference(dependency.getResource(), fhirDal, artifact.getUrl())); + String reference = String.format("%s|%s", resource.getUrl(), resource.getVersion()); + dependency.setResource(reference); + } catch (ResourceNotFoundException e) { + // Warn about potential missing dependency? + } if(!artifact.getUrl().equals(rootArtifact.getUrl())){ rootArtifactAdapter.getRelatedArtifact().add(dependency); } @@ -430,7 +468,7 @@ private void checkReleasePreconditions(MetadataResource artifact, Date approvalD String.format("The artifact was approved on '%s', but was last modified on '%s'. An approval must be provided after the most-recent update.", approvalDate, artifact.getDate())); } } - private List internalRelease(KnowledgeArtifactAdapter artifactAdapter, String version, + private List internalRelease(KnowledgeArtifactAdapter artifactAdapter, String version, Period rootEffectivePeriod, CodeType versionBehavior, boolean latestFromTxServer, FhirDal fhirDal) throws NotImplementedOperationException, ResourceNotFoundException { List resourcesToUpdate = new ArrayList(); @@ -439,14 +477,24 @@ private List internalRelease(KnowledgeArtifactAdapter r.getUrl().equals(Canonicals.getUrl(resourceReference))) @@ -470,7 +518,7 @@ private List internalRelease(KnowledgeArtifactAdapter searchResultAdapter = new KnowledgeArtifactAdapter<>(referencedResource); - resourcesToUpdate.addAll(internalRelease(searchResultAdapter, version, versionBehavior, latestFromTxServer, fhirDal)); + resourcesToUpdate.addAll(internalRelease(searchResultAdapter, version, rootEffectivePeriod, versionBehavior, latestFromTxServer, fhirDal)); } } } diff --git a/plugin/cql/src/test/java/org/opencds/cqf/ruler/cql/RepositoryServiceTest.java b/plugin/cql/src/test/java/org/opencds/cqf/ruler/cql/RepositoryServiceTest.java index e2856e2f0..967b13183 100644 --- a/plugin/cql/src/test/java/org/opencds/cqf/ruler/cql/RepositoryServiceTest.java +++ b/plugin/cql/src/test/java/org/opencds/cqf/ruler/cql/RepositoryServiceTest.java @@ -8,11 +8,14 @@ import static org.opencds.cqf.cql.evaluator.fhir.util.r4.Parameters.part; import java.util.Arrays; +import java.util.Calendar; import java.util.Date; +import java.util.GregorianCalendar; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; +import org.hl7.fhir.r4.model.ActivityDefinition; import org.hl7.fhir.r4.model.BooleanType; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.Bundle.BundleEntryComponent; @@ -20,10 +23,14 @@ import org.hl7.fhir.r4.model.DateType; import org.hl7.fhir.r4.model.Enumerations; import org.hl7.fhir.r4.model.Library; +import org.hl7.fhir.r4.model.Measure; +import org.hl7.fhir.r4.model.MetadataResource; import org.hl7.fhir.r4.model.Parameters; +import org.hl7.fhir.r4.model.PlanDefinition; import org.hl7.fhir.r4.model.Reference; import org.hl7.fhir.r4.model.RelatedArtifact; import org.hl7.fhir.r4.model.StringType; +import org.hl7.fhir.r4.model.ValueSet; import org.junit.jupiter.api.Test; import org.opencds.cqf.cql.evaluator.fhir.util.Canonicals; import org.opencds.cqf.ruler.cql.r4.ArtifactAssessment; @@ -100,7 +107,7 @@ void draftOperation_version_conflict_test() { } @Test - void draftOperation_draft_test() { + void draftOperation_cannot_create_draft_of_draft_test() { loadResource("minimal-draft-to-test-version-conflict.json"); Parameters params = parameters(part("version", "1.2.1") ); String maybeException = ""; @@ -217,11 +224,15 @@ void releaseResource_test() { "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1146.1436|2022-10-19", "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1146.1435|2022-10-19", "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1146.1446|2022-10-19", - "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1146.1438|2022-10-19" + "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1146.1438|2022-10-19", + "http://notOwnedTest.com/Library/notOwnedRoot|0.1.1", + "http://notOwnedTest.com/Library/notOwnedLeaf|0.1.1", + "http://notOwnedTest.com/Library/notOwnedLeaf1|0.1.1" ); List ersdTestArtifactComponents = Arrays.asList( "http://ersd.aimsplatform.org/fhir/PlanDefinition/release-us-ecr-specification|" + existingVersion, - "http://ersd.aimsplatform.org/fhir/Library/release-rctc|" + existingVersion + "http://ersd.aimsplatform.org/fhir/Library/release-rctc|" + existingVersion, + "http://notOwnedTest.com/Library/notOwnedRoot|0.1.1" ); List dependenciesOnReleasedArtifact = releasedLibrary.getRelatedArtifact() .stream() @@ -241,16 +252,18 @@ void releaseResource_test() { for(String component: ersdTestArtifactComponents){ assertTrue(componentsOnReleasedArtifact.contains(component)); } + assertTrue(ersdTestArtifactDependencies.size() == dependenciesOnReleasedArtifact.size()); + assertTrue(ersdTestArtifactComponents.size() == componentsOnReleasedArtifact.size()); } @Test void releaseResource_force_version() { loadTransaction("ersd-small-approved-draft-bundle.json"); - String existingVersion = "1.2.3"; - String versionData = "1.2.7"; + // Existing version should be "1.2.3"; + String newVersionToForce = "1.2.7"; Parameters params = parameters( - part("version", new StringType(versionData)), + part("version", new StringType(newVersionToForce)), part("versionBehavior", new StringType("force")) ); @@ -263,11 +276,67 @@ void releaseResource_force_version() { .execute(); assertNotNull(returnResource); - Optional maybeLib = returnResource.getEntry().stream().filter(entry -> entry.getResponse().getLocation().contains("Library")).findFirst(); + Optional maybeLib = returnResource.getEntry().stream().filter(entry -> entry.getResponse().getLocation().contains(specificationLibReference)).findFirst(); assertTrue(maybeLib.isPresent()); Library releasedLibrary = getClient().fetchResourceFromUrl(Library.class,maybeLib.get().getResponse().getLocation()); - assertTrue(releasedLibrary.getVersion().equals(versionData)); + assertTrue(releasedLibrary.getVersion().equals(newVersionToForce)); + } + + @Test + void releaseResource_propagate_effective_period() { + loadTransaction("ersd-small-approved-draft-no-child-effective-period.json"); + String effectivePeriodToPropagate = "2020-12-11"; + + Parameters params = parameters( + part("version", new StringType("1.2.7")), + part("versionBehavior", new StringType("default")) + ); + + Bundle returnResource = getClient().operation() + .onInstance(specificationLibReference) + .named("$release") + .withParameters(params) + .useHttpGet() + .returnResourceType(Bundle.class) + .execute(); + + assertNotNull(returnResource); + returnResource.getEntry() + .stream() + .map(entry -> entry.getResponse().getLocation()) + .map(location -> { + switch (location.split("/")[0]) { + case "ActivityDefinition": + return getClient().fetchResourceFromUrl(ActivityDefinition.class, location); + case "Library": + return getClient().fetchResourceFromUrl(Library.class, location); + case "Measure": + return getClient().fetchResourceFromUrl(Measure.class, location); + case "PlanDefinition": + return getClient().fetchResourceFromUrl(PlanDefinition.class, location); + case "ValueSet": + return getClient().fetchResourceFromUrl(ValueSet.class, location); + default: + return null; + } + }) + .forEach(resource -> { + assertNotNull(resource); + if(!resource.getClass().getSimpleName().equals("ValueSet")){ + KnowledgeArtifactAdapter adapter = new KnowledgeArtifactAdapter<>(resource); + assertTrue(adapter.getEffectivePeriod().hasStart()); + Date start = adapter.getEffectivePeriod().getStart(); + Calendar calendar = new GregorianCalendar(); + calendar.setTime(start); + int year = calendar.get(Calendar.YEAR); + int month = calendar.get(Calendar.MONTH) + 1; + int day = calendar.get(Calendar.DAY_OF_MONTH); + String startString = year + "-" + month + "-" + day; + assertTrue(startString.equals(effectivePeriodToPropagate)); + } + }); } + @Test void releaseResource_latestFromTx_NotSupported_test() { loadTransaction("ersd-small-approved-draft-bundle.json"); diff --git a/plugin/cql/src/test/resources/ersd-active-library-example.json b/plugin/cql/src/test/resources/ersd-active-library-example.json index a9d882303..1cefd0a1c 100644 --- a/plugin/cql/src/test/resources/ersd-active-library-example.json +++ b/plugin/cql/src/test/resources/ersd-active-library-example.json @@ -59,11 +59,23 @@ "relatedArtifact": [ { "type": "composed-of", - "resource": "http://hl7.org/fhir/us/ecr/PlanDefinition/plandefinition-ersd-instance-example" + "resource": "http://hl7.org/fhir/us/ecr/PlanDefinition/plandefinition-ersd-instance-example", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://hl7.org/fhir/us/ecr/Library/library-rctc-example" + "resource": "http://hl7.org/fhir/us/ecr/Library/library-rctc-example", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] } ] } diff --git a/plugin/cql/src/test/resources/ersd-active-transaction-bundle-example.json b/plugin/cql/src/test/resources/ersd-active-transaction-bundle-example.json index 4660b65c4..142446302 100644 --- a/plugin/cql/src/test/resources/ersd-active-transaction-bundle-example.json +++ b/plugin/cql/src/test/resources/ersd-active-transaction-bundle-example.json @@ -78,11 +78,27 @@ [ { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/PlanDefinition/us-ecr-specification|2.0.0" + "resource": "http://ersd.aimsplatform.org/fhir/PlanDefinition/us-ecr-specification|2.0.0", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/Library/rctc|2022-10-19" + "resource": "http://ersd.aimsplatform.org/fhir/Library/rctc|2022-10-19", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] + }, + { + "type": "composed-of", + "resource": "http://notOwnedTest.com/Library/notOwnedRoot|0.1.1" } ] }, @@ -180,6 +196,10 @@ "type": "depends-on", "label": "RCTC Value Set Library of Trigger Codes", "resource": "http://ersd.aimsplatform.org/fhir/Library/rctc|2022-10-19" + }, + { + "type": "composed-of", + "resource": "http://notOwnedTest.com/Library/notOwnedLeaf|0.1.1" } ], "action": @@ -1328,27 +1348,67 @@ [ { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/dxtc|2022-10-19" + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/dxtc|2022-10-19", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/ostc|2022-10-19" + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/ostc|2022-10-19", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/lotc|2022-10-19" + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/lotc|2022-10-19", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/lrtc|2022-10-19" + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/lrtc|2022-10-19", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/mrtc|2022-10-19" + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/mrtc|2022-10-19", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/sdtc|2022-10-19" + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/sdtc|2022-10-19", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] + }, + { + "type": "composed-of", + "resource": "http://notOwnedTest.com/Library/notOwnedLeaf1|0.1.1" } ] }, diff --git a/plugin/cql/src/test/resources/ersd-bundle-example.json b/plugin/cql/src/test/resources/ersd-bundle-example.json index 9b7c1ec0a..07b9c1282 100644 --- a/plugin/cql/src/test/resources/ersd-bundle-example.json +++ b/plugin/cql/src/test/resources/ersd-bundle-example.json @@ -73,11 +73,23 @@ "relatedArtifact": [ { "type": "composed-of", - "resource": "http://hl7.org/fhir/us/ecr/PlanDefinition/plandefinition-ersd-instance-example" + "resource": "http://hl7.org/fhir/us/ecr/PlanDefinition/plandefinition-ersd-instance-example", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://hl7.org/fhir/us/ecr/Library/library-rctc-example" + "resource": "http://hl7.org/fhir/us/ecr/Library/library-rctc-example", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] } ] } @@ -1191,27 +1203,63 @@ "relatedArtifact": [ { "type": "composed-of", - "resource": "http://hl7.org/fhir/us/ecr/ValueSet/dxtc" + "resource": "http://hl7.org/fhir/us/ecr/ValueSet/dxtc", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://hl7.org/fhir/us/ecr/ValueSet/ostc" + "resource": "http://hl7.org/fhir/us/ecr/ValueSet/ostc", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://hl7.org/fhir/us/ecr/ValueSet/lotc" + "resource": "http://hl7.org/fhir/us/ecr/ValueSet/lotc", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://hl7.org/fhir/us/ecr/ValueSet/lrtc" + "resource": "http://hl7.org/fhir/us/ecr/ValueSet/lrtc", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://hl7.org/fhir/us/ecr/ValueSet/mrtc" + "resource": "http://hl7.org/fhir/us/ecr/ValueSet/mrtc", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://hl7.org/fhir/us/ecr/ValueSet/sdtc" + "resource": "http://hl7.org/fhir/us/ecr/ValueSet/sdtc", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] } ] } diff --git a/plugin/cql/src/test/resources/ersd-draft-library-example.json b/plugin/cql/src/test/resources/ersd-draft-library-example.json index 757483daf..06cafcb3d 100644 --- a/plugin/cql/src/test/resources/ersd-draft-library-example.json +++ b/plugin/cql/src/test/resources/ersd-draft-library-example.json @@ -59,11 +59,23 @@ "relatedArtifact": [ { "type": "composed-of", - "resource": "http://hl7.org/fhir/us/ecr/PlanDefinition/plandefinition-ersd-instance-example" + "resource": "http://hl7.org/fhir/us/ecr/PlanDefinition/plandefinition-ersd-instance-example", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://hl7.org/fhir/us/ecr/Library/library-rctc-example" + "resource": "http://hl7.org/fhir/us/ecr/Library/library-rctc-example", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] } ] } diff --git a/plugin/cql/src/test/resources/ersd-draft-transaction-bundle-example.json b/plugin/cql/src/test/resources/ersd-draft-transaction-bundle-example.json index 0890dc868..2a070e03d 100644 --- a/plugin/cql/src/test/resources/ersd-draft-transaction-bundle-example.json +++ b/plugin/cql/src/test/resources/ersd-draft-transaction-bundle-example.json @@ -77,11 +77,23 @@ [ { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/PlanDefinition/draft-us-ecr-specification" + "resource": "http://ersd.aimsplatform.org/fhir/PlanDefinition/draft-us-ecr-specification", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/Library/draft-rctc" + "resource": "http://ersd.aimsplatform.org/fhir/Library/draft-rctc", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] } ] }, @@ -1325,27 +1337,63 @@ [ { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/draft-dxtc" + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/draft-dxtc", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/draft-ostc" + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/draft-ostc", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/draft-lotc" + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/draft-lotc", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/draft-lrtc" + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/draft-lrtc", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/mrtc" + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/mrtc", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/draft-sdtc" + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/draft-sdtc", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] } ] }, diff --git a/plugin/cql/src/test/resources/ersd-release-bundle.json b/plugin/cql/src/test/resources/ersd-release-bundle.json index 2172d9d2b..bcab741f8 100644 --- a/plugin/cql/src/test/resources/ersd-release-bundle.json +++ b/plugin/cql/src/test/resources/ersd-release-bundle.json @@ -80,11 +80,27 @@ [ { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/PlanDefinition/release-us-ecr-specification|1.2.3-draft" + "resource": "http://ersd.aimsplatform.org/fhir/PlanDefinition/release-us-ecr-specification|1.2.3-draft", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/Library/release-rctc|1.2.3-draft" + "resource": "http://ersd.aimsplatform.org/fhir/Library/release-rctc|1.2.3-draft", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] + }, + { + "type": "composed-of", + "resource": "http://notOwnedTest.com/Library/notOwnedRoot|0.1.1" } ] }, @@ -181,7 +197,17 @@ { "type": "composed-of", "label": "RCTC Value Set Library of Trigger Codes", - "resource": "http://ersd.aimsplatform.org/fhir/Library/release-rctc|1.2.3-draft" + "resource": "http://ersd.aimsplatform.org/fhir/Library/release-rctc|1.2.3-draft", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] + }, + { + "type": "composed-of", + "resource": "http://notOwnedTest.com/Library/notOwnedLeaf|0.1.1" } ], "action": @@ -1330,27 +1356,67 @@ [ { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/release-dxtc|1.2.3-draft" + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/release-dxtc|1.2.3-draft", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/release-ostc|1.2.3-draft" + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/release-ostc|1.2.3-draft", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/release-lotc|1.2.3-draft" + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/release-lotc|1.2.3-draft", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/release-lrtc|1.2.3-draft" + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/release-lrtc|1.2.3-draft", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/release-mrtc|1.2.3-draft" + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/release-mrtc|1.2.3-draft", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/release-sdtc|1.2.3-draft" + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/release-sdtc|1.2.3-draft", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] + }, + { + "type": "composed-of", + "resource": "http://notOwnedTest.com/Library/notOwnedLeaf1|0.1.1" } ] }, diff --git a/plugin/cql/src/test/resources/ersd-release-missing-approvalDate-validation-bundle.json b/plugin/cql/src/test/resources/ersd-release-missing-approvalDate-validation-bundle.json index 85dbd6beb..6934450a8 100644 --- a/plugin/cql/src/test/resources/ersd-release-missing-approvalDate-validation-bundle.json +++ b/plugin/cql/src/test/resources/ersd-release-missing-approvalDate-validation-bundle.json @@ -15,11 +15,23 @@ "relatedArtifact": [ { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/PlanDefinition/us-ecr-specification|1.2.3-draft" + "resource": "http://ersd.aimsplatform.org/fhir/PlanDefinition/us-ecr-specification|1.2.3-draft", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/Library/rctc|1.2.3-draft" + "resource": "http://ersd.aimsplatform.org/fhir/Library/rctc|1.2.3-draft", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] } ] }, @@ -60,7 +72,13 @@ "relatedArtifact": [ { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/dxtc|1.2.3-draft" + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/dxtc|1.2.3-draft", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] } ] }, diff --git a/plugin/cql/src/test/resources/ersd-small-active-bundle.json b/plugin/cql/src/test/resources/ersd-small-active-bundle.json index 62c895089..29e7bcabe 100644 --- a/plugin/cql/src/test/resources/ersd-small-active-bundle.json +++ b/plugin/cql/src/test/resources/ersd-small-active-bundle.json @@ -15,11 +15,27 @@ "relatedArtifact": [ { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/PlanDefinition/us-ecr-specification|2.0.0" + "resource": "http://ersd.aimsplatform.org/fhir/PlanDefinition/us-ecr-specification|2.0.0", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/Library/rctc|2022-10-19" + "resource": "http://ersd.aimsplatform.org/fhir/Library/rctc|2022-10-19", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] + }, + { + "type": "composed-of", + "resource": "http://notOwnedTest.com/Library/notOwnedRoot|0.1.1" } ] }, @@ -41,6 +57,10 @@ "type": "depends-on", "label": "RCTC Value Set Library of Trigger Codes", "resource": "http://ersd.aimsplatform.org/fhir/Library/rctc|2022-10-19" + }, + { + "type": "composed-of", + "resource": "http://notOwnedTest.com/Library/notOwnedLeaf|0.1.1" } ] }, @@ -60,7 +80,17 @@ "relatedArtifact": [ { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/dxtc|2022-10-19" + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/dxtc|2022-10-19", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] + }, + { + "type": "composed-of", + "resource": "http://notOwnedTest.com/Library/notOwnedLeaf2|0.1.1" } ] }, diff --git a/plugin/cql/src/test/resources/ersd-small-approved-draft-bundle.json b/plugin/cql/src/test/resources/ersd-small-approved-draft-bundle.json index ffd22c2d2..13af65cb5 100644 --- a/plugin/cql/src/test/resources/ersd-small-approved-draft-bundle.json +++ b/plugin/cql/src/test/resources/ersd-small-approved-draft-bundle.json @@ -17,11 +17,23 @@ "relatedArtifact": [ { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/PlanDefinition/us-ecr-specification|1.2.3-draft" + "resource": "http://ersd.aimsplatform.org/fhir/PlanDefinition/us-ecr-specification|1.2.3-draft", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] }, { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/Library/rctc|1.2.3-draft" + "resource": "http://ersd.aimsplatform.org/fhir/Library/rctc|1.2.3-draft", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] } ] }, @@ -62,7 +74,13 @@ "relatedArtifact": [ { "type": "composed-of", - "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/dxtc|1.2.3-draft" + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/dxtc|1.2.3-draft", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] } ] }, diff --git a/plugin/cql/src/test/resources/ersd-small-approved-draft-no-child-effective-period.json b/plugin/cql/src/test/resources/ersd-small-approved-draft-no-child-effective-period.json new file mode 100644 index 000000000..bcc8568fc --- /dev/null +++ b/plugin/cql/src/test/resources/ersd-small-approved-draft-no-child-effective-period.json @@ -0,0 +1,282 @@ +{ + "resourceType": "Bundle", + "id": "rctc-release-2022-10-19-Bundle-rctc", + "type": "transaction", + "timestamp": "2022-10-21T15:18:28.504-04:00", + "entry": [ + { + "fullUrl": "http://ersd.aimsplatform.org/fhir/Library/SpecificationLibrary", + "resource": { + "resourceType": "Library", + "id": "SpecificationLibrary", + "url": "http://ersd.aimsplatform.org/fhir/Library/SpecificationLibrary", + "version": "1.2.3-draft", + "status": "draft", + "date": "2023-06-30", + "approvalDate": "2023-06-30", + "effectivePeriod": + { + "start": "2020-12-11" + }, + "relatedArtifact": [ + { + "type": "composed-of", + "resource": "http://ersd.aimsplatform.org/fhir/PlanDefinition/us-ecr-specification|1.2.3-draft", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] + }, + { + "type": "composed-of", + "resource": "http://ersd.aimsplatform.org/fhir/Library/rctc|1.2.3-draft", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] + } + ] + }, + "request": { + "method": "PUT", + "url": "Library/SpecificationLibrary" + } + }, + { + "fullUrl": "http://ersd.aimsplatform.org/fhir/PlanDefinition/us-ecr-specification", + "resource": { + "resourceType": "PlanDefinition", + "id": "us-ecr-specification", + "url": "http://ersd.aimsplatform.org/fhir/PlanDefinition/us-ecr-specification", + "version": "1.2.3-draft", + "status": "draft", + "relatedArtifact": [ + { + "type": "depends-on", + "label": "RCTC Value Set Library of Trigger Codes", + "resource": "http://ersd.aimsplatform.org/fhir/Library/rctc|1.2.3-draft" + } + ] + }, + "request": { + "method": "PUT", + "url": "PlanDefinition/us-ecr-specification" + } + }, + { + "fullUrl": "http://ersd.aimsplatform.org/fhir/Library/rctc", + "resource": { + "resourceType": "Library", + "id": "rctc", + "url": "http://ersd.aimsplatform.org/fhir/Library/rctc", + "version": "1.2.3-draft", + "status": "draft", + "relatedArtifact": [ + { + "type": "composed-of", + "resource": "http://ersd.aimsplatform.org/fhir/ValueSet/dxtc|1.2.3-draft", + "extension":[ + { + "url":"http://hl7.org/fhir/StructureDefinition/crmi-isOwned", + "valueBoolean": true + } + ] + } + ] + }, + "request": { + "method": "PUT", + "url": "Library/rctc" + } + }, + { + "fullUrl": "http://ersd.aimsplatform.org/fhir/ValueSet/dxtc", + "resource": { + "resourceType": "ValueSet", + "id": "dxtc", + "url": "http://ersd.aimsplatform.org/fhir/ValueSet/dxtc", + "version": "1.2.3-draft", + "status": "draft", + "compose": { + "include": [ + { + "valueSet": [ + "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1146.6|20210526" + ] + } + ] + }, + "expansion": { + "timestamp": "2022-10-21T15:18:29-04:00", + "contains": [ + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "version": "Provisional_2022-01-12", + "code": "T40.0X1A" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "version": "Provisional_2022-01-12", + "code": "T40.0X2A" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "version": "Provisional_2022-01-12", + "code": "T40.0X3A" + } + ] + } + }, + "request": { + "method": "PUT", + "url": "ValueSet/dxtc" + } + }, + { + "fullUrl": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1146.6", + "resource": { + "resourceType": "ValueSet", + "id": "2.16.840.1.113762.1.4.1146.6", + "url": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1146.6", + "identifier": [ + { + "system": "urn:ietf:rfc:3986", + "value": "urn:oid:2.16.840.1.113762.1.4.1146.6" + } + ], + "version": "20210526", + "status": "active", + "compose": { + "include": [ + { + "system": "http://snomed.info/sct", + "version": "Provisional_2022-04-25", + "concept": [ + { + "code": "1086051000119107", + "display": "Cardiomyopathy due to diphtheria (disorder)" + }, + { + "code": "1086061000119109", + "display": "Diphtheria radiculomyelitis (disorder)" + }, + { + "code": "1086071000119103", + "display": "Diphtheria tubulointerstitial nephropathy (disorder)" + }, + { + "code": "1090211000119102", + "display": "Pharyngeal diphtheria (disorder)" + }, + { + "code": "129667001", + "display": "Diphtheritic peripheral neuritis (disorder)" + }, + { + "code": "13596001", + "display": "Diphtheritic peritonitis (disorder)" + }, + { + "code": "15682004", + "display": "Anterior nasal diphtheria (disorder)" + }, + { + "code": "186347006", + "display": "Diphtheria of penis (disorder)" + }, + { + "code": "18901009", + "display": "Cutaneous diphtheria (disorder)" + }, + { + "code": "194945009", + "display": "Acute myocarditis - diphtheritic (disorder)" + }, + { + "code": "230596007", + "display": "Diphtheritic neuropathy (disorder)" + }, + { + "code": "240422004", + "display": "Tracheobronchial diphtheria (disorder)" + }, + { + "code": "26117009", + "display": "Diphtheritic myocarditis (disorder)" + }, + { + "code": "276197005", + "display": "Infection caused by Corynebacterium diphtheriae (disorder)" + }, + { + "code": "3419005", + "display": "Faucial diphtheria (disorder)" + }, + { + "code": "397428000", + "display": "Diphtheria (disorder)" + }, + { + "code": "397430003", + "display": "Diphtheria caused by Corynebacterium diphtheriae (disorder)" + }, + { + "code": "48278001", + "display": "Diphtheritic cystitis (disorder)" + }, + { + "code": "50215002", + "display": "Laryngeal diphtheria (disorder)" + }, + { + "code": "715659006", + "display": "Diphtheria of respiratory system (disorder)" + }, + { + "code": "75589004", + "display": "Nasopharyngeal diphtheria (disorder)" + }, + { + "code": "7773002", + "display": "Conjunctival diphtheria (disorder)" + }, + { + "code": "789005009", + "display": "Paralysis of uvula after diphtheria (disorder)" + } + ] + } + ] + }, + "expansion": { + "timestamp": "2022-10-21T15:18:29-04:00", + "contains": [ + { + "system": "http://snomed.info/sct", + "version": "Provisional_2022-04-25", + "code": "1086051000119107" + }, + { + "system": "http://snomed.info/sct", + "version": "Provisional_2022-04-25", + "code": "1086061000119109" + }, + { + "system": "http://snomed.info/sct", + "version": "Provisional_2022-04-25", + "code": "1086071000119103" + } + ] + } + }, + "request": { + "method": "PUT", + "url": "ValueSet/2.16.840.1.113762.1.4.1146.6" + } + } + ] +} \ No newline at end of file